From bc77171b96eb6e449ea63b21de8651785fb41992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Mon, 27 Jul 2026 10:40:25 -0700 Subject: [PATCH 01/24] Add agent session store protocols livekit_agent_session_store.proto is the management API (Twirp): create, get, list and delete a session, plus Dump for a consistent download URL. livekit_agent_session_db.proto is the data plane: a request/response frame pair over one WebSocket per session, correlated by client-chosen request_id, with exec, query, atomic batch, interactive transactions, and credit-paced row batches so any result size streams with bounded memory at every hop. SessionValue mirrors SQLite's five storage classes. The other twirp files change only because protoc-gen-twirp numbers file descriptors by position in the invocation, so inserting one service shifts the ones after it. --- livekit/livekit_agent_session_db.pb.go | 1610 +++++++++++++++++ livekit/livekit_agent_session_store.pb.go | 683 +++++++ livekit/livekit_agent_session_store.twirp.go | 1685 ++++++++++++++++++ livekit/livekit_agent_simulation.twirp.go | 4 +- livekit/livekit_cloud_agent.twirp.go | 4 +- livekit/livekit_connector.twirp.go | 4 +- livekit/livekit_egress.twirp.go | 4 +- livekit/livekit_ingress.twirp.go | 4 +- livekit/livekit_phone_number.twirp.go | 4 +- livekit/livekit_room.twirp.go | 4 +- livekit/livekit_sip.twirp.go | 4 +- magefile.go | 2 + protobufs/livekit_agent_session_db.proto | 145 ++ protobufs/livekit_agent_session_store.proto | 95 + 14 files changed, 4236 insertions(+), 16 deletions(-) create mode 100644 livekit/livekit_agent_session_db.pb.go create mode 100644 livekit/livekit_agent_session_store.pb.go create mode 100644 livekit/livekit_agent_session_store.twirp.go create mode 100644 protobufs/livekit_agent_session_db.proto create mode 100644 protobufs/livekit_agent_session_store.proto diff --git a/livekit/livekit_agent_session_db.pb.go b/livekit/livekit_agent_session_db.pb.go new file mode 100644 index 000000000..40ef02f82 --- /dev/null +++ b/livekit/livekit_agent_session_db.pb.go @@ -0,0 +1,1610 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: livekit_agent_session_db.proto + +package livekit + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// SessionQueryLang selects the query language of a statement; both execute +// against the same session database. +type SessionQueryLang int32 + +const ( + SessionQueryLang_SESSION_QUERY_LANG_SQL SessionQueryLang = 0 + SessionQueryLang_SESSION_QUERY_LANG_CYPHER SessionQueryLang = 1 +) + +// Enum value maps for SessionQueryLang. +var ( + SessionQueryLang_name = map[int32]string{ + 0: "SESSION_QUERY_LANG_SQL", + 1: "SESSION_QUERY_LANG_CYPHER", + } + SessionQueryLang_value = map[string]int32{ + "SESSION_QUERY_LANG_SQL": 0, + "SESSION_QUERY_LANG_CYPHER": 1, + } +) + +func (x SessionQueryLang) Enum() *SessionQueryLang { + p := new(SessionQueryLang) + *p = x + return p +} + +func (x SessionQueryLang) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SessionQueryLang) Descriptor() protoreflect.EnumDescriptor { + return file_livekit_agent_session_db_proto_enumTypes[0].Descriptor() +} + +func (SessionQueryLang) Type() protoreflect.EnumType { + return &file_livekit_agent_session_db_proto_enumTypes[0] +} + +func (x SessionQueryLang) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SessionQueryLang.Descriptor instead. +func (SessionQueryLang) EnumDescriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{0} +} + +type SessionStoreRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Types that are valid to be assigned to Message: + // + // *SessionStoreRequest_Hello + // *SessionStoreRequest_Exec + // *SessionStoreRequest_Query + // *SessionStoreRequest_Batch + // *SessionStoreRequest_Begin + // *SessionStoreRequest_Commit + // *SessionStoreRequest_Rollback + // *SessionStoreRequest_Cancel + // *SessionStoreRequest_Credit + // *SessionStoreRequest_Ping + Message isSessionStoreRequest_Message `protobuf_oneof:"message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionStoreRequest) Reset() { + *x = SessionStoreRequest{} + mi := &file_livekit_agent_session_db_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionStoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionStoreRequest) ProtoMessage() {} + +func (x *SessionStoreRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionStoreRequest.ProtoReflect.Descriptor instead. +func (*SessionStoreRequest) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{0} +} + +func (x *SessionStoreRequest) GetRequestId() uint32 { + if x != nil { + return x.RequestId + } + return 0 +} + +func (x *SessionStoreRequest) GetMessage() isSessionStoreRequest_Message { + if x != nil { + return x.Message + } + return nil +} + +func (x *SessionStoreRequest) GetHello() *SessionHello { + if x != nil { + if x, ok := x.Message.(*SessionStoreRequest_Hello); ok { + return x.Hello + } + } + return nil +} + +func (x *SessionStoreRequest) GetExec() *SessionStatement { + if x != nil { + if x, ok := x.Message.(*SessionStoreRequest_Exec); ok { + return x.Exec + } + } + return nil +} + +func (x *SessionStoreRequest) GetQuery() *SessionStatement { + if x != nil { + if x, ok := x.Message.(*SessionStoreRequest_Query); ok { + return x.Query + } + } + return nil +} + +func (x *SessionStoreRequest) GetBatch() *SessionBatch { + if x != nil { + if x, ok := x.Message.(*SessionStoreRequest_Batch); ok { + return x.Batch + } + } + return nil +} + +func (x *SessionStoreRequest) GetBegin() *SessionBegin { + if x != nil { + if x, ok := x.Message.(*SessionStoreRequest_Begin); ok { + return x.Begin + } + } + return nil +} + +func (x *SessionStoreRequest) GetCommit() *SessionCommit { + if x != nil { + if x, ok := x.Message.(*SessionStoreRequest_Commit); ok { + return x.Commit + } + } + return nil +} + +func (x *SessionStoreRequest) GetRollback() *SessionRollback { + if x != nil { + if x, ok := x.Message.(*SessionStoreRequest_Rollback); ok { + return x.Rollback + } + } + return nil +} + +func (x *SessionStoreRequest) GetCancel() *SessionCancel { + if x != nil { + if x, ok := x.Message.(*SessionStoreRequest_Cancel); ok { + return x.Cancel + } + } + return nil +} + +func (x *SessionStoreRequest) GetCredit() *SessionCredit { + if x != nil { + if x, ok := x.Message.(*SessionStoreRequest_Credit); ok { + return x.Credit + } + } + return nil +} + +func (x *SessionStoreRequest) GetPing() *SessionPing { + if x != nil { + if x, ok := x.Message.(*SessionStoreRequest_Ping); ok { + return x.Ping + } + } + return nil +} + +type isSessionStoreRequest_Message interface { + isSessionStoreRequest_Message() +} + +type SessionStoreRequest_Hello struct { + Hello *SessionHello `protobuf:"bytes,2,opt,name=hello,proto3,oneof"` // must be first on the socket +} + +type SessionStoreRequest_Exec struct { + Exec *SessionStatement `protobuf:"bytes,3,opt,name=exec,proto3,oneof"` // no result rows; answers SessionExecResult +} + +type SessionStoreRequest_Query struct { + Query *SessionStatement `protobuf:"bytes,4,opt,name=query,proto3,oneof"` // answers SessionColumns + SessionRowBatch* + SessionDone +} + +type SessionStoreRequest_Batch struct { + Batch *SessionBatch `protobuf:"bytes,5,opt,name=batch,proto3,oneof"` // atomic multi-statement exec +} + +type SessionStoreRequest_Begin struct { + Begin *SessionBegin `protobuf:"bytes,6,opt,name=begin,proto3,oneof"` // interactive transaction (server enforces idle/duration timeouts) +} + +type SessionStoreRequest_Commit struct { + Commit *SessionCommit `protobuf:"bytes,7,opt,name=commit,proto3,oneof"` +} + +type SessionStoreRequest_Rollback struct { + Rollback *SessionRollback `protobuf:"bytes,8,opt,name=rollback,proto3,oneof"` +} + +type SessionStoreRequest_Cancel struct { + Cancel *SessionCancel `protobuf:"bytes,9,opt,name=cancel,proto3,oneof"` // stop a running query's stream/cursor +} + +type SessionStoreRequest_Credit struct { + Credit *SessionCredit `protobuf:"bytes,10,opt,name=credit,proto3,oneof"` // grant more RowBatch credits for request_id +} + +type SessionStoreRequest_Ping struct { + Ping *SessionPing `protobuf:"bytes,11,opt,name=ping,proto3,oneof"` +} + +func (*SessionStoreRequest_Hello) isSessionStoreRequest_Message() {} + +func (*SessionStoreRequest_Exec) isSessionStoreRequest_Message() {} + +func (*SessionStoreRequest_Query) isSessionStoreRequest_Message() {} + +func (*SessionStoreRequest_Batch) isSessionStoreRequest_Message() {} + +func (*SessionStoreRequest_Begin) isSessionStoreRequest_Message() {} + +func (*SessionStoreRequest_Commit) isSessionStoreRequest_Message() {} + +func (*SessionStoreRequest_Rollback) isSessionStoreRequest_Message() {} + +func (*SessionStoreRequest_Cancel) isSessionStoreRequest_Message() {} + +func (*SessionStoreRequest_Credit) isSessionStoreRequest_Message() {} + +func (*SessionStoreRequest_Ping) isSessionStoreRequest_Message() {} + +type SessionStoreResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Types that are valid to be assigned to Message: + // + // *SessionStoreResponse_HelloOk + // *SessionStoreResponse_Columns + // *SessionStoreResponse_RowBatch + // *SessionStoreResponse_ExecResult + // *SessionStoreResponse_Done + // *SessionStoreResponse_Error + // *SessionStoreResponse_Pong + Message isSessionStoreResponse_Message `protobuf_oneof:"message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionStoreResponse) Reset() { + *x = SessionStoreResponse{} + mi := &file_livekit_agent_session_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionStoreResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionStoreResponse) ProtoMessage() {} + +func (x *SessionStoreResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionStoreResponse.ProtoReflect.Descriptor instead. +func (*SessionStoreResponse) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{1} +} + +func (x *SessionStoreResponse) GetRequestId() uint32 { + if x != nil { + return x.RequestId + } + return 0 +} + +func (x *SessionStoreResponse) GetMessage() isSessionStoreResponse_Message { + if x != nil { + return x.Message + } + return nil +} + +func (x *SessionStoreResponse) GetHelloOk() *SessionHelloOk { + if x != nil { + if x, ok := x.Message.(*SessionStoreResponse_HelloOk); ok { + return x.HelloOk + } + } + return nil +} + +func (x *SessionStoreResponse) GetColumns() *SessionColumns { + if x != nil { + if x, ok := x.Message.(*SessionStoreResponse_Columns); ok { + return x.Columns + } + } + return nil +} + +func (x *SessionStoreResponse) GetRowBatch() *SessionRowBatch { + if x != nil { + if x, ok := x.Message.(*SessionStoreResponse_RowBatch); ok { + return x.RowBatch + } + } + return nil +} + +func (x *SessionStoreResponse) GetExecResult() *SessionExecResult { + if x != nil { + if x, ok := x.Message.(*SessionStoreResponse_ExecResult); ok { + return x.ExecResult + } + } + return nil +} + +func (x *SessionStoreResponse) GetDone() *SessionDone { + if x != nil { + if x, ok := x.Message.(*SessionStoreResponse_Done); ok { + return x.Done + } + } + return nil +} + +func (x *SessionStoreResponse) GetError() *SessionStoreError { + if x != nil { + if x, ok := x.Message.(*SessionStoreResponse_Error); ok { + return x.Error + } + } + return nil +} + +func (x *SessionStoreResponse) GetPong() *SessionPong { + if x != nil { + if x, ok := x.Message.(*SessionStoreResponse_Pong); ok { + return x.Pong + } + } + return nil +} + +type isSessionStoreResponse_Message interface { + isSessionStoreResponse_Message() +} + +type SessionStoreResponse_HelloOk struct { + HelloOk *SessionHelloOk `protobuf:"bytes,2,opt,name=hello_ok,json=helloOk,proto3,oneof"` +} + +type SessionStoreResponse_Columns struct { + Columns *SessionColumns `protobuf:"bytes,3,opt,name=columns,proto3,oneof"` +} + +type SessionStoreResponse_RowBatch struct { + RowBatch *SessionRowBatch `protobuf:"bytes,4,opt,name=row_batch,json=rowBatch,proto3,oneof"` +} + +type SessionStoreResponse_ExecResult struct { + ExecResult *SessionExecResult `protobuf:"bytes,5,opt,name=exec_result,json=execResult,proto3,oneof"` +} + +type SessionStoreResponse_Done struct { + Done *SessionDone `protobuf:"bytes,6,opt,name=done,proto3,oneof"` +} + +type SessionStoreResponse_Error struct { + Error *SessionStoreError `protobuf:"bytes,7,opt,name=error,proto3,oneof"` +} + +type SessionStoreResponse_Pong struct { + Pong *SessionPong `protobuf:"bytes,8,opt,name=pong,proto3,oneof"` +} + +func (*SessionStoreResponse_HelloOk) isSessionStoreResponse_Message() {} + +func (*SessionStoreResponse_Columns) isSessionStoreResponse_Message() {} + +func (*SessionStoreResponse_RowBatch) isSessionStoreResponse_Message() {} + +func (*SessionStoreResponse_ExecResult) isSessionStoreResponse_Message() {} + +func (*SessionStoreResponse_Done) isSessionStoreResponse_Message() {} + +func (*SessionStoreResponse_Error) isSessionStoreResponse_Message() {} + +func (*SessionStoreResponse_Pong) isSessionStoreResponse_Message() {} + +// SessionValue mirrors SQLite's five storage classes exactly. +type SessionValue struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Value: + // + // *SessionValue_NullValue + // *SessionValue_IntValue + // *SessionValue_DoubleValue + // *SessionValue_TextValue + // *SessionValue_BlobValue + Value isSessionValue_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionValue) Reset() { + *x = SessionValue{} + mi := &file_livekit_agent_session_db_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionValue) ProtoMessage() {} + +func (x *SessionValue) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionValue.ProtoReflect.Descriptor instead. +func (*SessionValue) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{2} +} + +func (x *SessionValue) GetValue() isSessionValue_Value { + if x != nil { + return x.Value + } + return nil +} + +func (x *SessionValue) GetNullValue() bool { + if x != nil { + if x, ok := x.Value.(*SessionValue_NullValue); ok { + return x.NullValue + } + } + return false +} + +func (x *SessionValue) GetIntValue() int64 { + if x != nil { + if x, ok := x.Value.(*SessionValue_IntValue); ok { + return x.IntValue + } + } + return 0 +} + +func (x *SessionValue) GetDoubleValue() float64 { + if x != nil { + if x, ok := x.Value.(*SessionValue_DoubleValue); ok { + return x.DoubleValue + } + } + return 0 +} + +func (x *SessionValue) GetTextValue() string { + if x != nil { + if x, ok := x.Value.(*SessionValue_TextValue); ok { + return x.TextValue + } + } + return "" +} + +func (x *SessionValue) GetBlobValue() []byte { + if x != nil { + if x, ok := x.Value.(*SessionValue_BlobValue); ok { + return x.BlobValue + } + } + return nil +} + +type isSessionValue_Value interface { + isSessionValue_Value() +} + +type SessionValue_NullValue struct { + NullValue bool `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,oneof"` // always true when set +} + +type SessionValue_IntValue struct { + IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` +} + +type SessionValue_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"` +} + +type SessionValue_TextValue struct { + TextValue string `protobuf:"bytes,4,opt,name=text_value,json=textValue,proto3,oneof"` +} + +type SessionValue_BlobValue struct { + BlobValue []byte `protobuf:"bytes,5,opt,name=blob_value,json=blobValue,proto3,oneof"` +} + +func (*SessionValue_NullValue) isSessionValue_Value() {} + +func (*SessionValue_IntValue) isSessionValue_Value() {} + +func (*SessionValue_DoubleValue) isSessionValue_Value() {} + +func (*SessionValue_TextValue) isSessionValue_Value() {} + +func (*SessionValue_BlobValue) isSessionValue_Value() {} + +type SessionStatement struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` // statement text in the selected lang + Params []*SessionValue `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` // positional bind parameters + Lang SessionQueryLang `protobuf:"varint,3,opt,name=lang,proto3,enum=livekit.SessionQueryLang" json:"lang,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionStatement) Reset() { + *x = SessionStatement{} + mi := &file_livekit_agent_session_db_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionStatement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionStatement) ProtoMessage() {} + +func (x *SessionStatement) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionStatement.ProtoReflect.Descriptor instead. +func (*SessionStatement) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{3} +} + +func (x *SessionStatement) GetSql() string { + if x != nil { + return x.Sql + } + return "" +} + +func (x *SessionStatement) GetParams() []*SessionValue { + if x != nil { + return x.Params + } + return nil +} + +func (x *SessionStatement) GetLang() SessionQueryLang { + if x != nil { + return x.Lang + } + return SessionQueryLang_SESSION_QUERY_LANG_SQL +} + +type SessionBatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + Statements []*SessionStatement `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"` // applied atomically, in order + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionBatch) Reset() { + *x = SessionBatch{} + mi := &file_livekit_agent_session_db_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionBatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionBatch) ProtoMessage() {} + +func (x *SessionBatch) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionBatch.ProtoReflect.Descriptor instead. +func (*SessionBatch) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{4} +} + +func (x *SessionBatch) GetStatements() []*SessionStatement { + if x != nil { + return x.Statements + } + return nil +} + +type SessionBegin struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionBegin) Reset() { + *x = SessionBegin{} + mi := &file_livekit_agent_session_db_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionBegin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionBegin) ProtoMessage() {} + +func (x *SessionBegin) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionBegin.ProtoReflect.Descriptor instead. +func (*SessionBegin) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{5} +} + +type SessionCommit struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionCommit) Reset() { + *x = SessionCommit{} + mi := &file_livekit_agent_session_db_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionCommit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionCommit) ProtoMessage() {} + +func (x *SessionCommit) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionCommit.ProtoReflect.Descriptor instead. +func (*SessionCommit) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{6} +} + +type SessionRollback struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionRollback) Reset() { + *x = SessionRollback{} + mi := &file_livekit_agent_session_db_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionRollback) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionRollback) ProtoMessage() {} + +func (x *SessionRollback) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionRollback.ProtoReflect.Descriptor instead. +func (*SessionRollback) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{7} +} + +type SessionCancel struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionCancel) Reset() { + *x = SessionCancel{} + mi := &file_livekit_agent_session_db_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionCancel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionCancel) ProtoMessage() {} + +func (x *SessionCancel) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionCancel.ProtoReflect.Descriptor instead. +func (*SessionCancel) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{8} +} + +type SessionCredit struct { + state protoimpl.MessageState `protogen:"open.v1"` + Batches uint32 `protobuf:"varint,1,opt,name=batches,proto3" json:"batches,omitempty"` // additional RowBatch frames the client can absorb + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionCredit) Reset() { + *x = SessionCredit{} + mi := &file_livekit_agent_session_db_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionCredit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionCredit) ProtoMessage() {} + +func (x *SessionCredit) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionCredit.ProtoReflect.Descriptor instead. +func (*SessionCredit) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{9} +} + +func (x *SessionCredit) GetBatches() uint32 { + if x != nil { + return x.Batches + } + return 0 +} + +type SessionPing struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionPing) Reset() { + *x = SessionPing{} + mi := &file_livekit_agent_session_db_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionPing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionPing) ProtoMessage() {} + +func (x *SessionPing) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionPing.ProtoReflect.Descriptor instead. +func (*SessionPing) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{10} +} + +func (x *SessionPing) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type SessionPong struct { + state protoimpl.MessageState `protogen:"open.v1"` + LastPingTimestamp int64 `protobuf:"varint,1,opt,name=last_ping_timestamp,json=lastPingTimestamp,proto3" json:"last_ping_timestamp,omitempty"` + Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionPong) Reset() { + *x = SessionPong{} + mi := &file_livekit_agent_session_db_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionPong) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionPong) ProtoMessage() {} + +func (x *SessionPong) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionPong.ProtoReflect.Descriptor instead. +func (*SessionPong) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{11} +} + +func (x *SessionPong) GetLastPingTimestamp() int64 { + if x != nil { + return x.LastPingTimestamp + } + return 0 +} + +func (x *SessionPong) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type SessionHello struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // access token; authorization is checked here + SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionHello) Reset() { + *x = SessionHello{} + mi := &file_livekit_agent_session_db_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionHello) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionHello) ProtoMessage() {} + +func (x *SessionHello) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionHello.ProtoReflect.Descriptor instead. +func (*SessionHello) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{12} +} + +func (x *SessionHello) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *SessionHello) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +type SessionHelloOk struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence + PingIntervalMs uint32 `protobuf:"varint,2,opt,name=ping_interval_ms,json=pingIntervalMs,proto3" json:"ping_interval_ms,omitempty"` // server-advertised keepalive cadence + PingTimeoutMs uint32 `protobuf:"varint,3,opt,name=ping_timeout_ms,json=pingTimeoutMs,proto3" json:"ping_timeout_ms,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionHelloOk) Reset() { + *x = SessionHelloOk{} + mi := &file_livekit_agent_session_db_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionHelloOk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionHelloOk) ProtoMessage() {} + +func (x *SessionHelloOk) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionHelloOk.ProtoReflect.Descriptor instead. +func (*SessionHelloOk) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{13} +} + +func (x *SessionHelloOk) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +func (x *SessionHelloOk) GetPingIntervalMs() uint32 { + if x != nil { + return x.PingIntervalMs + } + return 0 +} + +func (x *SessionHelloOk) GetPingTimeoutMs() uint32 { + if x != nil { + return x.PingTimeoutMs + } + return 0 +} + +type SessionColumns struct { + state protoimpl.MessageState `protogen:"open.v1"` + Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionColumns) Reset() { + *x = SessionColumns{} + mi := &file_livekit_agent_session_db_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionColumns) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionColumns) ProtoMessage() {} + +func (x *SessionColumns) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionColumns.ProtoReflect.Descriptor instead. +func (*SessionColumns) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{14} +} + +func (x *SessionColumns) GetNames() []string { + if x != nil { + return x.Names + } + return nil +} + +type SessionRow struct { + state protoimpl.MessageState `protogen:"open.v1"` + Values []*SessionValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionRow) Reset() { + *x = SessionRow{} + mi := &file_livekit_agent_session_db_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionRow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionRow) ProtoMessage() {} + +func (x *SessionRow) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionRow.ProtoReflect.Descriptor instead. +func (*SessionRow) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{15} +} + +func (x *SessionRow) GetValues() []*SessionValue { + if x != nil { + return x.Values + } + return nil +} + +type SessionRowBatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + Rows []*SessionRow `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionRowBatch) Reset() { + *x = SessionRowBatch{} + mi := &file_livekit_agent_session_db_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionRowBatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionRowBatch) ProtoMessage() {} + +func (x *SessionRowBatch) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionRowBatch.ProtoReflect.Descriptor instead. +func (*SessionRowBatch) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{16} +} + +func (x *SessionRowBatch) GetRows() []*SessionRow { + if x != nil { + return x.Rows + } + return nil +} + +type SessionExecResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + RowsAffected int64 `protobuf:"varint,1,opt,name=rows_affected,json=rowsAffected,proto3" json:"rows_affected,omitempty"` + LastInsertId int64 `protobuf:"varint,2,opt,name=last_insert_id,json=lastInsertId,proto3" json:"last_insert_id,omitempty"` + Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // durable commit sequence after this exec + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionExecResult) Reset() { + *x = SessionExecResult{} + mi := &file_livekit_agent_session_db_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionExecResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionExecResult) ProtoMessage() {} + +func (x *SessionExecResult) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionExecResult.ProtoReflect.Descriptor instead. +func (*SessionExecResult) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{17} +} + +func (x *SessionExecResult) GetRowsAffected() int64 { + if x != nil { + return x.RowsAffected + } + return 0 +} + +func (x *SessionExecResult) GetLastInsertId() int64 { + if x != nil { + return x.LastInsertId + } + return 0 +} + +func (x *SessionExecResult) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +type SessionDone struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // snapshot the query ran at + TotalRows uint64 `protobuf:"varint,2,opt,name=total_rows,json=totalRows,proto3" json:"total_rows,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionDone) Reset() { + *x = SessionDone{} + mi := &file_livekit_agent_session_db_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionDone) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionDone) ProtoMessage() {} + +func (x *SessionDone) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionDone.ProtoReflect.Descriptor instead. +func (*SessionDone) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{18} +} + +func (x *SessionDone) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +func (x *SessionDone) GetTotalRows() uint64 { + if x != nil { + return x.TotalRows + } + return 0 +} + +type SessionStoreError struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // stable machine-readable code + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionStoreError) Reset() { + *x = SessionStoreError{} + mi := &file_livekit_agent_session_db_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionStoreError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionStoreError) ProtoMessage() {} + +func (x *SessionStoreError) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_db_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionStoreError.ProtoReflect.Descriptor instead. +func (*SessionStoreError) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{19} +} + +func (x *SessionStoreError) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *SessionStoreError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_livekit_agent_session_db_proto protoreflect.FileDescriptor + +const file_livekit_agent_session_db_proto_rawDesc = "" + + "\n" + + "\x1elivekit_agent_session_db.proto\x12\alivekit\"\xaa\x04\n" + + "\x13SessionStoreRequest\x12\x1d\n" + + "\n" + + "request_id\x18\x01 \x01(\rR\trequestId\x12-\n" + + "\x05hello\x18\x02 \x01(\v2\x15.livekit.SessionHelloH\x00R\x05hello\x12/\n" + + "\x04exec\x18\x03 \x01(\v2\x19.livekit.SessionStatementH\x00R\x04exec\x121\n" + + "\x05query\x18\x04 \x01(\v2\x19.livekit.SessionStatementH\x00R\x05query\x12-\n" + + "\x05batch\x18\x05 \x01(\v2\x15.livekit.SessionBatchH\x00R\x05batch\x12-\n" + + "\x05begin\x18\x06 \x01(\v2\x15.livekit.SessionBeginH\x00R\x05begin\x120\n" + + "\x06commit\x18\a \x01(\v2\x16.livekit.SessionCommitH\x00R\x06commit\x126\n" + + "\brollback\x18\b \x01(\v2\x18.livekit.SessionRollbackH\x00R\brollback\x120\n" + + "\x06cancel\x18\t \x01(\v2\x16.livekit.SessionCancelH\x00R\x06cancel\x120\n" + + "\x06credit\x18\n" + + " \x01(\v2\x16.livekit.SessionCreditH\x00R\x06credit\x12*\n" + + "\x04ping\x18\v \x01(\v2\x14.livekit.SessionPingH\x00R\x04pingB\t\n" + + "\amessage\"\xaf\x03\n" + + "\x14SessionStoreResponse\x12\x1d\n" + + "\n" + + "request_id\x18\x01 \x01(\rR\trequestId\x124\n" + + "\bhello_ok\x18\x02 \x01(\v2\x17.livekit.SessionHelloOkH\x00R\ahelloOk\x123\n" + + "\acolumns\x18\x03 \x01(\v2\x17.livekit.SessionColumnsH\x00R\acolumns\x127\n" + + "\trow_batch\x18\x04 \x01(\v2\x18.livekit.SessionRowBatchH\x00R\browBatch\x12=\n" + + "\vexec_result\x18\x05 \x01(\v2\x1a.livekit.SessionExecResultH\x00R\n" + + "execResult\x12*\n" + + "\x04done\x18\x06 \x01(\v2\x14.livekit.SessionDoneH\x00R\x04done\x122\n" + + "\x05error\x18\a \x01(\v2\x1a.livekit.SessionStoreErrorH\x00R\x05error\x12*\n" + + "\x04pong\x18\b \x01(\v2\x14.livekit.SessionPongH\x00R\x04pongB\t\n" + + "\amessage\"\xbe\x01\n" + + "\fSessionValue\x12\x1f\n" + + "\n" + + "null_value\x18\x01 \x01(\bH\x00R\tnullValue\x12\x1d\n" + + "\tint_value\x18\x02 \x01(\x03H\x00R\bintValue\x12#\n" + + "\fdouble_value\x18\x03 \x01(\x01H\x00R\vdoubleValue\x12\x1f\n" + + "\n" + + "text_value\x18\x04 \x01(\tH\x00R\ttextValue\x12\x1f\n" + + "\n" + + "blob_value\x18\x05 \x01(\fH\x00R\tblobValueB\a\n" + + "\x05value\"\x82\x01\n" + + "\x10SessionStatement\x12\x10\n" + + "\x03sql\x18\x01 \x01(\tR\x03sql\x12-\n" + + "\x06params\x18\x02 \x03(\v2\x15.livekit.SessionValueR\x06params\x12-\n" + + "\x04lang\x18\x03 \x01(\x0e2\x19.livekit.SessionQueryLangR\x04lang\"I\n" + + "\fSessionBatch\x129\n" + + "\n" + + "statements\x18\x01 \x03(\v2\x19.livekit.SessionStatementR\n" + + "statements\"\x0e\n" + + "\fSessionBegin\"\x0f\n" + + "\rSessionCommit\"\x11\n" + + "\x0fSessionRollback\"\x0f\n" + + "\rSessionCancel\")\n" + + "\rSessionCredit\x12\x18\n" + + "\abatches\x18\x01 \x01(\rR\abatches\"+\n" + + "\vSessionPing\x12\x1c\n" + + "\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\"[\n" + + "\vSessionPong\x12.\n" + + "\x13last_ping_timestamp\x18\x01 \x01(\x03R\x11lastPingTimestamp\x12\x1c\n" + + "\ttimestamp\x18\x02 \x01(\x03R\ttimestamp\"C\n" + + "\fSessionHello\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\x12\x1d\n" + + "\n" + + "session_id\x18\x02 \x01(\tR\tsessionId\"t\n" + + "\x0eSessionHelloOk\x12\x10\n" + + "\x03tip\x18\x01 \x01(\x03R\x03tip\x12(\n" + + "\x10ping_interval_ms\x18\x02 \x01(\rR\x0epingIntervalMs\x12&\n" + + "\x0fping_timeout_ms\x18\x03 \x01(\rR\rpingTimeoutMs\"&\n" + + "\x0eSessionColumns\x12\x14\n" + + "\x05names\x18\x01 \x03(\tR\x05names\";\n" + + "\n" + + "SessionRow\x12-\n" + + "\x06values\x18\x01 \x03(\v2\x15.livekit.SessionValueR\x06values\":\n" + + "\x0fSessionRowBatch\x12'\n" + + "\x04rows\x18\x01 \x03(\v2\x13.livekit.SessionRowR\x04rows\"p\n" + + "\x11SessionExecResult\x12#\n" + + "\rrows_affected\x18\x01 \x01(\x03R\frowsAffected\x12$\n" + + "\x0elast_insert_id\x18\x02 \x01(\x03R\flastInsertId\x12\x10\n" + + "\x03tip\x18\x03 \x01(\x03R\x03tip\">\n" + + "\vSessionDone\x12\x10\n" + + "\x03tip\x18\x01 \x01(\x03R\x03tip\x12\x1d\n" + + "\n" + + "total_rows\x18\x02 \x01(\x04R\ttotalRows\"A\n" + + "\x11SessionStoreError\x12\x12\n" + + "\x04code\x18\x01 \x01(\tR\x04code\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage*M\n" + + "\x10SessionQueryLang\x12\x1a\n" + + "\x16SESSION_QUERY_LANG_SQL\x10\x00\x12\x1d\n" + + "\x19SESSION_QUERY_LANG_CYPHER\x10\x01BFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" + +var ( + file_livekit_agent_session_db_proto_rawDescOnce sync.Once + file_livekit_agent_session_db_proto_rawDescData []byte +) + +func file_livekit_agent_session_db_proto_rawDescGZIP() []byte { + file_livekit_agent_session_db_proto_rawDescOnce.Do(func() { + file_livekit_agent_session_db_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_livekit_agent_session_db_proto_rawDesc), len(file_livekit_agent_session_db_proto_rawDesc))) + }) + return file_livekit_agent_session_db_proto_rawDescData +} + +var file_livekit_agent_session_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_livekit_agent_session_db_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_livekit_agent_session_db_proto_goTypes = []any{ + (SessionQueryLang)(0), // 0: livekit.SessionQueryLang + (*SessionStoreRequest)(nil), // 1: livekit.SessionStoreRequest + (*SessionStoreResponse)(nil), // 2: livekit.SessionStoreResponse + (*SessionValue)(nil), // 3: livekit.SessionValue + (*SessionStatement)(nil), // 4: livekit.SessionStatement + (*SessionBatch)(nil), // 5: livekit.SessionBatch + (*SessionBegin)(nil), // 6: livekit.SessionBegin + (*SessionCommit)(nil), // 7: livekit.SessionCommit + (*SessionRollback)(nil), // 8: livekit.SessionRollback + (*SessionCancel)(nil), // 9: livekit.SessionCancel + (*SessionCredit)(nil), // 10: livekit.SessionCredit + (*SessionPing)(nil), // 11: livekit.SessionPing + (*SessionPong)(nil), // 12: livekit.SessionPong + (*SessionHello)(nil), // 13: livekit.SessionHello + (*SessionHelloOk)(nil), // 14: livekit.SessionHelloOk + (*SessionColumns)(nil), // 15: livekit.SessionColumns + (*SessionRow)(nil), // 16: livekit.SessionRow + (*SessionRowBatch)(nil), // 17: livekit.SessionRowBatch + (*SessionExecResult)(nil), // 18: livekit.SessionExecResult + (*SessionDone)(nil), // 19: livekit.SessionDone + (*SessionStoreError)(nil), // 20: livekit.SessionStoreError +} +var file_livekit_agent_session_db_proto_depIdxs = []int32{ + 13, // 0: livekit.SessionStoreRequest.hello:type_name -> livekit.SessionHello + 4, // 1: livekit.SessionStoreRequest.exec:type_name -> livekit.SessionStatement + 4, // 2: livekit.SessionStoreRequest.query:type_name -> livekit.SessionStatement + 5, // 3: livekit.SessionStoreRequest.batch:type_name -> livekit.SessionBatch + 6, // 4: livekit.SessionStoreRequest.begin:type_name -> livekit.SessionBegin + 7, // 5: livekit.SessionStoreRequest.commit:type_name -> livekit.SessionCommit + 8, // 6: livekit.SessionStoreRequest.rollback:type_name -> livekit.SessionRollback + 9, // 7: livekit.SessionStoreRequest.cancel:type_name -> livekit.SessionCancel + 10, // 8: livekit.SessionStoreRequest.credit:type_name -> livekit.SessionCredit + 11, // 9: livekit.SessionStoreRequest.ping:type_name -> livekit.SessionPing + 14, // 10: livekit.SessionStoreResponse.hello_ok:type_name -> livekit.SessionHelloOk + 15, // 11: livekit.SessionStoreResponse.columns:type_name -> livekit.SessionColumns + 17, // 12: livekit.SessionStoreResponse.row_batch:type_name -> livekit.SessionRowBatch + 18, // 13: livekit.SessionStoreResponse.exec_result:type_name -> livekit.SessionExecResult + 19, // 14: livekit.SessionStoreResponse.done:type_name -> livekit.SessionDone + 20, // 15: livekit.SessionStoreResponse.error:type_name -> livekit.SessionStoreError + 12, // 16: livekit.SessionStoreResponse.pong:type_name -> livekit.SessionPong + 3, // 17: livekit.SessionStatement.params:type_name -> livekit.SessionValue + 0, // 18: livekit.SessionStatement.lang:type_name -> livekit.SessionQueryLang + 4, // 19: livekit.SessionBatch.statements:type_name -> livekit.SessionStatement + 3, // 20: livekit.SessionRow.values:type_name -> livekit.SessionValue + 16, // 21: livekit.SessionRowBatch.rows:type_name -> livekit.SessionRow + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_livekit_agent_session_db_proto_init() } +func file_livekit_agent_session_db_proto_init() { + if File_livekit_agent_session_db_proto != nil { + return + } + file_livekit_agent_session_db_proto_msgTypes[0].OneofWrappers = []any{ + (*SessionStoreRequest_Hello)(nil), + (*SessionStoreRequest_Exec)(nil), + (*SessionStoreRequest_Query)(nil), + (*SessionStoreRequest_Batch)(nil), + (*SessionStoreRequest_Begin)(nil), + (*SessionStoreRequest_Commit)(nil), + (*SessionStoreRequest_Rollback)(nil), + (*SessionStoreRequest_Cancel)(nil), + (*SessionStoreRequest_Credit)(nil), + (*SessionStoreRequest_Ping)(nil), + } + file_livekit_agent_session_db_proto_msgTypes[1].OneofWrappers = []any{ + (*SessionStoreResponse_HelloOk)(nil), + (*SessionStoreResponse_Columns)(nil), + (*SessionStoreResponse_RowBatch)(nil), + (*SessionStoreResponse_ExecResult)(nil), + (*SessionStoreResponse_Done)(nil), + (*SessionStoreResponse_Error)(nil), + (*SessionStoreResponse_Pong)(nil), + } + file_livekit_agent_session_db_proto_msgTypes[2].OneofWrappers = []any{ + (*SessionValue_NullValue)(nil), + (*SessionValue_IntValue)(nil), + (*SessionValue_DoubleValue)(nil), + (*SessionValue_TextValue)(nil), + (*SessionValue_BlobValue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_agent_session_db_proto_rawDesc), len(file_livekit_agent_session_db_proto_rawDesc)), + NumEnums: 1, + NumMessages: 20, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_livekit_agent_session_db_proto_goTypes, + DependencyIndexes: file_livekit_agent_session_db_proto_depIdxs, + EnumInfos: file_livekit_agent_session_db_proto_enumTypes, + MessageInfos: file_livekit_agent_session_db_proto_msgTypes, + }.Build() + File_livekit_agent_session_db_proto = out.File + file_livekit_agent_session_db_proto_goTypes = nil + file_livekit_agent_session_db_proto_depIdxs = nil +} diff --git a/livekit/livekit_agent_session_store.pb.go b/livekit/livekit_agent_session_store.pb.go new file mode 100644 index 000000000..f32465f69 --- /dev/null +++ b/livekit/livekit_agent_session_store.pb.go @@ -0,0 +1,683 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: livekit_agent_session_store.proto + +package livekit + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateSessionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` // data region the session is stored in + UserAttributes string `protobuf:"bytes,2,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` // opaque JSON metadata for the caller + TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` // per-session TTL, clamped to a hard max; never extended + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateSessionRequest) Reset() { + *x = CreateSessionRequest{} + mi := &file_livekit_agent_session_store_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSessionRequest) ProtoMessage() {} + +func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_store_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead. +func (*CreateSessionRequest) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateSessionRequest) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *CreateSessionRequest) GetUserAttributes() string { + if x != nil { + return x.UserAttributes + } + return "" +} + +func (x *CreateSessionRequest) GetTtlSeconds() int64 { + if x != nil { + return x.TtlSeconds + } + return 0 +} + +type CreateSessionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // "SESS_..." + ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateSessionResponse) Reset() { + *x = CreateSessionResponse{} + mi := &file_livekit_agent_session_store_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateSessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSessionResponse) ProtoMessage() {} + +func (x *CreateSessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_store_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSessionResponse.ProtoReflect.Descriptor instead. +func (*CreateSessionResponse) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateSessionResponse) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +func (x *CreateSessionResponse) GetExpiresAtUnix() int64 { + if x != nil { + return x.ExpiresAtUnix + } + return 0 +} + +type GetSessionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSessionRequest) Reset() { + *x = GetSessionRequest{} + mi := &file_livekit_agent_session_store_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSessionRequest) ProtoMessage() {} + +func (x *GetSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_store_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSessionRequest.ProtoReflect.Descriptor instead. +func (*GetSessionRequest) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{2} +} + +func (x *GetSessionRequest) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +type GetSessionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` + CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` + ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` + Tip int64 `protobuf:"varint,6,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSessionResponse) Reset() { + *x = GetSessionResponse{} + mi := &file_livekit_agent_session_store_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSessionResponse) ProtoMessage() {} + +func (x *GetSessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_store_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSessionResponse.ProtoReflect.Descriptor instead. +func (*GetSessionResponse) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{3} +} + +func (x *GetSessionResponse) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +func (x *GetSessionResponse) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *GetSessionResponse) GetUserAttributes() string { + if x != nil { + return x.UserAttributes + } + return "" +} + +func (x *GetSessionResponse) GetCreatedAtUnix() int64 { + if x != nil { + return x.CreatedAtUnix + } + return 0 +} + +func (x *GetSessionResponse) GetExpiresAtUnix() int64 { + if x != nil { + return x.ExpiresAtUnix + } + return 0 +} + +func (x *GetSessionResponse) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +type ListSessionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // server-clamped + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // opaque cursor from a previous response + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListSessionsRequest) Reset() { + *x = ListSessionsRequest{} + mi := &file_livekit_agent_session_store_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSessionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSessionsRequest) ProtoMessage() {} + +func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_store_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSessionsRequest.ProtoReflect.Descriptor instead. +func (*ListSessionsRequest) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{4} +} + +func (x *ListSessionsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListSessionsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListSessionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sessions []*GetSessionResponse `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // empty when exhausted + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListSessionsResponse) Reset() { + *x = ListSessionsResponse{} + mi := &file_livekit_agent_session_store_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSessionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSessionsResponse) ProtoMessage() {} + +func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_store_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSessionsResponse.ProtoReflect.Descriptor instead. +func (*ListSessionsResponse) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{5} +} + +func (x *ListSessionsResponse) GetSessions() []*GetSessionResponse { + if x != nil { + return x.Sessions + } + return nil +} + +func (x *ListSessionsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type DeleteSessionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteSessionRequest) Reset() { + *x = DeleteSessionRequest{} + mi := &file_livekit_agent_session_store_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSessionRequest) ProtoMessage() {} + +func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_store_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSessionRequest.ProtoReflect.Descriptor instead. +func (*DeleteSessionRequest) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteSessionRequest) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +type DeleteSessionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteSessionResponse) Reset() { + *x = DeleteSessionResponse{} + mi := &file_livekit_agent_session_store_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteSessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSessionResponse) ProtoMessage() {} + +func (x *DeleteSessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_store_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSessionResponse.ProtoReflect.Descriptor instead. +func (*DeleteSessionResponse) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{7} +} + +type DumpSessionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DumpSessionRequest) Reset() { + *x = DumpSessionRequest{} + mi := &file_livekit_agent_session_store_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DumpSessionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DumpSessionRequest) ProtoMessage() {} + +func (x *DumpSessionRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_store_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DumpSessionRequest.ProtoReflect.Descriptor instead. +func (*DumpSessionRequest) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{8} +} + +func (x *DumpSessionRequest) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +type DumpSessionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + DownloadUrl string `protobuf:"bytes,1,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"` // pre-authenticated object-storage URL + ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // URL expiry + Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // commit sequence the dump is consistent at + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DumpSessionResponse) Reset() { + *x = DumpSessionResponse{} + mi := &file_livekit_agent_session_store_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DumpSessionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DumpSessionResponse) ProtoMessage() {} + +func (x *DumpSessionResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_store_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DumpSessionResponse.ProtoReflect.Descriptor instead. +func (*DumpSessionResponse) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{9} +} + +func (x *DumpSessionResponse) GetDownloadUrl() string { + if x != nil { + return x.DownloadUrl + } + return "" +} + +func (x *DumpSessionResponse) GetExpiresAtUnix() int64 { + if x != nil { + return x.ExpiresAtUnix + } + return 0 +} + +func (x *DumpSessionResponse) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +var File_livekit_agent_session_store_proto protoreflect.FileDescriptor + +const file_livekit_agent_session_store_proto_rawDesc = "" + + "\n" + + "!livekit_agent_session_store.proto\x12\alivekit\"x\n" + + "\x14CreateSessionRequest\x12\x16\n" + + "\x06region\x18\x01 \x01(\tR\x06region\x12'\n" + + "\x0fuser_attributes\x18\x02 \x01(\tR\x0euserAttributes\x12\x1f\n" + + "\vttl_seconds\x18\x03 \x01(\x03R\n" + + "ttlSeconds\"^\n" + + "\x15CreateSessionResponse\x12\x1d\n" + + "\n" + + "session_id\x18\x01 \x01(\tR\tsessionId\x12&\n" + + "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\"2\n" + + "\x11GetSessionRequest\x12\x1d\n" + + "\n" + + "session_id\x18\x01 \x01(\tR\tsessionId\"\xd6\x01\n" + + "\x12GetSessionResponse\x12\x1d\n" + + "\n" + + "session_id\x18\x01 \x01(\tR\tsessionId\x12\x16\n" + + "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + + "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12&\n" + + "\x0fcreated_at_unix\x18\x04 \x01(\x03R\rcreatedAtUnix\x12&\n" + + "\x0fexpires_at_unix\x18\x05 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + + "\x03tip\x18\x06 \x01(\x03R\x03tip\"Q\n" + + "\x13ListSessionsRequest\x12\x1b\n" + + "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x02 \x01(\tR\tpageToken\"w\n" + + "\x14ListSessionsResponse\x127\n" + + "\bsessions\x18\x01 \x03(\v2\x1b.livekit.GetSessionResponseR\bsessions\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"5\n" + + "\x14DeleteSessionRequest\x12\x1d\n" + + "\n" + + "session_id\x18\x01 \x01(\tR\tsessionId\"\x17\n" + + "\x15DeleteSessionResponse\"3\n" + + "\x12DumpSessionRequest\x12\x1d\n" + + "\n" + + "session_id\x18\x01 \x01(\tR\tsessionId\"r\n" + + "\x13DumpSessionResponse\x12!\n" + + "\fdownload_url\x18\x01 \x01(\tR\vdownloadUrl\x12&\n" + + "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + + "\x03tip\x18\x03 \x01(\x03R\x03tip2\x8a\x03\n" + + "\x11AgentSessionStore\x12N\n" + + "\rCreateSession\x12\x1d.livekit.CreateSessionRequest\x1a\x1e.livekit.CreateSessionResponse\x12E\n" + + "\n" + + "GetSession\x12\x1a.livekit.GetSessionRequest\x1a\x1b.livekit.GetSessionResponse\x12K\n" + + "\fListSessions\x12\x1c.livekit.ListSessionsRequest\x1a\x1d.livekit.ListSessionsResponse\x12N\n" + + "\rDeleteSession\x12\x1d.livekit.DeleteSessionRequest\x1a\x1e.livekit.DeleteSessionResponse\x12A\n" + + "\x04Dump\x12\x1b.livekit.DumpSessionRequest\x1a\x1c.livekit.DumpSessionResponseBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" + +var ( + file_livekit_agent_session_store_proto_rawDescOnce sync.Once + file_livekit_agent_session_store_proto_rawDescData []byte +) + +func file_livekit_agent_session_store_proto_rawDescGZIP() []byte { + file_livekit_agent_session_store_proto_rawDescOnce.Do(func() { + file_livekit_agent_session_store_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_livekit_agent_session_store_proto_rawDesc), len(file_livekit_agent_session_store_proto_rawDesc))) + }) + return file_livekit_agent_session_store_proto_rawDescData +} + +var file_livekit_agent_session_store_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_livekit_agent_session_store_proto_goTypes = []any{ + (*CreateSessionRequest)(nil), // 0: livekit.CreateSessionRequest + (*CreateSessionResponse)(nil), // 1: livekit.CreateSessionResponse + (*GetSessionRequest)(nil), // 2: livekit.GetSessionRequest + (*GetSessionResponse)(nil), // 3: livekit.GetSessionResponse + (*ListSessionsRequest)(nil), // 4: livekit.ListSessionsRequest + (*ListSessionsResponse)(nil), // 5: livekit.ListSessionsResponse + (*DeleteSessionRequest)(nil), // 6: livekit.DeleteSessionRequest + (*DeleteSessionResponse)(nil), // 7: livekit.DeleteSessionResponse + (*DumpSessionRequest)(nil), // 8: livekit.DumpSessionRequest + (*DumpSessionResponse)(nil), // 9: livekit.DumpSessionResponse +} +var file_livekit_agent_session_store_proto_depIdxs = []int32{ + 3, // 0: livekit.ListSessionsResponse.sessions:type_name -> livekit.GetSessionResponse + 0, // 1: livekit.AgentSessionStore.CreateSession:input_type -> livekit.CreateSessionRequest + 2, // 2: livekit.AgentSessionStore.GetSession:input_type -> livekit.GetSessionRequest + 4, // 3: livekit.AgentSessionStore.ListSessions:input_type -> livekit.ListSessionsRequest + 6, // 4: livekit.AgentSessionStore.DeleteSession:input_type -> livekit.DeleteSessionRequest + 8, // 5: livekit.AgentSessionStore.Dump:input_type -> livekit.DumpSessionRequest + 1, // 6: livekit.AgentSessionStore.CreateSession:output_type -> livekit.CreateSessionResponse + 3, // 7: livekit.AgentSessionStore.GetSession:output_type -> livekit.GetSessionResponse + 5, // 8: livekit.AgentSessionStore.ListSessions:output_type -> livekit.ListSessionsResponse + 7, // 9: livekit.AgentSessionStore.DeleteSession:output_type -> livekit.DeleteSessionResponse + 9, // 10: livekit.AgentSessionStore.Dump:output_type -> livekit.DumpSessionResponse + 6, // [6:11] is the sub-list for method output_type + 1, // [1:6] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_livekit_agent_session_store_proto_init() } +func file_livekit_agent_session_store_proto_init() { + if File_livekit_agent_session_store_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_agent_session_store_proto_rawDesc), len(file_livekit_agent_session_store_proto_rawDesc)), + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_livekit_agent_session_store_proto_goTypes, + DependencyIndexes: file_livekit_agent_session_store_proto_depIdxs, + MessageInfos: file_livekit_agent_session_store_proto_msgTypes, + }.Build() + File_livekit_agent_session_store_proto = out.File + file_livekit_agent_session_store_proto_goTypes = nil + file_livekit_agent_session_store_proto_depIdxs = nil +} diff --git a/livekit/livekit_agent_session_store.twirp.go b/livekit/livekit_agent_session_store.twirp.go new file mode 100644 index 000000000..4577e11cb --- /dev/null +++ b/livekit/livekit_agent_session_store.twirp.go @@ -0,0 +1,1685 @@ +// Code generated by protoc-gen-twirp v8.1.3, DO NOT EDIT. +// source: livekit_agent_session_store.proto + +package livekit + +import context "context" +import fmt "fmt" +import http "net/http" +import io "io" +import json "encoding/json" +import strconv "strconv" +import strings "strings" + +import protojson "google.golang.org/protobuf/encoding/protojson" +import proto "google.golang.org/protobuf/proto" +import twirp "github.com/twitchtv/twirp" +import ctxsetters "github.com/twitchtv/twirp/ctxsetters" + +// Version compatibility assertion. +// If the constant is not defined in the package, that likely means +// the package needs to be updated to work with this generated code. +// See https://twitchtv.github.io/twirp/docs/version_matrix.html +const _ = twirp.TwirpPackageMinVersion_8_1_0 + +// =========================== +// AgentSessionStore Interface +// =========================== + +// AgentSessionStore is the MANAGEMENT plane for per-session SQLite databases: +// lifecycle and export only. All querying goes through the data plane (a +// WebSocket speaking SessionStoreRequest/SessionStoreResponse, defined in +// livekit_agent_session_db.proto). project_id is taken from the authenticated +// principal (access key) on every call, never a request field. +type AgentSessionStore interface { + // CreateSession allocates a new session database. + CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error) + + // GetSession returns session metadata. + GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error) + + // ListSessions pages through the caller's sessions. + ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) + + // DeleteSession removes a session and all its stored data. + DeleteSession(context.Context, *DeleteSessionRequest) (*DeleteSessionResponse, error) + + // Dump exports a consistent full SQLite database file for the session and + // returns a time-limited download URL (object-storage pre-authenticated + // request). Runs off the serving path; never blocks the session's writes. + Dump(context.Context, *DumpSessionRequest) (*DumpSessionResponse, error) +} + +// ================================= +// AgentSessionStore Protobuf Client +// ================================= + +type agentSessionStoreProtobufClient struct { + client HTTPClient + urls [5]string + interceptor twirp.Interceptor + opts twirp.ClientOptions +} + +// NewAgentSessionStoreProtobufClient creates a Protobuf client that implements the AgentSessionStore interface. +// It communicates using Protobuf and can be configured with a custom HTTPClient. +func NewAgentSessionStoreProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) AgentSessionStore { + if c, ok := client.(*http.Client); ok { + client = withoutRedirects(c) + } + + clientOpts := twirp.ClientOptions{} + for _, o := range opts { + o(&clientOpts) + } + + // Using ReadOpt allows backwards and forwards compatibility with new options in the future + literalURLs := false + _ = clientOpts.ReadOpt("literalURLs", &literalURLs) + var pathPrefix string + if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { + pathPrefix = "/twirp" // default prefix + } + + // Build method URLs: []/./ + serviceURL := sanitizeBaseURL(baseURL) + serviceURL += baseServicePath(pathPrefix, "livekit", "AgentSessionStore") + urls := [5]string{ + serviceURL + "CreateSession", + serviceURL + "GetSession", + serviceURL + "ListSessions", + serviceURL + "DeleteSession", + serviceURL + "Dump", + } + + return &agentSessionStoreProtobufClient{ + client: client, + urls: urls, + interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...), + opts: clientOpts, + } +} + +func (c *agentSessionStoreProtobufClient) CreateSession(ctx context.Context, in *CreateSessionRequest) (*CreateSessionResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") + ctx = ctxsetters.WithMethodName(ctx, "CreateSession") + caller := c.callCreateSession + if c.interceptor != nil { + caller = func(ctx context.Context, req *CreateSessionRequest) (*CreateSessionResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*CreateSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*CreateSessionRequest) when calling interceptor") + } + return c.callCreateSession(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*CreateSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*CreateSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentSessionStoreProtobufClient) callCreateSession(ctx context.Context, in *CreateSessionRequest) (*CreateSessionResponse, error) { + out := new(CreateSessionResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentSessionStoreProtobufClient) GetSession(ctx context.Context, in *GetSessionRequest) (*GetSessionResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") + ctx = ctxsetters.WithMethodName(ctx, "GetSession") + caller := c.callGetSession + if c.interceptor != nil { + caller = func(ctx context.Context, req *GetSessionRequest) (*GetSessionResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*GetSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*GetSessionRequest) when calling interceptor") + } + return c.callGetSession(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*GetSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*GetSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentSessionStoreProtobufClient) callGetSession(ctx context.Context, in *GetSessionRequest) (*GetSessionResponse, error) { + out := new(GetSessionResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentSessionStoreProtobufClient) ListSessions(ctx context.Context, in *ListSessionsRequest) (*ListSessionsResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") + ctx = ctxsetters.WithMethodName(ctx, "ListSessions") + caller := c.callListSessions + if c.interceptor != nil { + caller = func(ctx context.Context, req *ListSessionsRequest) (*ListSessionsResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*ListSessionsRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*ListSessionsRequest) when calling interceptor") + } + return c.callListSessions(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*ListSessionsResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*ListSessionsResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentSessionStoreProtobufClient) callListSessions(ctx context.Context, in *ListSessionsRequest) (*ListSessionsResponse, error) { + out := new(ListSessionsResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentSessionStoreProtobufClient) DeleteSession(ctx context.Context, in *DeleteSessionRequest) (*DeleteSessionResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") + ctx = ctxsetters.WithMethodName(ctx, "DeleteSession") + caller := c.callDeleteSession + if c.interceptor != nil { + caller = func(ctx context.Context, req *DeleteSessionRequest) (*DeleteSessionResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DeleteSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DeleteSessionRequest) when calling interceptor") + } + return c.callDeleteSession(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DeleteSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DeleteSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentSessionStoreProtobufClient) callDeleteSession(ctx context.Context, in *DeleteSessionRequest) (*DeleteSessionResponse, error) { + out := new(DeleteSessionResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentSessionStoreProtobufClient) Dump(ctx context.Context, in *DumpSessionRequest) (*DumpSessionResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") + ctx = ctxsetters.WithMethodName(ctx, "Dump") + caller := c.callDump + if c.interceptor != nil { + caller = func(ctx context.Context, req *DumpSessionRequest) (*DumpSessionResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DumpSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DumpSessionRequest) when calling interceptor") + } + return c.callDump(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DumpSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DumpSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentSessionStoreProtobufClient) callDump(ctx context.Context, in *DumpSessionRequest) (*DumpSessionResponse, error) { + out := new(DumpSessionResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +// ============================= +// AgentSessionStore JSON Client +// ============================= + +type agentSessionStoreJSONClient struct { + client HTTPClient + urls [5]string + interceptor twirp.Interceptor + opts twirp.ClientOptions +} + +// NewAgentSessionStoreJSONClient creates a JSON client that implements the AgentSessionStore interface. +// It communicates using JSON and can be configured with a custom HTTPClient. +func NewAgentSessionStoreJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) AgentSessionStore { + if c, ok := client.(*http.Client); ok { + client = withoutRedirects(c) + } + + clientOpts := twirp.ClientOptions{} + for _, o := range opts { + o(&clientOpts) + } + + // Using ReadOpt allows backwards and forwards compatibility with new options in the future + literalURLs := false + _ = clientOpts.ReadOpt("literalURLs", &literalURLs) + var pathPrefix string + if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { + pathPrefix = "/twirp" // default prefix + } + + // Build method URLs: []/./ + serviceURL := sanitizeBaseURL(baseURL) + serviceURL += baseServicePath(pathPrefix, "livekit", "AgentSessionStore") + urls := [5]string{ + serviceURL + "CreateSession", + serviceURL + "GetSession", + serviceURL + "ListSessions", + serviceURL + "DeleteSession", + serviceURL + "Dump", + } + + return &agentSessionStoreJSONClient{ + client: client, + urls: urls, + interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...), + opts: clientOpts, + } +} + +func (c *agentSessionStoreJSONClient) CreateSession(ctx context.Context, in *CreateSessionRequest) (*CreateSessionResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") + ctx = ctxsetters.WithMethodName(ctx, "CreateSession") + caller := c.callCreateSession + if c.interceptor != nil { + caller = func(ctx context.Context, req *CreateSessionRequest) (*CreateSessionResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*CreateSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*CreateSessionRequest) when calling interceptor") + } + return c.callCreateSession(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*CreateSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*CreateSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentSessionStoreJSONClient) callCreateSession(ctx context.Context, in *CreateSessionRequest) (*CreateSessionResponse, error) { + out := new(CreateSessionResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentSessionStoreJSONClient) GetSession(ctx context.Context, in *GetSessionRequest) (*GetSessionResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") + ctx = ctxsetters.WithMethodName(ctx, "GetSession") + caller := c.callGetSession + if c.interceptor != nil { + caller = func(ctx context.Context, req *GetSessionRequest) (*GetSessionResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*GetSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*GetSessionRequest) when calling interceptor") + } + return c.callGetSession(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*GetSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*GetSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentSessionStoreJSONClient) callGetSession(ctx context.Context, in *GetSessionRequest) (*GetSessionResponse, error) { + out := new(GetSessionResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentSessionStoreJSONClient) ListSessions(ctx context.Context, in *ListSessionsRequest) (*ListSessionsResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") + ctx = ctxsetters.WithMethodName(ctx, "ListSessions") + caller := c.callListSessions + if c.interceptor != nil { + caller = func(ctx context.Context, req *ListSessionsRequest) (*ListSessionsResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*ListSessionsRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*ListSessionsRequest) when calling interceptor") + } + return c.callListSessions(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*ListSessionsResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*ListSessionsResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentSessionStoreJSONClient) callListSessions(ctx context.Context, in *ListSessionsRequest) (*ListSessionsResponse, error) { + out := new(ListSessionsResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentSessionStoreJSONClient) DeleteSession(ctx context.Context, in *DeleteSessionRequest) (*DeleteSessionResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") + ctx = ctxsetters.WithMethodName(ctx, "DeleteSession") + caller := c.callDeleteSession + if c.interceptor != nil { + caller = func(ctx context.Context, req *DeleteSessionRequest) (*DeleteSessionResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DeleteSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DeleteSessionRequest) when calling interceptor") + } + return c.callDeleteSession(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DeleteSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DeleteSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentSessionStoreJSONClient) callDeleteSession(ctx context.Context, in *DeleteSessionRequest) (*DeleteSessionResponse, error) { + out := new(DeleteSessionResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentSessionStoreJSONClient) Dump(ctx context.Context, in *DumpSessionRequest) (*DumpSessionResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") + ctx = ctxsetters.WithMethodName(ctx, "Dump") + caller := c.callDump + if c.interceptor != nil { + caller = func(ctx context.Context, req *DumpSessionRequest) (*DumpSessionResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DumpSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DumpSessionRequest) when calling interceptor") + } + return c.callDump(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DumpSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DumpSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentSessionStoreJSONClient) callDump(ctx context.Context, in *DumpSessionRequest) (*DumpSessionResponse, error) { + out := new(DumpSessionResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +// ================================ +// AgentSessionStore Server Handler +// ================================ + +type agentSessionStoreServer struct { + AgentSessionStore + interceptor twirp.Interceptor + hooks *twirp.ServerHooks + pathPrefix string // prefix for routing + jsonSkipDefaults bool // do not include unpopulated fields (default values) in the response + jsonCamelCase bool // JSON fields are serialized as lowerCamelCase rather than keeping the original proto names +} + +// NewAgentSessionStoreServer builds a TwirpServer that can be used as an http.Handler to handle +// HTTP requests that are routed to the right method in the provided svc implementation. +// The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks). +func NewAgentSessionStoreServer(svc AgentSessionStore, opts ...interface{}) TwirpServer { + serverOpts := newServerOpts(opts) + + // Using ReadOpt allows backwards and forwards compatibility with new options in the future + jsonSkipDefaults := false + _ = serverOpts.ReadOpt("jsonSkipDefaults", &jsonSkipDefaults) + jsonCamelCase := false + _ = serverOpts.ReadOpt("jsonCamelCase", &jsonCamelCase) + var pathPrefix string + if ok := serverOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { + pathPrefix = "/twirp" // default prefix + } + + return &agentSessionStoreServer{ + AgentSessionStore: svc, + hooks: serverOpts.Hooks, + interceptor: twirp.ChainInterceptors(serverOpts.Interceptors...), + pathPrefix: pathPrefix, + jsonSkipDefaults: jsonSkipDefaults, + jsonCamelCase: jsonCamelCase, + } +} + +// writeError writes an HTTP response with a valid Twirp error format, and triggers hooks. +// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err) +func (s *agentSessionStoreServer) writeError(ctx context.Context, resp http.ResponseWriter, err error) { + writeError(ctx, resp, err, s.hooks) +} + +// handleRequestBodyError is used to handle error when the twirp server cannot read request +func (s *agentSessionStoreServer) handleRequestBodyError(ctx context.Context, resp http.ResponseWriter, msg string, err error) { + if context.Canceled == ctx.Err() { + s.writeError(ctx, resp, twirp.NewError(twirp.Canceled, "failed to read request: context canceled")) + return + } + if context.DeadlineExceeded == ctx.Err() { + s.writeError(ctx, resp, twirp.NewError(twirp.DeadlineExceeded, "failed to read request: deadline exceeded")) + return + } + s.writeError(ctx, resp, twirp.WrapError(malformedRequestError(msg), err)) +} + +// AgentSessionStorePathPrefix is a convenience constant that may identify URL paths. +// Should be used with caution, it only matches routes generated by Twirp Go clients, +// with the default "/twirp" prefix and default CamelCase service and method names. +// More info: https://twitchtv.github.io/twirp/docs/routing.html +const AgentSessionStorePathPrefix = "/twirp/livekit.AgentSessionStore/" + +func (s *agentSessionStoreServer) ServeHTTP(resp http.ResponseWriter, req *http.Request) { + ctx := req.Context() + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") + ctx = ctxsetters.WithResponseWriter(ctx, resp) + + var err error + ctx, err = callRequestReceived(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + if req.Method != "POST" { + msg := fmt.Sprintf("unsupported method %q (only POST is allowed)", req.Method) + s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) + return + } + + // Verify path format: []/./ + prefix, pkgService, method := parseTwirpPath(req.URL.Path) + if pkgService != "livekit.AgentSessionStore" { + msg := fmt.Sprintf("no handler for path %q", req.URL.Path) + s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) + return + } + if prefix != s.pathPrefix { + msg := fmt.Sprintf("invalid path prefix %q, expected %q, on path %q", prefix, s.pathPrefix, req.URL.Path) + s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) + return + } + + switch method { + case "CreateSession": + s.serveCreateSession(ctx, resp, req) + return + case "GetSession": + s.serveGetSession(ctx, resp, req) + return + case "ListSessions": + s.serveListSessions(ctx, resp, req) + return + case "DeleteSession": + s.serveDeleteSession(ctx, resp, req) + return + case "Dump": + s.serveDump(ctx, resp, req) + return + default: + msg := fmt.Sprintf("no handler for path %q", req.URL.Path) + s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) + return + } +} + +func (s *agentSessionStoreServer) serveCreateSession(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveCreateSessionJSON(ctx, resp, req) + case "application/protobuf": + s.serveCreateSessionProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentSessionStoreServer) serveCreateSessionJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "CreateSession") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(CreateSessionRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentSessionStore.CreateSession + if s.interceptor != nil { + handler = func(ctx context.Context, req *CreateSessionRequest) (*CreateSessionResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*CreateSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*CreateSessionRequest) when calling interceptor") + } + return s.AgentSessionStore.CreateSession(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*CreateSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*CreateSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *CreateSessionResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *CreateSessionResponse and nil error while calling CreateSession. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentSessionStoreServer) serveCreateSessionProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "CreateSession") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(CreateSessionRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentSessionStore.CreateSession + if s.interceptor != nil { + handler = func(ctx context.Context, req *CreateSessionRequest) (*CreateSessionResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*CreateSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*CreateSessionRequest) when calling interceptor") + } + return s.AgentSessionStore.CreateSession(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*CreateSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*CreateSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *CreateSessionResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *CreateSessionResponse and nil error while calling CreateSession. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentSessionStoreServer) serveGetSession(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveGetSessionJSON(ctx, resp, req) + case "application/protobuf": + s.serveGetSessionProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentSessionStoreServer) serveGetSessionJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "GetSession") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(GetSessionRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentSessionStore.GetSession + if s.interceptor != nil { + handler = func(ctx context.Context, req *GetSessionRequest) (*GetSessionResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*GetSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*GetSessionRequest) when calling interceptor") + } + return s.AgentSessionStore.GetSession(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*GetSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*GetSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *GetSessionResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *GetSessionResponse and nil error while calling GetSession. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentSessionStoreServer) serveGetSessionProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "GetSession") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(GetSessionRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentSessionStore.GetSession + if s.interceptor != nil { + handler = func(ctx context.Context, req *GetSessionRequest) (*GetSessionResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*GetSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*GetSessionRequest) when calling interceptor") + } + return s.AgentSessionStore.GetSession(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*GetSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*GetSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *GetSessionResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *GetSessionResponse and nil error while calling GetSession. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentSessionStoreServer) serveListSessions(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveListSessionsJSON(ctx, resp, req) + case "application/protobuf": + s.serveListSessionsProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentSessionStoreServer) serveListSessionsJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "ListSessions") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(ListSessionsRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentSessionStore.ListSessions + if s.interceptor != nil { + handler = func(ctx context.Context, req *ListSessionsRequest) (*ListSessionsResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*ListSessionsRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*ListSessionsRequest) when calling interceptor") + } + return s.AgentSessionStore.ListSessions(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*ListSessionsResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*ListSessionsResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *ListSessionsResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *ListSessionsResponse and nil error while calling ListSessions. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentSessionStoreServer) serveListSessionsProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "ListSessions") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(ListSessionsRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentSessionStore.ListSessions + if s.interceptor != nil { + handler = func(ctx context.Context, req *ListSessionsRequest) (*ListSessionsResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*ListSessionsRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*ListSessionsRequest) when calling interceptor") + } + return s.AgentSessionStore.ListSessions(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*ListSessionsResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*ListSessionsResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *ListSessionsResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *ListSessionsResponse and nil error while calling ListSessions. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentSessionStoreServer) serveDeleteSession(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveDeleteSessionJSON(ctx, resp, req) + case "application/protobuf": + s.serveDeleteSessionProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentSessionStoreServer) serveDeleteSessionJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "DeleteSession") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(DeleteSessionRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentSessionStore.DeleteSession + if s.interceptor != nil { + handler = func(ctx context.Context, req *DeleteSessionRequest) (*DeleteSessionResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DeleteSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DeleteSessionRequest) when calling interceptor") + } + return s.AgentSessionStore.DeleteSession(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DeleteSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DeleteSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *DeleteSessionResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *DeleteSessionResponse and nil error while calling DeleteSession. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentSessionStoreServer) serveDeleteSessionProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "DeleteSession") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(DeleteSessionRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentSessionStore.DeleteSession + if s.interceptor != nil { + handler = func(ctx context.Context, req *DeleteSessionRequest) (*DeleteSessionResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DeleteSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DeleteSessionRequest) when calling interceptor") + } + return s.AgentSessionStore.DeleteSession(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DeleteSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DeleteSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *DeleteSessionResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *DeleteSessionResponse and nil error while calling DeleteSession. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentSessionStoreServer) serveDump(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveDumpJSON(ctx, resp, req) + case "application/protobuf": + s.serveDumpProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentSessionStoreServer) serveDumpJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "Dump") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(DumpSessionRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentSessionStore.Dump + if s.interceptor != nil { + handler = func(ctx context.Context, req *DumpSessionRequest) (*DumpSessionResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DumpSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DumpSessionRequest) when calling interceptor") + } + return s.AgentSessionStore.Dump(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DumpSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DumpSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *DumpSessionResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *DumpSessionResponse and nil error while calling Dump. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentSessionStoreServer) serveDumpProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "Dump") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(DumpSessionRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentSessionStore.Dump + if s.interceptor != nil { + handler = func(ctx context.Context, req *DumpSessionRequest) (*DumpSessionResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DumpSessionRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DumpSessionRequest) when calling interceptor") + } + return s.AgentSessionStore.Dump(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DumpSessionResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DumpSessionResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *DumpSessionResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *DumpSessionResponse and nil error while calling Dump. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentSessionStoreServer) ServiceDescriptor() ([]byte, int) { + return twirpFileDescriptor2, 0 +} + +func (s *agentSessionStoreServer) ProtocGenTwirpVersion() string { + return "v8.1.3" +} + +// PathPrefix returns the base service path, in the form: "//./" +// that is everything in a Twirp route except for the . This can be used for routing, +// for example to identify the requests that are targeted to this service in a mux. +func (s *agentSessionStoreServer) PathPrefix() string { + return baseServicePath(s.pathPrefix, "livekit", "AgentSessionStore") +} + +var twirpFileDescriptor2 = []byte{ + // 567 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdb, 0x6e, 0xd3, 0x40, + 0x10, 0x55, 0xe2, 0x36, 0x34, 0x93, 0xa6, 0xa1, 0xdb, 0x14, 0xa2, 0xb4, 0x81, 0xd4, 0x48, 0x25, + 0x4f, 0xa9, 0x94, 0x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+ 0xae, 0x1d, 0x85, 0x9e, 0xae, 0xab, 0xa4, 0xd8, 0x45, 0xe8, 0x3d, 0x76, 0x7f, 0x53, 0x13, 0x8d, + 0xcc, 0xc4, 0xde, 0x2f, 0x03, 0x36, 0xfb, 0xf1, 0x49, 0xeb, 0xa9, 0x83, 0xf8, 0xa0, 0xd9, 0x19, + 0x54, 0xe7, 0xee, 0x88, 0xb5, 0x32, 0xb9, 0xf3, 0x2e, 0xbb, 0xf9, 0xe2, 0xae, 0xb0, 0xa6, 0xf0, + 0x01, 0x60, 0x6a, 0x13, 0x6b, 0xe6, 0x7a, 0x97, 0x74, 0xba, 0xcf, 0x57, 0x76, 0x02, 0xeb, 0xb3, + 0xeb, 0xc1, 0x76, 0xb3, 0xe4, 0x9c, 0x45, 0x6c, 0xb6, 0xee, 0x88, 0xea, 0x66, 0x67, 0x50, 0x9d, + 0xf3, 0x6e, 0x86, 0x63, 0xde, 0x2a, 0xcc, 0x70, 0xcc, 0xb5, 0x9c, 0xf5, 0x61, 0x25, 0x76, 0x8f, + 0x4d, 0x19, 0x2c, 0x6f, 0x40, 0x73, 0x37, 0x3f, 0x98, 0xb4, 0x78, 0xf7, 0xf1, 0xdb, 0xab, 0x31, + 0xa7, 0x1f, 0xd1, 0xb0, 0x3b, 0x12, 0x57, 0x07, 0x3a, 0xf3, 0x40, 0xfd, 0xbb, 0x8e, 0x84, 0x97, + 0x02, 0xbf, 0x8b, 0xd5, 0x53, 0x7e, 0x8d, 0x27, 0x9c, 0xba, 0xe7, 0x71, 0xe8, 0x6f, 0x71, 0x43, + 0x7f, 0x1f, 0x1d, 0x29, 0x60, 0x58, 0x52, 0x25, 0x87, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x3f, + 0x0b, 0xdd, 0x24, 0xb5, 0x05, 0x00, 0x00, +} diff --git a/livekit/livekit_agent_simulation.twirp.go b/livekit/livekit_agent_simulation.twirp.go index b2d752787..79ee02cf0 100644 --- a/livekit/livekit_agent_simulation.twirp.go +++ b/livekit/livekit_agent_simulation.twirp.go @@ -1897,7 +1897,7 @@ func (s *agentSimulationServer) serveCreateScenarioFromSessionProtobuf(ctx conte } func (s *agentSimulationServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor9, 0 + return twirpFileDescriptor10, 0 } func (s *agentSimulationServer) ProtocGenTwirpVersion() string { @@ -1911,7 +1911,7 @@ func (s *agentSimulationServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "AgentSimulation") } -var twirpFileDescriptor9 = []byte{ +var twirpFileDescriptor10 = []byte{ // 3365 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0x49, 0x76, 0x37, 0x3f, 0x45, 0x3e, 0x8a, 0x1f, 0x2a, 0xc9, 0x32, 0xdd, 0xb3, 0x9e, 0x91, 0x3d, 0x33, diff --git a/livekit/livekit_cloud_agent.twirp.go b/livekit/livekit_cloud_agent.twirp.go index 27ce9a912..689ae25bc 100644 --- a/livekit/livekit_cloud_agent.twirp.go +++ b/livekit/livekit_cloud_agent.twirp.go @@ -5245,7 +5245,7 @@ func (s *cloudAgentServer) serveGetPrivateLinkStatusProtobuf(ctx context.Context } func (s *cloudAgentServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor6, 0 + return twirpFileDescriptor7, 0 } func (s *cloudAgentServer) ProtocGenTwirpVersion() string { @@ -5259,7 +5259,7 @@ func (s *cloudAgentServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "CloudAgent") } -var twirpFileDescriptor6 = []byte{ +var twirpFileDescriptor7 = []byte{ // 2600 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x6f, 0x1b, 0x4b, 0xf9, 0xcf, 0xfa, 0x2d, 0xf6, 0xe3, 0xb8, 0x71, 0x26, 0x69, 0xea, 0x38, 0x49, 0x9b, 0x6c, 0xdb, diff --git a/livekit/livekit_connector.twirp.go b/livekit/livekit_connector.twirp.go index d88f01c00..472bc090a 100644 --- a/livekit/livekit_connector.twirp.go +++ b/livekit/livekit_connector.twirp.go @@ -1618,7 +1618,7 @@ func (s *connectorServer) serveConnectTwilioCallProtobuf(ctx context.Context, re } func (s *connectorServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor8, 0 + return twirpFileDescriptor9, 0 } func (s *connectorServer) ProtocGenTwirpVersion() string { @@ -1632,7 +1632,7 @@ func (s *connectorServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "Connector") } -var twirpFileDescriptor8 = []byte{ +var twirpFileDescriptor9 = []byte{ // 313 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x4b, 0xf3, 0x30, 0x1c, 0xc6, 0xdf, 0xb7, 0xc2, 0xd4, 0xbf, 0x4e, 0x6b, 0x04, 0x85, 0x1e, 0x64, 0x5b, 0x45, 0xc1, diff --git a/livekit/livekit_egress.twirp.go b/livekit/livekit_egress.twirp.go index df5542a5a..86cf46b7c 100644 --- a/livekit/livekit_egress.twirp.go +++ b/livekit/livekit_egress.twirp.go @@ -3019,7 +3019,7 @@ func (s *egressServer) serveStartTrackEgressProtobuf(ctx context.Context, resp h } func (s *egressServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor2, 0 + return twirpFileDescriptor3, 0 } func (s *egressServer) ProtocGenTwirpVersion() string { @@ -3033,7 +3033,7 @@ func (s *egressServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "Egress") } -var twirpFileDescriptor2 = []byte{ +var twirpFileDescriptor3 = []byte{ // 4257 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3b, 0x4b, 0x70, 0x1c, 0x59, 0x52, 0xaa, 0xea, 0x7f, 0xf6, 0xaf, 0xf4, 0x24, 0x6b, 0xda, 0xf2, 0x7a, 0xec, 0x6d, 0xef, 0x8c, diff --git a/livekit/livekit_ingress.twirp.go b/livekit/livekit_ingress.twirp.go index fa7244522..acb4d95a2 100644 --- a/livekit/livekit_ingress.twirp.go +++ b/livekit/livekit_ingress.twirp.go @@ -1341,7 +1341,7 @@ func (s *ingressServer) serveDeleteIngressProtobuf(ctx context.Context, resp htt } func (s *ingressServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor3, 0 + return twirpFileDescriptor4, 0 } func (s *ingressServer) ProtocGenTwirpVersion() string { @@ -1355,7 +1355,7 @@ func (s *ingressServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "Ingress") } -var twirpFileDescriptor3 = []byte{ +var twirpFileDescriptor4 = []byte{ // 1620 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x6f, 0xdb, 0xcc, 0x11, 0x36, 0xf5, 0xad, 0x91, 0x25, 0x2b, 0x6b, 0xf9, 0x7d, 0x15, 0x7f, 0xb4, 0x82, 0x92, 0x22, diff --git a/livekit/livekit_phone_number.twirp.go b/livekit/livekit_phone_number.twirp.go index 21c6c897f..9b78d0f35 100644 --- a/livekit/livekit_phone_number.twirp.go +++ b/livekit/livekit_phone_number.twirp.go @@ -1904,7 +1904,7 @@ func (s *phoneNumberServiceServer) serveReleasePhoneNumbersProtobuf(ctx context. } func (s *phoneNumberServiceServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor7, 0 + return twirpFileDescriptor8, 0 } func (s *phoneNumberServiceServer) ProtocGenTwirpVersion() string { @@ -1918,7 +1918,7 @@ func (s *phoneNumberServiceServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "PhoneNumberService") } -var twirpFileDescriptor7 = []byte{ +var twirpFileDescriptor8 = []byte{ // 1241 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0x51, 0x6e, 0xdb, 0x46, 0x13, 0xd6, 0x52, 0xb6, 0x63, 0x8d, 0x64, 0x5b, 0xd9, 0x38, 0x09, 0x4d, 0x27, 0xb1, 0x42, 0xff, diff --git a/livekit/livekit_room.twirp.go b/livekit/livekit_room.twirp.go index eae205ebf..122269f8a 100644 --- a/livekit/livekit_room.twirp.go +++ b/livekit/livekit_room.twirp.go @@ -4152,7 +4152,7 @@ func (s *roomServiceServer) servePerformRpcProtobuf(ctx context.Context, resp ht } func (s *roomServiceServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor4, 0 + return twirpFileDescriptor5, 0 } func (s *roomServiceServer) ProtocGenTwirpVersion() string { @@ -4166,7 +4166,7 @@ func (s *roomServiceServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "RoomService") } -var twirpFileDescriptor4 = []byte{ +var twirpFileDescriptor5 = []byte{ // 1612 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x5b, 0x6f, 0x13, 0xd7, 0x16, 0x3e, 0x4e, 0x6c, 0xc7, 0x5e, 0xce, 0xcd, 0x3b, 0x01, 0x26, 0x13, 0x2e, 0x66, 0xc2, 0x39, diff --git a/livekit/livekit_sip.twirp.go b/livekit/livekit_sip.twirp.go index 3677e1398..3150829ac 100644 --- a/livekit/livekit_sip.twirp.go +++ b/livekit/livekit_sip.twirp.go @@ -4689,7 +4689,7 @@ func (s *sIPServer) serveTransferSIPParticipantProtobuf(ctx context.Context, res } func (s *sIPServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor5, 0 + return twirpFileDescriptor6, 0 } func (s *sIPServer) ProtocGenTwirpVersion() string { @@ -4703,7 +4703,7 @@ func (s *sIPServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "SIP") } -var twirpFileDescriptor5 = []byte{ +var twirpFileDescriptor6 = []byte{ // 5797 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x7c, 0x69, 0x8c, 0x1b, 0xc9, 0x75, 0xb0, 0xc8, 0xe6, 0xcc, 0x70, 0x1e, 0xe7, 0xe8, 0xa9, 0x19, 0x8d, 0xa8, 0xd1, 0x35, 0x4b, diff --git a/magefile.go b/magefile.go index 087bbf623..7f2980770 100644 --- a/magefile.go +++ b/magefile.go @@ -45,6 +45,7 @@ func Proto() error { twirpProtoFiles := []string{ "cloud_replay.proto", "livekit_agent_dispatch.proto", + "livekit_agent_session_store.proto", "livekit_egress.proto", "livekit_ingress.proto", "livekit_room.proto", @@ -66,6 +67,7 @@ func Proto() error { protoFiles := []string{ "livekit_agent.proto", + "livekit_agent_session_db.proto", "livekit_analytics.proto", "livekit_internal.proto", "livekit_models.proto", diff --git a/protobufs/livekit_agent_session_db.proto b/protobufs/livekit_agent_session_db.proto new file mode 100644 index 000000000..2898aaaca --- /dev/null +++ b/protobufs/livekit_agent_session_db.proto @@ -0,0 +1,145 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package livekit; + +option go_package = "github.com/livekit/protocol/livekit"; +option csharp_namespace = "LiveKit.Proto"; +option ruby_package = "LiveKit::Proto"; + +// Data plane for AgentSessionStore session databases: a SQL(+openCypher) +// protocol carried over a WebSocket. One binary-protobuf message per WS +// frame; requests and responses correlate by request_id (monotonic per +// connection, chosen by the client). One WebSocket = one session connection. +// +// Flow control: query results stream as SessionRowBatch frames paced by +// per-request credits (SessionCredit) the client advertises; the server +// never sends more un-consumed batches than granted, so any result size +// streams with bounded memory at every hop. + +message SessionStoreRequest { + uint32 request_id = 1; + oneof message { + SessionHello hello = 2; // must be first on the socket + SessionStatement exec = 3; // no result rows; answers SessionExecResult + SessionStatement query = 4; // answers SessionColumns + SessionRowBatch* + SessionDone + SessionBatch batch = 5; // atomic multi-statement exec + SessionBegin begin = 6; // interactive transaction (server enforces idle/duration timeouts) + SessionCommit commit = 7; + SessionRollback rollback = 8; + SessionCancel cancel = 9; // stop a running query's stream/cursor + SessionCredit credit = 10; // grant more RowBatch credits for request_id + SessionPing ping = 11; + } +} + +message SessionStoreResponse { + uint32 request_id = 1; + oneof message { + SessionHelloOk hello_ok = 2; + SessionColumns columns = 3; + SessionRowBatch row_batch = 4; + SessionExecResult exec_result = 5; + SessionDone done = 6; + SessionStoreError error = 7; + SessionPong pong = 8; + } +} + +// SessionQueryLang selects the query language of a statement; both execute +// against the same session database. +enum SessionQueryLang { + SESSION_QUERY_LANG_SQL = 0; + SESSION_QUERY_LANG_CYPHER = 1; +} + +// SessionValue mirrors SQLite's five storage classes exactly. +message SessionValue { + oneof value { + bool null_value = 1; // always true when set + int64 int_value = 2; + double double_value = 3; + string text_value = 4; + bytes blob_value = 5; + } +} + +message SessionStatement { + string sql = 1; // statement text in the selected lang + repeated SessionValue params = 2; // positional bind parameters + SessionQueryLang lang = 3; +} + +message SessionBatch { + repeated SessionStatement statements = 1; // applied atomically, in order +} + +message SessionBegin {} +message SessionCommit {} +message SessionRollback {} +message SessionCancel {} + +message SessionCredit { + uint32 batches = 1; // additional RowBatch frames the client can absorb +} + +message SessionPing { + int64 timestamp = 1; +} + +message SessionPong { + int64 last_ping_timestamp = 1; + int64 timestamp = 2; +} + +message SessionHello { + string token = 1; // access token; authorization is checked here + string session_id = 2; +} + +message SessionHelloOk { + int64 tip = 1; // latest durable commit sequence + uint32 ping_interval_ms = 2; // server-advertised keepalive cadence + uint32 ping_timeout_ms = 3; +} + +message SessionColumns { + repeated string names = 1; +} + +message SessionRow { + repeated SessionValue values = 1; +} + +message SessionRowBatch { + repeated SessionRow rows = 1; +} + +message SessionExecResult { + int64 rows_affected = 1; + int64 last_insert_id = 2; + int64 tip = 3; // durable commit sequence after this exec +} + +message SessionDone { + int64 tip = 1; // snapshot the query ran at + uint64 total_rows = 2; +} + +message SessionStoreError { + string code = 1; // stable machine-readable code + string message = 2; +} diff --git a/protobufs/livekit_agent_session_store.proto b/protobufs/livekit_agent_session_store.proto new file mode 100644 index 000000000..5c0f046b9 --- /dev/null +++ b/protobufs/livekit_agent_session_store.proto @@ -0,0 +1,95 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package livekit; + +option go_package = "github.com/livekit/protocol/livekit"; +option csharp_namespace = "LiveKit.Proto"; +option ruby_package = "LiveKit::Proto"; + +// AgentSessionStore is the MANAGEMENT plane for per-session SQLite databases: +// lifecycle and export only. All querying goes through the data plane (a +// WebSocket speaking SessionStoreRequest/SessionStoreResponse, defined in +// livekit_agent_session_db.proto). project_id is taken from the authenticated +// principal (access key) on every call, never a request field. +service AgentSessionStore { + // CreateSession allocates a new session database. + rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse); + + // GetSession returns session metadata. + rpc GetSession(GetSessionRequest) returns (GetSessionResponse); + + // ListSessions pages through the caller's sessions. + rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse); + + // DeleteSession removes a session and all its stored data. + rpc DeleteSession(DeleteSessionRequest) returns (DeleteSessionResponse); + + // Dump exports a consistent full SQLite database file for the session and + // returns a time-limited download URL (object-storage pre-authenticated + // request). Runs off the serving path; never blocks the session's writes. + rpc Dump(DumpSessionRequest) returns (DumpSessionResponse); +} + +message CreateSessionRequest { + string region = 1; // data region the session is stored in + string user_attributes = 2; // opaque JSON metadata for the caller + int64 ttl_seconds = 3; // per-session TTL, clamped to a hard max; never extended +} + +message CreateSessionResponse { + string session_id = 1; // "SESS_..." + int64 expires_at_unix = 2; +} + +message GetSessionRequest { + string session_id = 1; +} + +message GetSessionResponse { + string session_id = 1; + string region = 2; + string user_attributes = 3; + int64 created_at_unix = 4; + int64 expires_at_unix = 5; + int64 tip = 6; // latest durable commit sequence +} + +message ListSessionsRequest { + int32 page_size = 1; // server-clamped + string page_token = 2; // opaque cursor from a previous response +} + +message ListSessionsResponse { + repeated GetSessionResponse sessions = 1; + string next_page_token = 2; // empty when exhausted +} + +message DeleteSessionRequest { + string session_id = 1; +} + +message DeleteSessionResponse {} + +message DumpSessionRequest { + string session_id = 1; +} + +message DumpSessionResponse { + string download_url = 1; // pre-authenticated object-storage URL + int64 expires_at_unix = 2; // URL expiry + int64 tip = 3; // commit sequence the dump is consistent at +} From c4cdd6ac5b84a45ffcda8598faee51781ec00475 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 17:41:37 +0000 Subject: [PATCH 02/24] generated protobuf --- livekit/livekit_agent_session_db.pb.go | 2 +- livekit/livekit_agent_session_store.pb.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/livekit/livekit_agent_session_db.pb.go b/livekit/livekit_agent_session_db.pb.go index 40ef02f82..6e02ead27 100644 --- a/livekit/livekit_agent_session_db.pb.go +++ b/livekit/livekit_agent_session_db.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v7.35.1 // source: livekit_agent_session_db.proto package livekit diff --git a/livekit/livekit_agent_session_store.pb.go b/livekit/livekit_agent_session_store.pb.go index f32465f69..729fd663d 100644 --- a/livekit/livekit_agent_session_store.pb.go +++ b/livekit/livekit_agent_session_store.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v7.35.1 // source: livekit_agent_session_store.proto package livekit From 1aeca8889e1c61d8ce359b27590274d841fcbdb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Mon, 27 Jul 2026 10:48:45 -0700 Subject: [PATCH 03/24] Drop rpc comments that only restate the method name Regenerated, so the same lines leave the Go doc comments. --- livekit/livekit_agent_session_store.pb.go | 2 +- livekit/livekit_agent_session_store.twirp.go | 11 ++++------- protobufs/livekit_agent_session_store.proto | 15 +++++---------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/livekit/livekit_agent_session_store.pb.go b/livekit/livekit_agent_session_store.pb.go index 729fd663d..4a69f285d 100644 --- a/livekit/livekit_agent_session_store.pb.go +++ b/livekit/livekit_agent_session_store.pb.go @@ -37,7 +37,7 @@ const ( type CreateSessionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` // data region the session is stored in + Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` UserAttributes string `protobuf:"bytes,2,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` // opaque JSON metadata for the caller TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` // per-session TTL, clamped to a hard max; never extended unknownFields protoimpl.UnknownFields diff --git a/livekit/livekit_agent_session_store.twirp.go b/livekit/livekit_agent_session_store.twirp.go index 4577e11cb..1f70ffb7f 100644 --- a/livekit/livekit_agent_session_store.twirp.go +++ b/livekit/livekit_agent_session_store.twirp.go @@ -32,21 +32,18 @@ const _ = twirp.TwirpPackageMinVersion_8_1_0 // livekit_agent_session_db.proto). project_id is taken from the authenticated // principal (access key) on every call, never a request field. type AgentSessionStore interface { - // CreateSession allocates a new session database. CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error) - // GetSession returns session metadata. GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error) - // ListSessions pages through the caller's sessions. ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) - // DeleteSession removes a session and all its stored data. + // Deletes the stored data too, not just the metadata row. DeleteSession(context.Context, *DeleteSessionRequest) (*DeleteSessionResponse, error) - // Dump exports a consistent full SQLite database file for the session and - // returns a time-limited download URL (object-storage pre-authenticated - // request). Runs off the serving path; never blocks the session's writes. + // Exports a consistent full SQLite database file and returns a time-limited + // download URL (object-storage pre-authenticated request). Runs off the + // serving path; never blocks the session's writes. Dump(context.Context, *DumpSessionRequest) (*DumpSessionResponse, error) } diff --git a/protobufs/livekit_agent_session_store.proto b/protobufs/livekit_agent_session_store.proto index 5c0f046b9..e996fd14c 100644 --- a/protobufs/livekit_agent_session_store.proto +++ b/protobufs/livekit_agent_session_store.proto @@ -26,26 +26,21 @@ option ruby_package = "LiveKit::Proto"; // livekit_agent_session_db.proto). project_id is taken from the authenticated // principal (access key) on every call, never a request field. service AgentSessionStore { - // CreateSession allocates a new session database. rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse); - - // GetSession returns session metadata. rpc GetSession(GetSessionRequest) returns (GetSessionResponse); - - // ListSessions pages through the caller's sessions. rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse); - // DeleteSession removes a session and all its stored data. + // Deletes the stored data too, not just the metadata row. rpc DeleteSession(DeleteSessionRequest) returns (DeleteSessionResponse); - // Dump exports a consistent full SQLite database file for the session and - // returns a time-limited download URL (object-storage pre-authenticated - // request). Runs off the serving path; never blocks the session's writes. + // Exports a consistent full SQLite database file and returns a time-limited + // download URL (object-storage pre-authenticated request). Runs off the + // serving path; never blocks the session's writes. rpc Dump(DumpSessionRequest) returns (DumpSessionResponse); } message CreateSessionRequest { - string region = 1; // data region the session is stored in + string region = 1; string user_attributes = 2; // opaque JSON metadata for the caller int64 ttl_seconds = 3; // per-session TTL, clamped to a hard max; never extended } From bd60d2bf08bd2880ef92d24e25547b52cb4bba14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Tue, 28 Jul 2026 13:19:37 -0700 Subject: [PATCH 04/24] Add AgentGrant.SessionAdmin Gates the agent session store: creating, reading, querying, exporting and deleting a project's session databases, on both the management API and the data-plane connection. Without it that service could only verify that a token was signed by a key belonging to the project, not what it was allowed to do. --- auth/grants.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/auth/grants.go b/auth/grants.go index e50e703ec..646bb0689 100644 --- a/auth/grants.go +++ b/auth/grants.go @@ -581,6 +581,10 @@ type AgentGrant struct { Admin bool `json:"admin,omitempty"` // SimulationAdmin grants access to manage simulations and scenarios for evaluating agents. SimulationAdmin bool `json:"simulationAdmin,omitempty"` + // SessionAdmin grants access to the agent session store: creating, reading, + // querying, exporting and deleting a project's session databases. It gates + // both the management API and the data-plane connection. + SessionAdmin bool `json:"sessionAdmin,omitempty"` } func (s *AgentGrant) Clone() *AgentGrant { @@ -600,6 +604,7 @@ func (s *AgentGrant) MarshalLogObject(e zapcore.ObjectEncoder) error { e.AddBool("Admin", s.Admin) e.AddBool("SimulationAdmin", s.SimulationAdmin) + e.AddBool("SessionAdmin", s.SessionAdmin) return nil } From 376b8e6bdb0e07f2197e6c244dfbf9e4c34132fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Tue, 28 Jul 2026 15:19:07 -0700 Subject: [PATCH 05/24] Column-oriented session results, and drop tip from ListSessions Query results were row-oriented: a SessionValue message per cell plus its oneof wrapper, which cost two allocations per cell on the server, the same again as the client unmarshalled, and left the garbage collector walking pointer-dense batches. A SessionColumnBatch carries a type tag per value (SQLite types values individually, not by column) plus one packed array per storage class, with text and blob bytes concatenated and addressed by exclusive end offsets rather than repeated string, which is what lets a decoder hand out subslices of one buffer. Measured end to end in the service, an 8000-row scan went from 47,819 allocations to 63, and a scalar-heavy batch is 43% smaller on the wire so more rows fit per credit. ListSessions now returns SessionSummary rather than GetSessionResponse, which drops tip from listings. tip advances on every commit, so a listing index cannot carry it without putting a write on the commit path, which means listing has to read every session's metadata row to fill it in. It is also stale on arrival, since anything acting on it must re-read. Everything else listing returns is immutable, so a summary can be served straight from an index. GetSession still returns tip for a single session. A separate message rather than leaving the field unset: 0 is a valid tip, for a session with no commits, so an unset field would be genuinely ambiguous. --- livekit/livekit_agent_session_db.pb.go | 322 +++++++++++++------ livekit/livekit_agent_session_store.pb.go | 173 +++++++--- livekit/livekit_agent_session_store.twirp.go | 75 ++--- protobufs/livekit_agent_session_db.proto | 46 ++- protobufs/livekit_agent_session_store.proto | 17 +- 5 files changed, 452 insertions(+), 181 deletions(-) diff --git a/livekit/livekit_agent_session_db.pb.go b/livekit/livekit_agent_session_db.pb.go index 6e02ead27..6256b6f53 100644 --- a/livekit/livekit_agent_session_db.pb.go +++ b/livekit/livekit_agent_session_db.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.35.1 +// protoc v7.34.1 // source: livekit_agent_session_db.proto package livekit @@ -83,6 +83,62 @@ func (SessionQueryLang) EnumDescriptor() ([]byte, []int) { return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{0} } +// SessionValueType tags one value's storage class within a SessionColumn. +type SessionValueType int32 + +const ( + SessionValueType_SESSION_VALUE_TYPE_NULL SessionValueType = 0 + SessionValueType_SESSION_VALUE_TYPE_INT SessionValueType = 1 + SessionValueType_SESSION_VALUE_TYPE_DOUBLE SessionValueType = 2 + SessionValueType_SESSION_VALUE_TYPE_TEXT SessionValueType = 3 + SessionValueType_SESSION_VALUE_TYPE_BLOB SessionValueType = 4 +) + +// Enum value maps for SessionValueType. +var ( + SessionValueType_name = map[int32]string{ + 0: "SESSION_VALUE_TYPE_NULL", + 1: "SESSION_VALUE_TYPE_INT", + 2: "SESSION_VALUE_TYPE_DOUBLE", + 3: "SESSION_VALUE_TYPE_TEXT", + 4: "SESSION_VALUE_TYPE_BLOB", + } + SessionValueType_value = map[string]int32{ + "SESSION_VALUE_TYPE_NULL": 0, + "SESSION_VALUE_TYPE_INT": 1, + "SESSION_VALUE_TYPE_DOUBLE": 2, + "SESSION_VALUE_TYPE_TEXT": 3, + "SESSION_VALUE_TYPE_BLOB": 4, + } +) + +func (x SessionValueType) Enum() *SessionValueType { + p := new(SessionValueType) + *p = x + return p +} + +func (x SessionValueType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SessionValueType) Descriptor() protoreflect.EnumDescriptor { + return file_livekit_agent_session_db_proto_enumTypes[1].Descriptor() +} + +func (SessionValueType) Type() protoreflect.EnumType { + return &file_livekit_agent_session_db_proto_enumTypes[1] +} + +func (x SessionValueType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SessionValueType.Descriptor instead. +func (SessionValueType) EnumDescriptor() ([]byte, []int) { + return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{1} +} + type SessionStoreRequest struct { state protoimpl.MessageState `protogen:"open.v1"` RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` @@ -250,7 +306,7 @@ type SessionStoreRequest_Exec struct { } type SessionStoreRequest_Query struct { - Query *SessionStatement `protobuf:"bytes,4,opt,name=query,proto3,oneof"` // answers SessionColumns + SessionRowBatch* + SessionDone + Query *SessionStatement `protobuf:"bytes,4,opt,name=query,proto3,oneof"` // answers SessionColumns + SessionColumnBatch* + SessionDone } type SessionStoreRequest_Batch struct { @@ -274,7 +330,7 @@ type SessionStoreRequest_Cancel struct { } type SessionStoreRequest_Credit struct { - Credit *SessionCredit `protobuf:"bytes,10,opt,name=credit,proto3,oneof"` // grant more RowBatch credits for request_id + Credit *SessionCredit `protobuf:"bytes,10,opt,name=credit,proto3,oneof"` // grant more batch credits for request_id } type SessionStoreRequest_Ping struct { @@ -308,7 +364,7 @@ type SessionStoreResponse struct { // // *SessionStoreResponse_HelloOk // *SessionStoreResponse_Columns - // *SessionStoreResponse_RowBatch + // *SessionStoreResponse_ColumnBatch // *SessionStoreResponse_ExecResult // *SessionStoreResponse_Done // *SessionStoreResponse_Error @@ -380,10 +436,10 @@ func (x *SessionStoreResponse) GetColumns() *SessionColumns { return nil } -func (x *SessionStoreResponse) GetRowBatch() *SessionRowBatch { +func (x *SessionStoreResponse) GetColumnBatch() *SessionColumnBatch { if x != nil { - if x, ok := x.Message.(*SessionStoreResponse_RowBatch); ok { - return x.RowBatch + if x, ok := x.Message.(*SessionStoreResponse_ColumnBatch); ok { + return x.ColumnBatch } } return nil @@ -437,8 +493,8 @@ type SessionStoreResponse_Columns struct { Columns *SessionColumns `protobuf:"bytes,3,opt,name=columns,proto3,oneof"` } -type SessionStoreResponse_RowBatch struct { - RowBatch *SessionRowBatch `protobuf:"bytes,4,opt,name=row_batch,json=rowBatch,proto3,oneof"` +type SessionStoreResponse_ColumnBatch struct { + ColumnBatch *SessionColumnBatch `protobuf:"bytes,4,opt,name=column_batch,json=columnBatch,proto3,oneof"` } type SessionStoreResponse_ExecResult struct { @@ -461,7 +517,7 @@ func (*SessionStoreResponse_HelloOk) isSessionStoreResponse_Message() {} func (*SessionStoreResponse_Columns) isSessionStoreResponse_Message() {} -func (*SessionStoreResponse_RowBatch) isSessionStoreResponse_Message() {} +func (*SessionStoreResponse_ColumnBatch) isSessionStoreResponse_Message() {} func (*SessionStoreResponse_ExecResult) isSessionStoreResponse_Message() {} @@ -852,7 +908,7 @@ func (*SessionCancel) Descriptor() ([]byte, []int) { type SessionCredit struct { state protoimpl.MessageState `protogen:"open.v1"` - Batches uint32 `protobuf:"varint,1,opt,name=batches,proto3" json:"batches,omitempty"` // additional RowBatch frames the client can absorb + Batches uint32 `protobuf:"varint,1,opt,name=batches,proto3" json:"batches,omitempty"` // additional batch frames the client can absorb unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1146,27 +1202,45 @@ func (x *SessionColumns) GetNames() []string { return nil } -type SessionRow struct { - state protoimpl.MessageState `protogen:"open.v1"` - Values []*SessionValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +// SessionColumn carries one column of a batch, column-oriented so a result set +// costs a handful of allocations per batch rather than two per cell (a message +// plus a oneof wrapper), and so scalar runs land in pointer-free arrays the +// garbage collector never scans. +// +// SQLite types values individually rather than by column, so `types` tags every +// value and each typed array holds only the values of its own class, in row +// order. Reading a column means walking `types` and taking the next entry from +// the matching array; NULLs occupy a tag and nothing else. +type SessionColumn struct { + state protoimpl.MessageState `protogen:"open.v1"` + Types []byte `protobuf:"bytes,1,opt,name=types,proto3" json:"types,omitempty"` // one SessionValueType per row, one byte each + Ints []int64 `protobuf:"zigzag64,2,rep,packed,name=ints,proto3" json:"ints,omitempty"` // zigzag, so negative values stay small + Doubles []float64 `protobuf:"fixed64,3,rep,packed,name=doubles,proto3" json:"doubles,omitempty"` + // Text and blob values are concatenated with an exclusive end offset each, + // rather than `repeated string`, so a decoder can hand out subslices of one + // buffer instead of copying every value. + TextData []byte `protobuf:"bytes,4,opt,name=text_data,json=textData,proto3" json:"text_data,omitempty"` + TextEnds []uint32 `protobuf:"varint,5,rep,packed,name=text_ends,json=textEnds,proto3" json:"text_ends,omitempty"` + BlobData []byte `protobuf:"bytes,6,opt,name=blob_data,json=blobData,proto3" json:"blob_data,omitempty"` + BlobEnds []uint32 `protobuf:"varint,7,rep,packed,name=blob_ends,json=blobEnds,proto3" json:"blob_ends,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SessionRow) Reset() { - *x = SessionRow{} +func (x *SessionColumn) Reset() { + *x = SessionColumn{} mi := &file_livekit_agent_session_db_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SessionRow) String() string { +func (x *SessionColumn) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SessionRow) ProtoMessage() {} +func (*SessionColumn) ProtoMessage() {} -func (x *SessionRow) ProtoReflect() protoreflect.Message { +func (x *SessionColumn) ProtoReflect() protoreflect.Message { mi := &file_livekit_agent_session_db_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1178,39 +1252,82 @@ func (x *SessionRow) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SessionRow.ProtoReflect.Descriptor instead. -func (*SessionRow) Descriptor() ([]byte, []int) { +// Deprecated: Use SessionColumn.ProtoReflect.Descriptor instead. +func (*SessionColumn) Descriptor() ([]byte, []int) { return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{15} } -func (x *SessionRow) GetValues() []*SessionValue { +func (x *SessionColumn) GetTypes() []byte { + if x != nil { + return x.Types + } + return nil +} + +func (x *SessionColumn) GetInts() []int64 { if x != nil { - return x.Values + return x.Ints } return nil } -type SessionRowBatch struct { +func (x *SessionColumn) GetDoubles() []float64 { + if x != nil { + return x.Doubles + } + return nil +} + +func (x *SessionColumn) GetTextData() []byte { + if x != nil { + return x.TextData + } + return nil +} + +func (x *SessionColumn) GetTextEnds() []uint32 { + if x != nil { + return x.TextEnds + } + return nil +} + +func (x *SessionColumn) GetBlobData() []byte { + if x != nil { + return x.BlobData + } + return nil +} + +func (x *SessionColumn) GetBlobEnds() []uint32 { + if x != nil { + return x.BlobEnds + } + return nil +} + +type SessionColumnBatch struct { state protoimpl.MessageState `protogen:"open.v1"` - Rows []*SessionRow `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"` + Columns []*SessionColumn `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` // one per column of SessionColumns + Rows uint32 `protobuf:"varint,2,opt,name=rows,proto3" json:"rows,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SessionRowBatch) Reset() { - *x = SessionRowBatch{} +func (x *SessionColumnBatch) Reset() { + *x = SessionColumnBatch{} mi := &file_livekit_agent_session_db_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SessionRowBatch) String() string { +func (x *SessionColumnBatch) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SessionRowBatch) ProtoMessage() {} +func (*SessionColumnBatch) ProtoMessage() {} -func (x *SessionRowBatch) ProtoReflect() protoreflect.Message { +func (x *SessionColumnBatch) ProtoReflect() protoreflect.Message { mi := &file_livekit_agent_session_db_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1222,18 +1339,25 @@ func (x *SessionRowBatch) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SessionRowBatch.ProtoReflect.Descriptor instead. -func (*SessionRowBatch) Descriptor() ([]byte, []int) { +// Deprecated: Use SessionColumnBatch.ProtoReflect.Descriptor instead. +func (*SessionColumnBatch) Descriptor() ([]byte, []int) { return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{16} } -func (x *SessionRowBatch) GetRows() []*SessionRow { +func (x *SessionColumnBatch) GetColumns() []*SessionColumn { if x != nil { - return x.Rows + return x.Columns } return nil } +func (x *SessionColumnBatch) GetRows() uint32 { + if x != nil { + return x.Rows + } + return 0 +} + type SessionExecResult struct { state protoimpl.MessageState `protogen:"open.v1"` RowsAffected int64 `protobuf:"varint,1,opt,name=rows_affected,json=rowsAffected,proto3" json:"rows_affected,omitempty"` @@ -1417,13 +1541,13 @@ const file_livekit_agent_session_db_proto_rawDesc = "" + "\x06credit\x18\n" + " \x01(\v2\x16.livekit.SessionCreditH\x00R\x06credit\x12*\n" + "\x04ping\x18\v \x01(\v2\x14.livekit.SessionPingH\x00R\x04pingB\t\n" + - "\amessage\"\xaf\x03\n" + + "\amessage\"\xb8\x03\n" + "\x14SessionStoreResponse\x12\x1d\n" + "\n" + "request_id\x18\x01 \x01(\rR\trequestId\x124\n" + "\bhello_ok\x18\x02 \x01(\v2\x17.livekit.SessionHelloOkH\x00R\ahelloOk\x123\n" + - "\acolumns\x18\x03 \x01(\v2\x17.livekit.SessionColumnsH\x00R\acolumns\x127\n" + - "\trow_batch\x18\x04 \x01(\v2\x18.livekit.SessionRowBatchH\x00R\browBatch\x12=\n" + + "\acolumns\x18\x03 \x01(\v2\x17.livekit.SessionColumnsH\x00R\acolumns\x12@\n" + + "\fcolumn_batch\x18\x04 \x01(\v2\x1b.livekit.SessionColumnBatchH\x00R\vcolumnBatch\x12=\n" + "\vexec_result\x18\x05 \x01(\v2\x1a.livekit.SessionExecResultH\x00R\n" + "execResult\x12*\n" + "\x04done\x18\x06 \x01(\v2\x14.livekit.SessionDoneH\x00R\x04done\x122\n" + @@ -1468,12 +1592,18 @@ const file_livekit_agent_session_db_proto_rawDesc = "" + "\x10ping_interval_ms\x18\x02 \x01(\rR\x0epingIntervalMs\x12&\n" + "\x0fping_timeout_ms\x18\x03 \x01(\rR\rpingTimeoutMs\"&\n" + "\x0eSessionColumns\x12\x14\n" + - "\x05names\x18\x01 \x03(\tR\x05names\";\n" + - "\n" + - "SessionRow\x12-\n" + - "\x06values\x18\x01 \x03(\v2\x15.livekit.SessionValueR\x06values\":\n" + - "\x0fSessionRowBatch\x12'\n" + - "\x04rows\x18\x01 \x03(\v2\x13.livekit.SessionRowR\x04rows\"p\n" + + "\x05names\x18\x01 \x03(\tR\x05names\"\xc7\x01\n" + + "\rSessionColumn\x12\x14\n" + + "\x05types\x18\x01 \x01(\fR\x05types\x12\x12\n" + + "\x04ints\x18\x02 \x03(\x12R\x04ints\x12\x18\n" + + "\adoubles\x18\x03 \x03(\x01R\adoubles\x12\x1b\n" + + "\ttext_data\x18\x04 \x01(\fR\btextData\x12\x1b\n" + + "\ttext_ends\x18\x05 \x03(\rR\btextEnds\x12\x1b\n" + + "\tblob_data\x18\x06 \x01(\fR\bblobData\x12\x1b\n" + + "\tblob_ends\x18\a \x03(\rR\bblobEnds\"Z\n" + + "\x12SessionColumnBatch\x120\n" + + "\acolumns\x18\x01 \x03(\v2\x16.livekit.SessionColumnR\acolumns\x12\x12\n" + + "\x04rows\x18\x02 \x01(\rR\x04rows\"p\n" + "\x11SessionExecResult\x12#\n" + "\rrows_affected\x18\x01 \x01(\x03R\frowsAffected\x12$\n" + "\x0elast_insert_id\x18\x02 \x01(\x03R\flastInsertId\x12\x10\n" + @@ -1487,7 +1617,13 @@ const file_livekit_agent_session_db_proto_rawDesc = "" + "\amessage\x18\x02 \x01(\tR\amessage*M\n" + "\x10SessionQueryLang\x12\x1a\n" + "\x16SESSION_QUERY_LANG_SQL\x10\x00\x12\x1d\n" + - "\x19SESSION_QUERY_LANG_CYPHER\x10\x01BFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" + "\x19SESSION_QUERY_LANG_CYPHER\x10\x01*\xa4\x01\n" + + "\x10SessionValueType\x12\x1b\n" + + "\x17SESSION_VALUE_TYPE_NULL\x10\x00\x12\x1a\n" + + "\x16SESSION_VALUE_TYPE_INT\x10\x01\x12\x1d\n" + + "\x19SESSION_VALUE_TYPE_DOUBLE\x10\x02\x12\x1b\n" + + "\x17SESSION_VALUE_TYPE_TEXT\x10\x03\x12\x1b\n" + + "\x17SESSION_VALUE_TYPE_BLOB\x10\x04BFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" var ( file_livekit_agent_session_db_proto_rawDescOnce sync.Once @@ -1501,59 +1637,59 @@ func file_livekit_agent_session_db_proto_rawDescGZIP() []byte { return file_livekit_agent_session_db_proto_rawDescData } -var file_livekit_agent_session_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_livekit_agent_session_db_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_livekit_agent_session_db_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_livekit_agent_session_db_proto_goTypes = []any{ (SessionQueryLang)(0), // 0: livekit.SessionQueryLang - (*SessionStoreRequest)(nil), // 1: livekit.SessionStoreRequest - (*SessionStoreResponse)(nil), // 2: livekit.SessionStoreResponse - (*SessionValue)(nil), // 3: livekit.SessionValue - (*SessionStatement)(nil), // 4: livekit.SessionStatement - (*SessionBatch)(nil), // 5: livekit.SessionBatch - (*SessionBegin)(nil), // 6: livekit.SessionBegin - (*SessionCommit)(nil), // 7: livekit.SessionCommit - (*SessionRollback)(nil), // 8: livekit.SessionRollback - (*SessionCancel)(nil), // 9: livekit.SessionCancel - (*SessionCredit)(nil), // 10: livekit.SessionCredit - (*SessionPing)(nil), // 11: livekit.SessionPing - (*SessionPong)(nil), // 12: livekit.SessionPong - (*SessionHello)(nil), // 13: livekit.SessionHello - (*SessionHelloOk)(nil), // 14: livekit.SessionHelloOk - (*SessionColumns)(nil), // 15: livekit.SessionColumns - (*SessionRow)(nil), // 16: livekit.SessionRow - (*SessionRowBatch)(nil), // 17: livekit.SessionRowBatch - (*SessionExecResult)(nil), // 18: livekit.SessionExecResult - (*SessionDone)(nil), // 19: livekit.SessionDone - (*SessionStoreError)(nil), // 20: livekit.SessionStoreError + (SessionValueType)(0), // 1: livekit.SessionValueType + (*SessionStoreRequest)(nil), // 2: livekit.SessionStoreRequest + (*SessionStoreResponse)(nil), // 3: livekit.SessionStoreResponse + (*SessionValue)(nil), // 4: livekit.SessionValue + (*SessionStatement)(nil), // 5: livekit.SessionStatement + (*SessionBatch)(nil), // 6: livekit.SessionBatch + (*SessionBegin)(nil), // 7: livekit.SessionBegin + (*SessionCommit)(nil), // 8: livekit.SessionCommit + (*SessionRollback)(nil), // 9: livekit.SessionRollback + (*SessionCancel)(nil), // 10: livekit.SessionCancel + (*SessionCredit)(nil), // 11: livekit.SessionCredit + (*SessionPing)(nil), // 12: livekit.SessionPing + (*SessionPong)(nil), // 13: livekit.SessionPong + (*SessionHello)(nil), // 14: livekit.SessionHello + (*SessionHelloOk)(nil), // 15: livekit.SessionHelloOk + (*SessionColumns)(nil), // 16: livekit.SessionColumns + (*SessionColumn)(nil), // 17: livekit.SessionColumn + (*SessionColumnBatch)(nil), // 18: livekit.SessionColumnBatch + (*SessionExecResult)(nil), // 19: livekit.SessionExecResult + (*SessionDone)(nil), // 20: livekit.SessionDone + (*SessionStoreError)(nil), // 21: livekit.SessionStoreError } var file_livekit_agent_session_db_proto_depIdxs = []int32{ - 13, // 0: livekit.SessionStoreRequest.hello:type_name -> livekit.SessionHello - 4, // 1: livekit.SessionStoreRequest.exec:type_name -> livekit.SessionStatement - 4, // 2: livekit.SessionStoreRequest.query:type_name -> livekit.SessionStatement - 5, // 3: livekit.SessionStoreRequest.batch:type_name -> livekit.SessionBatch - 6, // 4: livekit.SessionStoreRequest.begin:type_name -> livekit.SessionBegin - 7, // 5: livekit.SessionStoreRequest.commit:type_name -> livekit.SessionCommit - 8, // 6: livekit.SessionStoreRequest.rollback:type_name -> livekit.SessionRollback - 9, // 7: livekit.SessionStoreRequest.cancel:type_name -> livekit.SessionCancel - 10, // 8: livekit.SessionStoreRequest.credit:type_name -> livekit.SessionCredit - 11, // 9: livekit.SessionStoreRequest.ping:type_name -> livekit.SessionPing - 14, // 10: livekit.SessionStoreResponse.hello_ok:type_name -> livekit.SessionHelloOk - 15, // 11: livekit.SessionStoreResponse.columns:type_name -> livekit.SessionColumns - 17, // 12: livekit.SessionStoreResponse.row_batch:type_name -> livekit.SessionRowBatch - 18, // 13: livekit.SessionStoreResponse.exec_result:type_name -> livekit.SessionExecResult - 19, // 14: livekit.SessionStoreResponse.done:type_name -> livekit.SessionDone - 20, // 15: livekit.SessionStoreResponse.error:type_name -> livekit.SessionStoreError - 12, // 16: livekit.SessionStoreResponse.pong:type_name -> livekit.SessionPong - 3, // 17: livekit.SessionStatement.params:type_name -> livekit.SessionValue + 14, // 0: livekit.SessionStoreRequest.hello:type_name -> livekit.SessionHello + 5, // 1: livekit.SessionStoreRequest.exec:type_name -> livekit.SessionStatement + 5, // 2: livekit.SessionStoreRequest.query:type_name -> livekit.SessionStatement + 6, // 3: livekit.SessionStoreRequest.batch:type_name -> livekit.SessionBatch + 7, // 4: livekit.SessionStoreRequest.begin:type_name -> livekit.SessionBegin + 8, // 5: livekit.SessionStoreRequest.commit:type_name -> livekit.SessionCommit + 9, // 6: livekit.SessionStoreRequest.rollback:type_name -> livekit.SessionRollback + 10, // 7: livekit.SessionStoreRequest.cancel:type_name -> livekit.SessionCancel + 11, // 8: livekit.SessionStoreRequest.credit:type_name -> livekit.SessionCredit + 12, // 9: livekit.SessionStoreRequest.ping:type_name -> livekit.SessionPing + 15, // 10: livekit.SessionStoreResponse.hello_ok:type_name -> livekit.SessionHelloOk + 16, // 11: livekit.SessionStoreResponse.columns:type_name -> livekit.SessionColumns + 18, // 12: livekit.SessionStoreResponse.column_batch:type_name -> livekit.SessionColumnBatch + 19, // 13: livekit.SessionStoreResponse.exec_result:type_name -> livekit.SessionExecResult + 20, // 14: livekit.SessionStoreResponse.done:type_name -> livekit.SessionDone + 21, // 15: livekit.SessionStoreResponse.error:type_name -> livekit.SessionStoreError + 13, // 16: livekit.SessionStoreResponse.pong:type_name -> livekit.SessionPong + 4, // 17: livekit.SessionStatement.params:type_name -> livekit.SessionValue 0, // 18: livekit.SessionStatement.lang:type_name -> livekit.SessionQueryLang - 4, // 19: livekit.SessionBatch.statements:type_name -> livekit.SessionStatement - 3, // 20: livekit.SessionRow.values:type_name -> livekit.SessionValue - 16, // 21: livekit.SessionRowBatch.rows:type_name -> livekit.SessionRow - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 5, // 19: livekit.SessionBatch.statements:type_name -> livekit.SessionStatement + 17, // 20: livekit.SessionColumnBatch.columns:type_name -> livekit.SessionColumn + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_livekit_agent_session_db_proto_init() } @@ -1576,7 +1712,7 @@ func file_livekit_agent_session_db_proto_init() { file_livekit_agent_session_db_proto_msgTypes[1].OneofWrappers = []any{ (*SessionStoreResponse_HelloOk)(nil), (*SessionStoreResponse_Columns)(nil), - (*SessionStoreResponse_RowBatch)(nil), + (*SessionStoreResponse_ColumnBatch)(nil), (*SessionStoreResponse_ExecResult)(nil), (*SessionStoreResponse_Done)(nil), (*SessionStoreResponse_Error)(nil), @@ -1594,7 +1730,7 @@ func file_livekit_agent_session_db_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_agent_session_db_proto_rawDesc), len(file_livekit_agent_session_db_proto_rawDesc)), - NumEnums: 1, + NumEnums: 2, NumMessages: 20, NumExtensions: 0, NumServices: 0, diff --git a/livekit/livekit_agent_session_store.pb.go b/livekit/livekit_agent_session_store.pb.go index 4a69f285d..db735c864 100644 --- a/livekit/livekit_agent_session_store.pb.go +++ b/livekit/livekit_agent_session_store.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.35.1 +// protoc v7.34.1 // source: livekit_agent_session_store.proto package livekit @@ -329,7 +329,7 @@ func (x *ListSessionsRequest) GetPageToken() string { type ListSessionsResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - Sessions []*GetSessionResponse `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"` + Sessions []*SessionSummary `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"` NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // empty when exhausted unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -365,7 +365,7 @@ func (*ListSessionsResponse) Descriptor() ([]byte, []int) { return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{5} } -func (x *ListSessionsResponse) GetSessions() []*GetSessionResponse { +func (x *ListSessionsResponse) GetSessions() []*SessionSummary { if x != nil { return x.Sessions } @@ -379,6 +379,89 @@ func (x *ListSessionsResponse) GetNextPageToken() string { return "" } +// SessionSummary is what listing returns: a session's immutable facts. +// +// tip is deliberately absent. It advances on every commit, so it cannot be +// carried in the listing index without putting a write on the commit path, which +// would mean listing reads every session's metadata row forever. It would also +// be stale the moment it was returned, since anything acting on it has to +// re-read. GetSession returns it for a single session. +type SessionSummary struct { + state protoimpl.MessageState `protogen:"open.v1"` + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` + CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` + ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SessionSummary) Reset() { + *x = SessionSummary{} + mi := &file_livekit_agent_session_store_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SessionSummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionSummary) ProtoMessage() {} + +func (x *SessionSummary) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agent_session_store_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SessionSummary.ProtoReflect.Descriptor instead. +func (*SessionSummary) Descriptor() ([]byte, []int) { + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{6} +} + +func (x *SessionSummary) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +func (x *SessionSummary) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *SessionSummary) GetUserAttributes() string { + if x != nil { + return x.UserAttributes + } + return "" +} + +func (x *SessionSummary) GetCreatedAtUnix() int64 { + if x != nil { + return x.CreatedAtUnix + } + return 0 +} + +func (x *SessionSummary) GetExpiresAtUnix() int64 { + if x != nil { + return x.ExpiresAtUnix + } + return 0 +} + type DeleteSessionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` @@ -388,7 +471,7 @@ type DeleteSessionRequest struct { func (x *DeleteSessionRequest) Reset() { *x = DeleteSessionRequest{} - mi := &file_livekit_agent_session_store_proto_msgTypes[6] + mi := &file_livekit_agent_session_store_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -400,7 +483,7 @@ func (x *DeleteSessionRequest) String() string { func (*DeleteSessionRequest) ProtoMessage() {} func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[6] + mi := &file_livekit_agent_session_store_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -413,7 +496,7 @@ func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteSessionRequest.ProtoReflect.Descriptor instead. func (*DeleteSessionRequest) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{6} + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{7} } func (x *DeleteSessionRequest) GetSessionId() string { @@ -431,7 +514,7 @@ type DeleteSessionResponse struct { func (x *DeleteSessionResponse) Reset() { *x = DeleteSessionResponse{} - mi := &file_livekit_agent_session_store_proto_msgTypes[7] + mi := &file_livekit_agent_session_store_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -443,7 +526,7 @@ func (x *DeleteSessionResponse) String() string { func (*DeleteSessionResponse) ProtoMessage() {} func (x *DeleteSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[7] + mi := &file_livekit_agent_session_store_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -456,7 +539,7 @@ func (x *DeleteSessionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteSessionResponse.ProtoReflect.Descriptor instead. func (*DeleteSessionResponse) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{7} + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{8} } type DumpSessionRequest struct { @@ -468,7 +551,7 @@ type DumpSessionRequest struct { func (x *DumpSessionRequest) Reset() { *x = DumpSessionRequest{} - mi := &file_livekit_agent_session_store_proto_msgTypes[8] + mi := &file_livekit_agent_session_store_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -480,7 +563,7 @@ func (x *DumpSessionRequest) String() string { func (*DumpSessionRequest) ProtoMessage() {} func (x *DumpSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[8] + mi := &file_livekit_agent_session_store_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -493,7 +576,7 @@ func (x *DumpSessionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DumpSessionRequest.ProtoReflect.Descriptor instead. func (*DumpSessionRequest) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{8} + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{9} } func (x *DumpSessionRequest) GetSessionId() string { @@ -514,7 +597,7 @@ type DumpSessionResponse struct { func (x *DumpSessionResponse) Reset() { *x = DumpSessionResponse{} - mi := &file_livekit_agent_session_store_proto_msgTypes[9] + mi := &file_livekit_agent_session_store_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -526,7 +609,7 @@ func (x *DumpSessionResponse) String() string { func (*DumpSessionResponse) ProtoMessage() {} func (x *DumpSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[9] + mi := &file_livekit_agent_session_store_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -539,7 +622,7 @@ func (x *DumpSessionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DumpSessionResponse.ProtoReflect.Descriptor instead. func (*DumpSessionResponse) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{9} + return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{10} } func (x *DumpSessionResponse) GetDownloadUrl() string { @@ -591,10 +674,17 @@ const file_livekit_agent_session_store_proto_rawDesc = "" + "\x13ListSessionsRequest\x12\x1b\n" + "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + "\n" + - "page_token\x18\x02 \x01(\tR\tpageToken\"w\n" + - "\x14ListSessionsResponse\x127\n" + - "\bsessions\x18\x01 \x03(\v2\x1b.livekit.GetSessionResponseR\bsessions\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"5\n" + + "page_token\x18\x02 \x01(\tR\tpageToken\"s\n" + + "\x14ListSessionsResponse\x123\n" + + "\bsessions\x18\x01 \x03(\v2\x17.livekit.SessionSummaryR\bsessions\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xc0\x01\n" + + "\x0eSessionSummary\x12\x1d\n" + + "\n" + + "session_id\x18\x01 \x01(\tR\tsessionId\x12\x16\n" + + "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + + "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12&\n" + + "\x0fcreated_at_unix\x18\x04 \x01(\x03R\rcreatedAtUnix\x12&\n" + + "\x0fexpires_at_unix\x18\x05 \x01(\x03R\rexpiresAtUnix\"5\n" + "\x14DeleteSessionRequest\x12\x1d\n" + "\n" + "session_id\x18\x01 \x01(\tR\tsessionId\"\x17\n" + @@ -626,7 +716,7 @@ func file_livekit_agent_session_store_proto_rawDescGZIP() []byte { return file_livekit_agent_session_store_proto_rawDescData } -var file_livekit_agent_session_store_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_livekit_agent_session_store_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_livekit_agent_session_store_proto_goTypes = []any{ (*CreateSessionRequest)(nil), // 0: livekit.CreateSessionRequest (*CreateSessionResponse)(nil), // 1: livekit.CreateSessionResponse @@ -634,28 +724,29 @@ var file_livekit_agent_session_store_proto_goTypes = []any{ (*GetSessionResponse)(nil), // 3: livekit.GetSessionResponse (*ListSessionsRequest)(nil), // 4: livekit.ListSessionsRequest (*ListSessionsResponse)(nil), // 5: livekit.ListSessionsResponse - (*DeleteSessionRequest)(nil), // 6: livekit.DeleteSessionRequest - (*DeleteSessionResponse)(nil), // 7: livekit.DeleteSessionResponse - (*DumpSessionRequest)(nil), // 8: livekit.DumpSessionRequest - (*DumpSessionResponse)(nil), // 9: livekit.DumpSessionResponse + (*SessionSummary)(nil), // 6: livekit.SessionSummary + (*DeleteSessionRequest)(nil), // 7: livekit.DeleteSessionRequest + (*DeleteSessionResponse)(nil), // 8: livekit.DeleteSessionResponse + (*DumpSessionRequest)(nil), // 9: livekit.DumpSessionRequest + (*DumpSessionResponse)(nil), // 10: livekit.DumpSessionResponse } var file_livekit_agent_session_store_proto_depIdxs = []int32{ - 3, // 0: livekit.ListSessionsResponse.sessions:type_name -> livekit.GetSessionResponse - 0, // 1: livekit.AgentSessionStore.CreateSession:input_type -> livekit.CreateSessionRequest - 2, // 2: livekit.AgentSessionStore.GetSession:input_type -> livekit.GetSessionRequest - 4, // 3: livekit.AgentSessionStore.ListSessions:input_type -> livekit.ListSessionsRequest - 6, // 4: livekit.AgentSessionStore.DeleteSession:input_type -> livekit.DeleteSessionRequest - 8, // 5: livekit.AgentSessionStore.Dump:input_type -> livekit.DumpSessionRequest - 1, // 6: livekit.AgentSessionStore.CreateSession:output_type -> livekit.CreateSessionResponse - 3, // 7: livekit.AgentSessionStore.GetSession:output_type -> livekit.GetSessionResponse - 5, // 8: livekit.AgentSessionStore.ListSessions:output_type -> livekit.ListSessionsResponse - 7, // 9: livekit.AgentSessionStore.DeleteSession:output_type -> livekit.DeleteSessionResponse - 9, // 10: livekit.AgentSessionStore.Dump:output_type -> livekit.DumpSessionResponse - 6, // [6:11] is the sub-list for method output_type - 1, // [1:6] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 6, // 0: livekit.ListSessionsResponse.sessions:type_name -> livekit.SessionSummary + 0, // 1: livekit.AgentSessionStore.CreateSession:input_type -> livekit.CreateSessionRequest + 2, // 2: livekit.AgentSessionStore.GetSession:input_type -> livekit.GetSessionRequest + 4, // 3: livekit.AgentSessionStore.ListSessions:input_type -> livekit.ListSessionsRequest + 7, // 4: livekit.AgentSessionStore.DeleteSession:input_type -> livekit.DeleteSessionRequest + 9, // 5: livekit.AgentSessionStore.Dump:input_type -> livekit.DumpSessionRequest + 1, // 6: livekit.AgentSessionStore.CreateSession:output_type -> livekit.CreateSessionResponse + 3, // 7: livekit.AgentSessionStore.GetSession:output_type -> livekit.GetSessionResponse + 5, // 8: livekit.AgentSessionStore.ListSessions:output_type -> livekit.ListSessionsResponse + 8, // 9: livekit.AgentSessionStore.DeleteSession:output_type -> livekit.DeleteSessionResponse + 10, // 10: livekit.AgentSessionStore.Dump:output_type -> livekit.DumpSessionResponse + 6, // [6:11] is the sub-list for method output_type + 1, // [1:6] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_livekit_agent_session_store_proto_init() } @@ -669,7 +760,7 @@ func file_livekit_agent_session_store_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_agent_session_store_proto_rawDesc), len(file_livekit_agent_session_store_proto_rawDesc)), NumEnums: 0, - NumMessages: 10, + NumMessages: 11, NumExtensions: 0, NumServices: 1, }, diff --git a/livekit/livekit_agent_session_store.twirp.go b/livekit/livekit_agent_session_store.twirp.go index 1f70ffb7f..6e602c5ce 100644 --- a/livekit/livekit_agent_session_store.twirp.go +++ b/livekit/livekit_agent_session_store.twirp.go @@ -1642,41 +1642,42 @@ func (s *agentSessionStoreServer) PathPrefix() string { } var twirpFileDescriptor2 = []byte{ - // 567 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdb, 0x6e, 0xd3, 0x40, - 0x10, 0x55, 0xe2, 0x36, 0x34, 0x93, 0xa6, 0xa1, 0xdb, 0x14, 0xa2, 0xb4, 0x81, 0xd4, 0x48, 0x25, - 0x4f, 0xa9, 0x94, 0x0a, 0x21, 0xf5, 0x2d, 0x50, 0x40, 0xa8, 0x55, 0x55, 0x1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 0xe8, 0x3d, 0x76, 0x7f, 0x53, 0x13, 0x8d, - 0xcc, 0xc4, 0xde, 0x2f, 0x03, 0x36, 0xfb, 0xf1, 0x49, 0xeb, 0xa9, 0x83, 0xf8, 0xa0, 0xd9, 0x19, - 0x54, 0xe7, 0xee, 0x88, 0xb5, 0x32, 0xb9, 0xf3, 0x2e, 0xbb, 0xf9, 0xe2, 0xae, 0xb0, 0xa6, 0xf0, - 0x01, 0x60, 0x6a, 0x13, 0x6b, 0xe6, 0x7a, 0x97, 0x74, 0xba, 0xcf, 0x57, 0x76, 0x02, 0xeb, 0xb3, - 0xeb, 0xc1, 0x76, 0xb3, 0xe4, 0x9c, 0x45, 0x6c, 0xb6, 0xee, 0x88, 0xea, 0x66, 0x67, 0x50, 0x9d, - 0xf3, 0x6e, 0x86, 0x63, 0xde, 0x2a, 0xcc, 0x70, 0xcc, 0xb5, 0x9c, 0xf5, 0x61, 0x25, 0x76, 0x8f, - 0x4d, 0x19, 0x2c, 0x6f, 0x40, 0x73, 0x37, 0x3f, 0x98, 0xb4, 0x78, 0xf7, 0xf1, 0xdb, 0xab, 0x31, - 0xa7, 0x1f, 0xd1, 0xb0, 0x3b, 0x12, 0x57, 0x07, 0x3a, 0xf3, 0x40, 0xfd, 0xbb, 0x8e, 0x84, 0x97, - 0x02, 0xbf, 0x8b, 0xd5, 0x53, 0x7e, 0x8d, 0x27, 0x9c, 0xba, 0xe7, 0x71, 0xe8, 0x6f, 0x71, 0x43, - 0x7f, 0x1f, 0x1d, 0x29, 0x60, 0x58, 0x52, 0x25, 0x87, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x3f, - 0x0b, 0xdd, 0x24, 0xb5, 0x05, 0x00, 0x00, + // 591 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0xcf, 0x6e, 0xd3, 0x4e, + 0x10, 0x96, 0xe3, 0xb6, 0xbf, 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, 0x44, 0x01, 0xc3, 0x0d, 0x95, + 0xd2, 0xfb, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x56, 0xcf, 0x7b, 0x99, 0x74, 0x06, 0x00, 0x00, } diff --git a/protobufs/livekit_agent_session_db.proto b/protobufs/livekit_agent_session_db.proto index 2898aaaca..1648d59ba 100644 --- a/protobufs/livekit_agent_session_db.proto +++ b/protobufs/livekit_agent_session_db.proto @@ -25,7 +25,7 @@ option ruby_package = "LiveKit::Proto"; // frame; requests and responses correlate by request_id (monotonic per // connection, chosen by the client). One WebSocket = one session connection. // -// Flow control: query results stream as SessionRowBatch frames paced by +// Flow control: query results stream as SessionColumnBatch frames paced by // per-request credits (SessionCredit) the client advertises; the server // never sends more un-consumed batches than granted, so any result size // streams with bounded memory at every hop. @@ -35,13 +35,13 @@ message SessionStoreRequest { oneof message { SessionHello hello = 2; // must be first on the socket SessionStatement exec = 3; // no result rows; answers SessionExecResult - SessionStatement query = 4; // answers SessionColumns + SessionRowBatch* + SessionDone + SessionStatement query = 4; // answers SessionColumns + SessionColumnBatch* + SessionDone SessionBatch batch = 5; // atomic multi-statement exec SessionBegin begin = 6; // interactive transaction (server enforces idle/duration timeouts) SessionCommit commit = 7; SessionRollback rollback = 8; SessionCancel cancel = 9; // stop a running query's stream/cursor - SessionCredit credit = 10; // grant more RowBatch credits for request_id + SessionCredit credit = 10; // grant more batch credits for request_id SessionPing ping = 11; } } @@ -51,7 +51,7 @@ message SessionStoreResponse { oneof message { SessionHelloOk hello_ok = 2; SessionColumns columns = 3; - SessionRowBatch row_batch = 4; + SessionColumnBatch column_batch = 4; SessionExecResult exec_result = 5; SessionDone done = 6; SessionStoreError error = 7; @@ -93,7 +93,7 @@ message SessionRollback {} message SessionCancel {} message SessionCredit { - uint32 batches = 1; // additional RowBatch frames the client can absorb + uint32 batches = 1; // additional batch frames the client can absorb } message SessionPing { @@ -120,12 +120,40 @@ message SessionColumns { repeated string names = 1; } -message SessionRow { - repeated SessionValue values = 1; +// SessionValueType tags one value's storage class within a SessionColumn. +enum SessionValueType { + SESSION_VALUE_TYPE_NULL = 0; + SESSION_VALUE_TYPE_INT = 1; + SESSION_VALUE_TYPE_DOUBLE = 2; + SESSION_VALUE_TYPE_TEXT = 3; + SESSION_VALUE_TYPE_BLOB = 4; } -message SessionRowBatch { - repeated SessionRow rows = 1; +// SessionColumn carries one column of a batch, column-oriented so a result set +// costs a handful of allocations per batch rather than two per cell (a message +// plus a oneof wrapper), and so scalar runs land in pointer-free arrays the +// garbage collector never scans. +// +// SQLite types values individually rather than by column, so `types` tags every +// value and each typed array holds only the values of its own class, in row +// order. Reading a column means walking `types` and taking the next entry from +// the matching array; NULLs occupy a tag and nothing else. +message SessionColumn { + bytes types = 1; // one SessionValueType per row, one byte each + repeated sint64 ints = 2; // zigzag, so negative values stay small + repeated double doubles = 3; + // Text and blob values are concatenated with an exclusive end offset each, + // rather than `repeated string`, so a decoder can hand out subslices of one + // buffer instead of copying every value. + bytes text_data = 4; + repeated uint32 text_ends = 5; + bytes blob_data = 6; + repeated uint32 blob_ends = 7; +} + +message SessionColumnBatch { + repeated SessionColumn columns = 1; // one per column of SessionColumns + uint32 rows = 2; } message SessionExecResult { diff --git a/protobufs/livekit_agent_session_store.proto b/protobufs/livekit_agent_session_store.proto index e996fd14c..b3f53dc09 100644 --- a/protobufs/livekit_agent_session_store.proto +++ b/protobufs/livekit_agent_session_store.proto @@ -69,10 +69,25 @@ message ListSessionsRequest { } message ListSessionsResponse { - repeated GetSessionResponse sessions = 1; + repeated SessionSummary sessions = 1; string next_page_token = 2; // empty when exhausted } +// SessionSummary is what listing returns: a session's immutable facts. +// +// tip is deliberately absent. It advances on every commit, so it cannot be +// carried in the listing index without putting a write on the commit path, which +// would mean listing reads every session's metadata row forever. It would also +// be stale the moment it was returned, since anything acting on it has to +// re-read. GetSession returns it for a single session. +message SessionSummary { + string session_id = 1; + string region = 2; + string user_attributes = 3; + int64 created_at_unix = 4; + int64 expires_at_unix = 5; +} + message DeleteSessionRequest { string session_id = 1; } From 6010a1e4d46791e20c5aa974d9a4068e4545bad4 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 22:20:06 +0000 Subject: [PATCH 06/24] generated protobuf --- livekit/livekit_agent_session_db.pb.go | 2 +- livekit/livekit_agent_session_store.pb.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/livekit/livekit_agent_session_db.pb.go b/livekit/livekit_agent_session_db.pb.go index 6256b6f53..a4c92b7c2 100644 --- a/livekit/livekit_agent_session_db.pb.go +++ b/livekit/livekit_agent_session_db.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v7.35.1 // source: livekit_agent_session_db.proto package livekit diff --git a/livekit/livekit_agent_session_store.pb.go b/livekit/livekit_agent_session_store.pb.go index db735c864..44df73997 100644 --- a/livekit/livekit_agent_session_store.pb.go +++ b/livekit/livekit_agent_session_store.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v7.35.1 // source: livekit_agent_session_store.proto package livekit From 2b4b7a60070d79d33b5d85483951bcb31ec5166b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Tue, 28 Jul 2026 15:29:07 -0700 Subject: [PATCH 07/24] Rename AgentGrant.SessionAdmin to SessionStoreAdmin An agent session is already a running conversation in this package's vocabulary (agent/livekit_agent_session.proto carries chat messages, function calls and handoffs), so agent.sessionAdmin read as authority over those rather than over the session store's databases, which is what it gates. The store's service is AgentSessionStore, so the grant now matches it. --- auth/grants.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/auth/grants.go b/auth/grants.go index 646bb0689..5d634abdb 100644 --- a/auth/grants.go +++ b/auth/grants.go @@ -581,10 +581,14 @@ type AgentGrant struct { Admin bool `json:"admin,omitempty"` // SimulationAdmin grants access to manage simulations and scenarios for evaluating agents. SimulationAdmin bool `json:"simulationAdmin,omitempty"` - // SessionAdmin grants access to the agent session store: creating, reading, - // querying, exporting and deleting a project's session databases. It gates - // both the management API and the data-plane connection. - SessionAdmin bool `json:"sessionAdmin,omitempty"` + // SessionStoreAdmin grants access to the agent session store: creating, + // reading, querying, exporting and deleting a project's session databases. It + // gates both the management API and the data-plane connection. + // + // Named for the store rather than "session" because an agent session is + // already a running conversation elsewhere in this package's vocabulary (see + // agent/livekit_agent_session.proto), which this has nothing to do with. + SessionStoreAdmin bool `json:"sessionStoreAdmin,omitempty"` } func (s *AgentGrant) Clone() *AgentGrant { @@ -604,7 +608,7 @@ func (s *AgentGrant) MarshalLogObject(e zapcore.ObjectEncoder) error { e.AddBool("Admin", s.Admin) e.AddBool("SimulationAdmin", s.SimulationAdmin) - e.AddBool("SessionAdmin", s.SessionAdmin) + e.AddBool("SessionStoreAdmin", s.SessionStoreAdmin) return nil } From bb404b76daa1d58fc21f3e652ef169ffab52e6a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Tue, 28 Jul 2026 15:49:12 -0700 Subject: [PATCH 08/24] Trim comments on the session store protos They carried rationale from the implementation that motivated them, including Go allocation counts, which does not belong in a protocol every SDK reads. What is left states the contract: that values are typed per value rather than per column, how the text and blob offsets address a value, and that a summary has no tip. --- auth/grants.go | 8 +---- livekit/livekit_agent_session_db.pb.go | 23 +++++-------- livekit/livekit_agent_session_store.pb.go | 11 ++---- livekit/livekit_agent_session_store.twirp.go | 12 +++---- protobufs/livekit_agent_session_db.proto | 35 ++++++++------------ protobufs/livekit_agent_session_store.proto | 21 ++++-------- 6 files changed, 35 insertions(+), 75 deletions(-) diff --git a/auth/grants.go b/auth/grants.go index 5d634abdb..ad51d416f 100644 --- a/auth/grants.go +++ b/auth/grants.go @@ -581,13 +581,7 @@ type AgentGrant struct { Admin bool `json:"admin,omitempty"` // SimulationAdmin grants access to manage simulations and scenarios for evaluating agents. SimulationAdmin bool `json:"simulationAdmin,omitempty"` - // SessionStoreAdmin grants access to the agent session store: creating, - // reading, querying, exporting and deleting a project's session databases. It - // gates both the management API and the data-plane connection. - // - // Named for the store rather than "session" because an agent session is - // already a running conversation elsewhere in this package's vocabulary (see - // agent/livekit_agent_session.proto), which this has nothing to do with. + // SessionStoreAdmin grants access to a project's agent session store databases. SessionStoreAdmin bool `json:"sessionStoreAdmin,omitempty"` } diff --git a/livekit/livekit_agent_session_db.pb.go b/livekit/livekit_agent_session_db.pb.go index a4c92b7c2..6383240a0 100644 --- a/livekit/livekit_agent_session_db.pb.go +++ b/livekit/livekit_agent_session_db.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.35.1 +// protoc v7.34.1 // source: livekit_agent_session_db.proto package livekit @@ -1202,23 +1202,16 @@ func (x *SessionColumns) GetNames() []string { return nil } -// SessionColumn carries one column of a batch, column-oriented so a result set -// costs a handful of allocations per batch rather than two per cell (a message -// plus a oneof wrapper), and so scalar runs land in pointer-free arrays the -// garbage collector never scans. -// -// SQLite types values individually rather than by column, so `types` tags every -// value and each typed array holds only the values of its own class, in row -// order. Reading a column means walking `types` and taking the next entry from -// the matching array; NULLs occupy a tag and nothing else. +// SessionColumn is one column of a batch. Values are typed individually, as +// SQLite types them, so a column may mix classes: walk `types` and take the next +// entry from the matching array. A NULL occupies a tag only. type SessionColumn struct { state protoimpl.MessageState `protogen:"open.v1"` - Types []byte `protobuf:"bytes,1,opt,name=types,proto3" json:"types,omitempty"` // one SessionValueType per row, one byte each - Ints []int64 `protobuf:"zigzag64,2,rep,packed,name=ints,proto3" json:"ints,omitempty"` // zigzag, so negative values stay small + Types []byte `protobuf:"bytes,1,opt,name=types,proto3" json:"types,omitempty"` // one SessionValueType per row + Ints []int64 `protobuf:"zigzag64,2,rep,packed,name=ints,proto3" json:"ints,omitempty"` Doubles []float64 `protobuf:"fixed64,3,rep,packed,name=doubles,proto3" json:"doubles,omitempty"` - // Text and blob values are concatenated with an exclusive end offset each, - // rather than `repeated string`, so a decoder can hand out subslices of one - // buffer instead of copying every value. + // Values concatenated, one exclusive end offset each: value i is + // data[ends[i-1]:ends[i]], with 0 implied before the first. TextData []byte `protobuf:"bytes,4,opt,name=text_data,json=textData,proto3" json:"text_data,omitempty"` TextEnds []uint32 `protobuf:"varint,5,rep,packed,name=text_ends,json=textEnds,proto3" json:"text_ends,omitempty"` BlobData []byte `protobuf:"bytes,6,opt,name=blob_data,json=blobData,proto3" json:"blob_data,omitempty"` diff --git a/livekit/livekit_agent_session_store.pb.go b/livekit/livekit_agent_session_store.pb.go index 44df73997..102edd81c 100644 --- a/livekit/livekit_agent_session_store.pb.go +++ b/livekit/livekit_agent_session_store.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.35.1 +// protoc v7.34.1 // source: livekit_agent_session_store.proto package livekit @@ -379,13 +379,8 @@ func (x *ListSessionsResponse) GetNextPageToken() string { return "" } -// SessionSummary is what listing returns: a session's immutable facts. -// -// tip is deliberately absent. It advances on every commit, so it cannot be -// carried in the listing index without putting a write on the commit path, which -// would mean listing reads every session's metadata row forever. It would also -// be stale the moment it was returned, since anything acting on it has to -// re-read. GetSession returns it for a single session. +// SessionSummary is a session's immutable fields. No tip: it changes on every +// commit, so call GetSession for it. type SessionSummary struct { state protoimpl.MessageState `protogen:"open.v1"` SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` diff --git a/livekit/livekit_agent_session_store.twirp.go b/livekit/livekit_agent_session_store.twirp.go index 6e602c5ce..76795a979 100644 --- a/livekit/livekit_agent_session_store.twirp.go +++ b/livekit/livekit_agent_session_store.twirp.go @@ -26,11 +26,9 @@ const _ = twirp.TwirpPackageMinVersion_8_1_0 // AgentSessionStore Interface // =========================== -// AgentSessionStore is the MANAGEMENT plane for per-session SQLite databases: -// lifecycle and export only. All querying goes through the data plane (a -// WebSocket speaking SessionStoreRequest/SessionStoreResponse, defined in -// livekit_agent_session_db.proto). project_id is taken from the authenticated -// principal (access key) on every call, never a request field. +// AgentSessionStore manages per-session SQLite databases: lifecycle and export. +// Querying goes through the data plane in livekit_agent_session_db.proto. The +// project comes from the access token, never from a request field. type AgentSessionStore interface { CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error) @@ -41,9 +39,7 @@ type AgentSessionStore interface { // Deletes the stored data too, not just the metadata row. DeleteSession(context.Context, *DeleteSessionRequest) (*DeleteSessionResponse, error) - // Exports a consistent full SQLite database file and returns a time-limited - // download URL (object-storage pre-authenticated request). Runs off the - // serving path; never blocks the session's writes. + // Exports a consistent SQLite file, returning a time-limited download URL. Dump(context.Context, *DumpSessionRequest) (*DumpSessionResponse, error) } diff --git a/protobufs/livekit_agent_session_db.proto b/protobufs/livekit_agent_session_db.proto index 1648d59ba..5ee9a8035 100644 --- a/protobufs/livekit_agent_session_db.proto +++ b/protobufs/livekit_agent_session_db.proto @@ -20,15 +20,13 @@ option go_package = "github.com/livekit/protocol/livekit"; option csharp_namespace = "LiveKit.Proto"; option ruby_package = "LiveKit::Proto"; -// Data plane for AgentSessionStore session databases: a SQL(+openCypher) -// protocol carried over a WebSocket. One binary-protobuf message per WS -// frame; requests and responses correlate by request_id (monotonic per -// connection, chosen by the client). One WebSocket = one session connection. +// Data plane for AgentSessionStore databases: one WebSocket per session, one +// protobuf message per frame, requests and responses correlated by a +// client-chosen request_id. // -// Flow control: query results stream as SessionColumnBatch frames paced by -// per-request credits (SessionCredit) the client advertises; the server -// never sends more un-consumed batches than granted, so any result size -// streams with bounded memory at every hop. +// Query results stream as SessionColumnBatch frames paced by the credits the +// client advertises (SessionCredit): the server never sends more un-consumed +// batches than granted. message SessionStoreRequest { uint32 request_id = 1; @@ -129,22 +127,15 @@ enum SessionValueType { SESSION_VALUE_TYPE_BLOB = 4; } -// SessionColumn carries one column of a batch, column-oriented so a result set -// costs a handful of allocations per batch rather than two per cell (a message -// plus a oneof wrapper), and so scalar runs land in pointer-free arrays the -// garbage collector never scans. -// -// SQLite types values individually rather than by column, so `types` tags every -// value and each typed array holds only the values of its own class, in row -// order. Reading a column means walking `types` and taking the next entry from -// the matching array; NULLs occupy a tag and nothing else. +// SessionColumn is one column of a batch. Values are typed individually, as +// SQLite types them, so a column may mix classes: walk `types` and take the next +// entry from the matching array. A NULL occupies a tag only. message SessionColumn { - bytes types = 1; // one SessionValueType per row, one byte each - repeated sint64 ints = 2; // zigzag, so negative values stay small + bytes types = 1; // one SessionValueType per row + repeated sint64 ints = 2; repeated double doubles = 3; - // Text and blob values are concatenated with an exclusive end offset each, - // rather than `repeated string`, so a decoder can hand out subslices of one - // buffer instead of copying every value. + // Values concatenated, one exclusive end offset each: value i is + // data[ends[i-1]:ends[i]], with 0 implied before the first. bytes text_data = 4; repeated uint32 text_ends = 5; bytes blob_data = 6; diff --git a/protobufs/livekit_agent_session_store.proto b/protobufs/livekit_agent_session_store.proto index b3f53dc09..f346c143e 100644 --- a/protobufs/livekit_agent_session_store.proto +++ b/protobufs/livekit_agent_session_store.proto @@ -20,11 +20,9 @@ option go_package = "github.com/livekit/protocol/livekit"; option csharp_namespace = "LiveKit.Proto"; option ruby_package = "LiveKit::Proto"; -// AgentSessionStore is the MANAGEMENT plane for per-session SQLite databases: -// lifecycle and export only. All querying goes through the data plane (a -// WebSocket speaking SessionStoreRequest/SessionStoreResponse, defined in -// livekit_agent_session_db.proto). project_id is taken from the authenticated -// principal (access key) on every call, never a request field. +// AgentSessionStore manages per-session SQLite databases: lifecycle and export. +// Querying goes through the data plane in livekit_agent_session_db.proto. The +// project comes from the access token, never from a request field. service AgentSessionStore { rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse); rpc GetSession(GetSessionRequest) returns (GetSessionResponse); @@ -33,9 +31,7 @@ service AgentSessionStore { // Deletes the stored data too, not just the metadata row. rpc DeleteSession(DeleteSessionRequest) returns (DeleteSessionResponse); - // Exports a consistent full SQLite database file and returns a time-limited - // download URL (object-storage pre-authenticated request). Runs off the - // serving path; never blocks the session's writes. + // Exports a consistent SQLite file, returning a time-limited download URL. rpc Dump(DumpSessionRequest) returns (DumpSessionResponse); } @@ -73,13 +69,8 @@ message ListSessionsResponse { string next_page_token = 2; // empty when exhausted } -// SessionSummary is what listing returns: a session's immutable facts. -// -// tip is deliberately absent. It advances on every commit, so it cannot be -// carried in the listing index without putting a write on the commit path, which -// would mean listing reads every session's metadata row forever. It would also -// be stale the moment it was returned, since anything acting on it has to -// re-read. GetSession returns it for a single session. +// SessionSummary is a session's immutable fields. No tip: it changes on every +// commit, so call GetSession for it. message SessionSummary { string session_id = 1; string region = 2; From e2795aee776af6a63dabc5399e57062ae26c0303 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 22:50:06 +0000 Subject: [PATCH 09/24] generated protobuf --- livekit/livekit_agent_session_db.pb.go | 2 +- livekit/livekit_agent_session_store.pb.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/livekit/livekit_agent_session_db.pb.go b/livekit/livekit_agent_session_db.pb.go index 6383240a0..8cf5f4ded 100644 --- a/livekit/livekit_agent_session_db.pb.go +++ b/livekit/livekit_agent_session_db.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v7.35.1 // source: livekit_agent_session_db.proto package livekit diff --git a/livekit/livekit_agent_session_store.pb.go b/livekit/livekit_agent_session_store.pb.go index 102edd81c..6e9aeb6b1 100644 --- a/livekit/livekit_agent_session_store.pb.go +++ b/livekit/livekit_agent_session_store.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v7.35.1 // source: livekit_agent_session_store.proto package livekit From 17bed51d6b5201566c70f04249421ce6e22b6105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Tue, 28 Jul 2026 17:10:25 -0700 Subject: [PATCH 10/24] agent session store: document unset ttl_seconds as no expiry --- livekit/livekit_agent_session_store.pb.go | 12 ++++++------ protobufs/livekit_agent_session_store.proto | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/livekit/livekit_agent_session_store.pb.go b/livekit/livekit_agent_session_store.pb.go index 6e9aeb6b1..419899987 100644 --- a/livekit/livekit_agent_session_store.pb.go +++ b/livekit/livekit_agent_session_store.pb.go @@ -39,7 +39,7 @@ type CreateSessionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` UserAttributes string `protobuf:"bytes,2,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` // opaque JSON metadata for the caller - TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` // per-session TTL, clamped to a hard max; never extended + TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` // unset: never expires. Otherwise clamped to the server cap, and never extended unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -97,8 +97,8 @@ func (x *CreateSessionRequest) GetTtlSeconds() int64 { type CreateSessionResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // "SESS_..." - ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // "SESS_..." + ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -197,8 +197,8 @@ type GetSessionResponse struct { Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` - ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` - Tip int64 `protobuf:"varint,6,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence + ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires + Tip int64 `protobuf:"varint,6,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -387,7 +387,7 @@ type SessionSummary struct { Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` - ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` + ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } diff --git a/protobufs/livekit_agent_session_store.proto b/protobufs/livekit_agent_session_store.proto index f346c143e..69aa3ea3a 100644 --- a/protobufs/livekit_agent_session_store.proto +++ b/protobufs/livekit_agent_session_store.proto @@ -38,12 +38,12 @@ service AgentSessionStore { message CreateSessionRequest { string region = 1; string user_attributes = 2; // opaque JSON metadata for the caller - int64 ttl_seconds = 3; // per-session TTL, clamped to a hard max; never extended + int64 ttl_seconds = 3; // unset: never expires. Otherwise clamped to the server cap, and never extended } message CreateSessionResponse { string session_id = 1; // "SESS_..." - int64 expires_at_unix = 2; + int64 expires_at_unix = 2; // 0: never expires } message GetSessionRequest { @@ -55,7 +55,7 @@ message GetSessionResponse { string region = 2; string user_attributes = 3; int64 created_at_unix = 4; - int64 expires_at_unix = 5; + int64 expires_at_unix = 5; // 0: never expires int64 tip = 6; // latest durable commit sequence } @@ -76,7 +76,7 @@ message SessionSummary { string region = 2; string user_attributes = 3; int64 created_at_unix = 4; - int64 expires_at_unix = 5; + int64 expires_at_unix = 5; // 0: never expires } message DeleteSessionRequest { From cd0d79b18c06cbbf32e7b71ef69e850cd03ea366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Tue, 4 Aug 2026 13:15:09 -0700 Subject: [PATCH 11/24] agentdb: own namespace, and the unit is a database Review feedback: SessionStore, SessionValue, SessionPing and CreateSessionRequest are far too generic for the flat livekit package, where they would squat on names any other service might want. Prefixing them (CSValue and friends) is noise at every call site, so these move to their own namespace instead, the way protobufs/agent already does: package livekit.agentdb, go_package livekit/agentdb. Inside it the names need no prefix at all, so SessionValue becomes Value, SessionPing becomes Ping, and SessionStoreRequest/Response become ClientMessage/ServerMessage, which says what they are in a bidirectional protocol. The same review observed the protocol reads like a cloud database rather than anything to do with sessions, which is the conclusion the lifetime question reached from the other side: a database whose TTL is unset never expires and is meant to hold an agent's memory for years, so calling it a session was already wrong. The unit is now a database: CreateDatabase, GetDatabase, ListDatabases, DeleteDatabase, database_id, and the service is AgentDB. AgentGrant.SessionStoreAdmin becomes DatabaseAdmin (json databaseAdmin). The namespace needs its own protoc invocation, since protoc-gen-twirp refuses to mix go_package values in one run. --- auth/grants.go | 6 +- livekit/agentdb/livekit_agentdb.pb.go | 768 ++++++ livekit/agentdb/livekit_agentdb.twirp.go | 2250 +++++++++++++++++ livekit/agentdb/livekit_agentdb_data.pb.go | 1741 +++++++++++++ livekit/livekit_agent_session_db.pb.go | 1739 ------------- livekit/livekit_agent_session_store.pb.go | 769 ------ livekit/livekit_agent_session_store.twirp.go | 1679 ------------ magefile.go | 24 +- .../livekit_agentdb.proto} | 62 +- protobufs/agentdb/livekit_agentdb_data.proto | 164 ++ protobufs/livekit_agent_session_db.proto | 164 -- 11 files changed, 4979 insertions(+), 4387 deletions(-) create mode 100644 livekit/agentdb/livekit_agentdb.pb.go create mode 100644 livekit/agentdb/livekit_agentdb.twirp.go create mode 100644 livekit/agentdb/livekit_agentdb_data.pb.go delete mode 100644 livekit/livekit_agent_session_db.pb.go delete mode 100644 livekit/livekit_agent_session_store.pb.go delete mode 100644 livekit/livekit_agent_session_store.twirp.go rename protobufs/{livekit_agent_session_store.proto => agentdb/livekit_agentdb.proto} (57%) create mode 100644 protobufs/agentdb/livekit_agentdb_data.proto delete mode 100644 protobufs/livekit_agent_session_db.proto diff --git a/auth/grants.go b/auth/grants.go index ad51d416f..4fe7c57f5 100644 --- a/auth/grants.go +++ b/auth/grants.go @@ -581,8 +581,8 @@ type AgentGrant struct { Admin bool `json:"admin,omitempty"` // SimulationAdmin grants access to manage simulations and scenarios for evaluating agents. SimulationAdmin bool `json:"simulationAdmin,omitempty"` - // SessionStoreAdmin grants access to a project's agent session store databases. - SessionStoreAdmin bool `json:"sessionStoreAdmin,omitempty"` + // DatabaseAdmin grants access to a project's agent databases (AgentDB). + DatabaseAdmin bool `json:"databaseAdmin,omitempty"` } func (s *AgentGrant) Clone() *AgentGrant { @@ -602,7 +602,7 @@ func (s *AgentGrant) MarshalLogObject(e zapcore.ObjectEncoder) error { e.AddBool("Admin", s.Admin) e.AddBool("SimulationAdmin", s.SimulationAdmin) - e.AddBool("SessionStoreAdmin", s.SessionStoreAdmin) + e.AddBool("DatabaseAdmin", s.DatabaseAdmin) return nil } diff --git a/livekit/agentdb/livekit_agentdb.pb.go b/livekit/agentdb/livekit_agentdb.pb.go new file mode 100644 index 000000000..2a374ed81 --- /dev/null +++ b/livekit/agentdb/livekit_agentdb.pb.go @@ -0,0 +1,768 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: agentdb/livekit_agentdb.proto + +package agentdb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateDatabaseRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` + UserAttributes string `protobuf:"bytes,2,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` // opaque JSON metadata for the caller + TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` // unset: never expires. Otherwise clamped to the server cap, and never extended + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateDatabaseRequest) Reset() { + *x = CreateDatabaseRequest{} + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateDatabaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDatabaseRequest) ProtoMessage() {} + +func (x *CreateDatabaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDatabaseRequest.ProtoReflect.Descriptor instead. +func (*CreateDatabaseRequest) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateDatabaseRequest) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *CreateDatabaseRequest) GetUserAttributes() string { + if x != nil { + return x.UserAttributes + } + return "" +} + +func (x *CreateDatabaseRequest) GetTtlSeconds() int64 { + if x != nil { + return x.TtlSeconds + } + return 0 +} + +type CreateDatabaseResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` // "DB_..." + ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateDatabaseResponse) Reset() { + *x = CreateDatabaseResponse{} + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateDatabaseResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDatabaseResponse) ProtoMessage() {} + +func (x *CreateDatabaseResponse) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDatabaseResponse.ProtoReflect.Descriptor instead. +func (*CreateDatabaseResponse) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateDatabaseResponse) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +func (x *CreateDatabaseResponse) GetExpiresAtUnix() int64 { + if x != nil { + return x.ExpiresAtUnix + } + return 0 +} + +type GetDatabaseRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetDatabaseRequest) Reset() { + *x = GetDatabaseRequest{} + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDatabaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDatabaseRequest) ProtoMessage() {} + +func (x *GetDatabaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDatabaseRequest.ProtoReflect.Descriptor instead. +func (*GetDatabaseRequest) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{2} +} + +func (x *GetDatabaseRequest) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +type GetDatabaseResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` + CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` + ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires + Tip int64 `protobuf:"varint,6,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetDatabaseResponse) Reset() { + *x = GetDatabaseResponse{} + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDatabaseResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDatabaseResponse) ProtoMessage() {} + +func (x *GetDatabaseResponse) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDatabaseResponse.ProtoReflect.Descriptor instead. +func (*GetDatabaseResponse) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{3} +} + +func (x *GetDatabaseResponse) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +func (x *GetDatabaseResponse) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *GetDatabaseResponse) GetUserAttributes() string { + if x != nil { + return x.UserAttributes + } + return "" +} + +func (x *GetDatabaseResponse) GetCreatedAtUnix() int64 { + if x != nil { + return x.CreatedAtUnix + } + return 0 +} + +func (x *GetDatabaseResponse) GetExpiresAtUnix() int64 { + if x != nil { + return x.ExpiresAtUnix + } + return 0 +} + +func (x *GetDatabaseResponse) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +type ListDatabasesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // server-clamped + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // opaque cursor from a previous response + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListDatabasesRequest) Reset() { + *x = ListDatabasesRequest{} + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListDatabasesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDatabasesRequest) ProtoMessage() {} + +func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDatabasesRequest.ProtoReflect.Descriptor instead. +func (*ListDatabasesRequest) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{4} +} + +func (x *ListDatabasesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListDatabasesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListDatabasesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Databases []*DatabaseSummary `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // empty when exhausted + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListDatabasesResponse) Reset() { + *x = ListDatabasesResponse{} + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListDatabasesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDatabasesResponse) ProtoMessage() {} + +func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDatabasesResponse.ProtoReflect.Descriptor instead. +func (*ListDatabasesResponse) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{5} +} + +func (x *ListDatabasesResponse) GetDatabases() []*DatabaseSummary { + if x != nil { + return x.Databases + } + return nil +} + +func (x *ListDatabasesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// DatabaseSummary is a database's immutable fields. No tip: it changes on every +// commit, so call GetDatabase for it. +type DatabaseSummary struct { + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` + CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` + ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DatabaseSummary) Reset() { + *x = DatabaseSummary{} + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DatabaseSummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DatabaseSummary) ProtoMessage() {} + +func (x *DatabaseSummary) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DatabaseSummary.ProtoReflect.Descriptor instead. +func (*DatabaseSummary) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{6} +} + +func (x *DatabaseSummary) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +func (x *DatabaseSummary) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *DatabaseSummary) GetUserAttributes() string { + if x != nil { + return x.UserAttributes + } + return "" +} + +func (x *DatabaseSummary) GetCreatedAtUnix() int64 { + if x != nil { + return x.CreatedAtUnix + } + return 0 +} + +func (x *DatabaseSummary) GetExpiresAtUnix() int64 { + if x != nil { + return x.ExpiresAtUnix + } + return 0 +} + +type DeleteDatabaseRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteDatabaseRequest) Reset() { + *x = DeleteDatabaseRequest{} + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteDatabaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDatabaseRequest) ProtoMessage() {} + +func (x *DeleteDatabaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDatabaseRequest.ProtoReflect.Descriptor instead. +func (*DeleteDatabaseRequest) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteDatabaseRequest) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +type DeleteDatabaseResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteDatabaseResponse) Reset() { + *x = DeleteDatabaseResponse{} + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteDatabaseResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDatabaseResponse) ProtoMessage() {} + +func (x *DeleteDatabaseResponse) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDatabaseResponse.ProtoReflect.Descriptor instead. +func (*DeleteDatabaseResponse) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{8} +} + +type DumpDatabaseRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DumpDatabaseRequest) Reset() { + *x = DumpDatabaseRequest{} + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DumpDatabaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DumpDatabaseRequest) ProtoMessage() {} + +func (x *DumpDatabaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DumpDatabaseRequest.ProtoReflect.Descriptor instead. +func (*DumpDatabaseRequest) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{9} +} + +func (x *DumpDatabaseRequest) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +type DumpDatabaseResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + DownloadUrl string `protobuf:"bytes,1,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"` // pre-authenticated object-storage URL + ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // URL expiry + Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // commit sequence the dump is consistent at + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DumpDatabaseResponse) Reset() { + *x = DumpDatabaseResponse{} + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DumpDatabaseResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DumpDatabaseResponse) ProtoMessage() {} + +func (x *DumpDatabaseResponse) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DumpDatabaseResponse.ProtoReflect.Descriptor instead. +func (*DumpDatabaseResponse) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{10} +} + +func (x *DumpDatabaseResponse) GetDownloadUrl() string { + if x != nil { + return x.DownloadUrl + } + return "" +} + +func (x *DumpDatabaseResponse) GetExpiresAtUnix() int64 { + if x != nil { + return x.ExpiresAtUnix + } + return 0 +} + +func (x *DumpDatabaseResponse) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +var File_agentdb_livekit_agentdb_proto protoreflect.FileDescriptor + +const file_agentdb_livekit_agentdb_proto_rawDesc = "" + + "\n" + + "\x1dagentdb/livekit_agentdb.proto\x12\x0flivekit.agentdb\"y\n" + + "\x15CreateDatabaseRequest\x12\x16\n" + + "\x06region\x18\x01 \x01(\tR\x06region\x12'\n" + + "\x0fuser_attributes\x18\x02 \x01(\tR\x0euserAttributes\x12\x1f\n" + + "\vttl_seconds\x18\x03 \x01(\x03R\n" + + "ttlSeconds\"a\n" + + "\x16CreateDatabaseResponse\x12\x1f\n" + + "\vdatabase_id\x18\x01 \x01(\tR\n" + + "databaseId\x12&\n" + + "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\"5\n" + + "\x12GetDatabaseRequest\x12\x1f\n" + + "\vdatabase_id\x18\x01 \x01(\tR\n" + + "databaseId\"\xd9\x01\n" + + "\x13GetDatabaseResponse\x12\x1f\n" + + "\vdatabase_id\x18\x01 \x01(\tR\n" + + "databaseId\x12\x16\n" + + "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + + "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12&\n" + + "\x0fcreated_at_unix\x18\x04 \x01(\x03R\rcreatedAtUnix\x12&\n" + + "\x0fexpires_at_unix\x18\x05 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + + "\x03tip\x18\x06 \x01(\x03R\x03tip\"R\n" + + "\x14ListDatabasesRequest\x12\x1b\n" + + "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x02 \x01(\tR\tpageToken\"\x7f\n" + + "\x15ListDatabasesResponse\x12>\n" + + "\tdatabases\x18\x01 \x03(\v2 .livekit.agentdb.DatabaseSummaryR\tdatabases\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xc3\x01\n" + + "\x0fDatabaseSummary\x12\x1f\n" + + "\vdatabase_id\x18\x01 \x01(\tR\n" + + "databaseId\x12\x16\n" + + "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + + "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12&\n" + + "\x0fcreated_at_unix\x18\x04 \x01(\x03R\rcreatedAtUnix\x12&\n" + + "\x0fexpires_at_unix\x18\x05 \x01(\x03R\rexpiresAtUnix\"8\n" + + "\x15DeleteDatabaseRequest\x12\x1f\n" + + "\vdatabase_id\x18\x01 \x01(\tR\n" + + "databaseId\"\x18\n" + + "\x16DeleteDatabaseResponse\"6\n" + + "\x13DumpDatabaseRequest\x12\x1f\n" + + "\vdatabase_id\x18\x01 \x01(\tR\n" + + "databaseId\"s\n" + + "\x14DumpDatabaseResponse\x12!\n" + + "\fdownload_url\x18\x01 \x01(\tR\vdownloadUrl\x12&\n" + + "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + + "\x03tip\x18\x03 \x01(\x03R\x03tip2\xde\x03\n" + + "\aAgentDB\x12a\n" + + "\x0eCreateDatabase\x12&.livekit.agentdb.CreateDatabaseRequest\x1a'.livekit.agentdb.CreateDatabaseResponse\x12X\n" + + "\vGetDatabase\x12#.livekit.agentdb.GetDatabaseRequest\x1a$.livekit.agentdb.GetDatabaseResponse\x12^\n" + + "\rListDatabases\x12%.livekit.agentdb.ListDatabasesRequest\x1a&.livekit.agentdb.ListDatabasesResponse\x12a\n" + + "\x0eDeleteDatabase\x12&.livekit.agentdb.DeleteDatabaseRequest\x1a'.livekit.agentdb.DeleteDatabaseResponse\x12S\n" + + "\x04Dump\x12$.livekit.agentdb.DumpDatabaseRequest\x1a%.livekit.agentdb.DumpDatabaseResponseBNZ+github.com/livekit/protocol/livekit/agentdb\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" + +var ( + file_agentdb_livekit_agentdb_proto_rawDescOnce sync.Once + file_agentdb_livekit_agentdb_proto_rawDescData []byte +) + +func file_agentdb_livekit_agentdb_proto_rawDescGZIP() []byte { + file_agentdb_livekit_agentdb_proto_rawDescOnce.Do(func() { + file_agentdb_livekit_agentdb_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_agentdb_livekit_agentdb_proto_rawDesc), len(file_agentdb_livekit_agentdb_proto_rawDesc))) + }) + return file_agentdb_livekit_agentdb_proto_rawDescData +} + +var file_agentdb_livekit_agentdb_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_agentdb_livekit_agentdb_proto_goTypes = []any{ + (*CreateDatabaseRequest)(nil), // 0: livekit.agentdb.CreateDatabaseRequest + (*CreateDatabaseResponse)(nil), // 1: livekit.agentdb.CreateDatabaseResponse + (*GetDatabaseRequest)(nil), // 2: livekit.agentdb.GetDatabaseRequest + (*GetDatabaseResponse)(nil), // 3: livekit.agentdb.GetDatabaseResponse + (*ListDatabasesRequest)(nil), // 4: livekit.agentdb.ListDatabasesRequest + (*ListDatabasesResponse)(nil), // 5: livekit.agentdb.ListDatabasesResponse + (*DatabaseSummary)(nil), // 6: livekit.agentdb.DatabaseSummary + (*DeleteDatabaseRequest)(nil), // 7: livekit.agentdb.DeleteDatabaseRequest + (*DeleteDatabaseResponse)(nil), // 8: livekit.agentdb.DeleteDatabaseResponse + (*DumpDatabaseRequest)(nil), // 9: livekit.agentdb.DumpDatabaseRequest + (*DumpDatabaseResponse)(nil), // 10: livekit.agentdb.DumpDatabaseResponse +} +var file_agentdb_livekit_agentdb_proto_depIdxs = []int32{ + 6, // 0: livekit.agentdb.ListDatabasesResponse.databases:type_name -> livekit.agentdb.DatabaseSummary + 0, // 1: livekit.agentdb.AgentDB.CreateDatabase:input_type -> livekit.agentdb.CreateDatabaseRequest + 2, // 2: livekit.agentdb.AgentDB.GetDatabase:input_type -> livekit.agentdb.GetDatabaseRequest + 4, // 3: livekit.agentdb.AgentDB.ListDatabases:input_type -> livekit.agentdb.ListDatabasesRequest + 7, // 4: livekit.agentdb.AgentDB.DeleteDatabase:input_type -> livekit.agentdb.DeleteDatabaseRequest + 9, // 5: livekit.agentdb.AgentDB.Dump:input_type -> livekit.agentdb.DumpDatabaseRequest + 1, // 6: livekit.agentdb.AgentDB.CreateDatabase:output_type -> livekit.agentdb.CreateDatabaseResponse + 3, // 7: livekit.agentdb.AgentDB.GetDatabase:output_type -> livekit.agentdb.GetDatabaseResponse + 5, // 8: livekit.agentdb.AgentDB.ListDatabases:output_type -> livekit.agentdb.ListDatabasesResponse + 8, // 9: livekit.agentdb.AgentDB.DeleteDatabase:output_type -> livekit.agentdb.DeleteDatabaseResponse + 10, // 10: livekit.agentdb.AgentDB.Dump:output_type -> livekit.agentdb.DumpDatabaseResponse + 6, // [6:11] is the sub-list for method output_type + 1, // [1:6] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_agentdb_livekit_agentdb_proto_init() } +func file_agentdb_livekit_agentdb_proto_init() { + if File_agentdb_livekit_agentdb_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_agentdb_livekit_agentdb_proto_rawDesc), len(file_agentdb_livekit_agentdb_proto_rawDesc)), + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_agentdb_livekit_agentdb_proto_goTypes, + DependencyIndexes: file_agentdb_livekit_agentdb_proto_depIdxs, + MessageInfos: file_agentdb_livekit_agentdb_proto_msgTypes, + }.Build() + File_agentdb_livekit_agentdb_proto = out.File + file_agentdb_livekit_agentdb_proto_goTypes = nil + file_agentdb_livekit_agentdb_proto_depIdxs = nil +} diff --git a/livekit/agentdb/livekit_agentdb.twirp.go b/livekit/agentdb/livekit_agentdb.twirp.go new file mode 100644 index 000000000..f9059f163 --- /dev/null +++ b/livekit/agentdb/livekit_agentdb.twirp.go @@ -0,0 +1,2250 @@ +// Code generated by protoc-gen-twirp v8.1.3, DO NOT EDIT. +// source: agentdb/livekit_agentdb.proto + +package agentdb + +import context "context" +import fmt "fmt" +import http "net/http" +import io "io" +import json "encoding/json" +import strconv "strconv" +import strings "strings" + +import protojson "google.golang.org/protobuf/encoding/protojson" +import proto "google.golang.org/protobuf/proto" +import twirp "github.com/twitchtv/twirp" +import ctxsetters "github.com/twitchtv/twirp/ctxsetters" + +import bytes "bytes" +import errors "errors" +import path "path" +import url "net/url" + +// Version compatibility assertion. +// If the constant is not defined in the package, that likely means +// the package needs to be updated to work with this generated code. +// See https://twitchtv.github.io/twirp/docs/version_matrix.html +const _ = twirp.TwirpPackageMinVersion_8_1_0 + +// ================= +// AgentDB Interface +// ================= + +// AgentDB hands out SQLite databases: lifecycle and export. Querying goes +// through the data plane in livekit_agentdb_data.proto. The project comes from +// the access token, never from a request field. +type AgentDB interface { + CreateDatabase(context.Context, *CreateDatabaseRequest) (*CreateDatabaseResponse, error) + + GetDatabase(context.Context, *GetDatabaseRequest) (*GetDatabaseResponse, error) + + ListDatabases(context.Context, *ListDatabasesRequest) (*ListDatabasesResponse, error) + + // Deletes the stored data too, not just the metadata row. + DeleteDatabase(context.Context, *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) + + // Exports a consistent SQLite file, returning a time-limited download URL. + Dump(context.Context, *DumpDatabaseRequest) (*DumpDatabaseResponse, error) +} + +// ======================= +// AgentDB Protobuf Client +// ======================= + +type agentDBProtobufClient struct { + client HTTPClient + urls [5]string + interceptor twirp.Interceptor + opts twirp.ClientOptions +} + +// NewAgentDBProtobufClient creates a Protobuf client that implements the AgentDB interface. +// It communicates using Protobuf and can be configured with a custom HTTPClient. +func NewAgentDBProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) AgentDB { + if c, ok := client.(*http.Client); ok { + client = withoutRedirects(c) + } + + clientOpts := twirp.ClientOptions{} + for _, o := range opts { + o(&clientOpts) + } + + // Using ReadOpt allows backwards and forwards compatibility with new options in the future + literalURLs := false + _ = clientOpts.ReadOpt("literalURLs", &literalURLs) + var pathPrefix string + if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { + pathPrefix = "/twirp" // default prefix + } + + // Build method URLs: []/./ + serviceURL := sanitizeBaseURL(baseURL) + serviceURL += baseServicePath(pathPrefix, "livekit.agentdb", "AgentDB") + urls := [5]string{ + serviceURL + "CreateDatabase", + serviceURL + "GetDatabase", + serviceURL + "ListDatabases", + serviceURL + "DeleteDatabase", + serviceURL + "Dump", + } + + return &agentDBProtobufClient{ + client: client, + urls: urls, + interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...), + opts: clientOpts, + } +} + +func (c *agentDBProtobufClient) CreateDatabase(ctx context.Context, in *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") + ctx = ctxsetters.WithServiceName(ctx, "AgentDB") + ctx = ctxsetters.WithMethodName(ctx, "CreateDatabase") + caller := c.callCreateDatabase + if c.interceptor != nil { + caller = func(ctx context.Context, req *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*CreateDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*CreateDatabaseRequest) when calling interceptor") + } + return c.callCreateDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*CreateDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*CreateDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBProtobufClient) callCreateDatabase(ctx context.Context, in *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { + out := new(CreateDatabaseResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBProtobufClient) GetDatabase(ctx context.Context, in *GetDatabaseRequest) (*GetDatabaseResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") + ctx = ctxsetters.WithServiceName(ctx, "AgentDB") + ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") + caller := c.callGetDatabase + if c.interceptor != nil { + caller = func(ctx context.Context, req *GetDatabaseRequest) (*GetDatabaseResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*GetDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*GetDatabaseRequest) when calling interceptor") + } + return c.callGetDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*GetDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*GetDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBProtobufClient) callGetDatabase(ctx context.Context, in *GetDatabaseRequest) (*GetDatabaseResponse, error) { + out := new(GetDatabaseResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBProtobufClient) ListDatabases(ctx context.Context, in *ListDatabasesRequest) (*ListDatabasesResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") + ctx = ctxsetters.WithServiceName(ctx, "AgentDB") + ctx = ctxsetters.WithMethodName(ctx, "ListDatabases") + caller := c.callListDatabases + if c.interceptor != nil { + caller = func(ctx context.Context, req *ListDatabasesRequest) (*ListDatabasesResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*ListDatabasesRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*ListDatabasesRequest) when calling interceptor") + } + return c.callListDatabases(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*ListDatabasesResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*ListDatabasesResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBProtobufClient) callListDatabases(ctx context.Context, in *ListDatabasesRequest) (*ListDatabasesResponse, error) { + out := new(ListDatabasesResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBProtobufClient) DeleteDatabase(ctx context.Context, in *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") + ctx = ctxsetters.WithServiceName(ctx, "AgentDB") + ctx = ctxsetters.WithMethodName(ctx, "DeleteDatabase") + caller := c.callDeleteDatabase + if c.interceptor != nil { + caller = func(ctx context.Context, req *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DeleteDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DeleteDatabaseRequest) when calling interceptor") + } + return c.callDeleteDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DeleteDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DeleteDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBProtobufClient) callDeleteDatabase(ctx context.Context, in *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { + out := new(DeleteDatabaseResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBProtobufClient) Dump(ctx context.Context, in *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") + ctx = ctxsetters.WithServiceName(ctx, "AgentDB") + ctx = ctxsetters.WithMethodName(ctx, "Dump") + caller := c.callDump + if c.interceptor != nil { + caller = func(ctx context.Context, req *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DumpDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DumpDatabaseRequest) when calling interceptor") + } + return c.callDump(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DumpDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DumpDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBProtobufClient) callDump(ctx context.Context, in *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { + out := new(DumpDatabaseResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +// =================== +// AgentDB JSON Client +// =================== + +type agentDBJSONClient struct { + client HTTPClient + urls [5]string + interceptor twirp.Interceptor + opts twirp.ClientOptions +} + +// NewAgentDBJSONClient creates a JSON client that implements the AgentDB interface. +// It communicates using JSON and can be configured with a custom HTTPClient. +func NewAgentDBJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) AgentDB { + if c, ok := client.(*http.Client); ok { + client = withoutRedirects(c) + } + + clientOpts := twirp.ClientOptions{} + for _, o := range opts { + o(&clientOpts) + } + + // Using ReadOpt allows backwards and forwards compatibility with new options in the future + literalURLs := false + _ = clientOpts.ReadOpt("literalURLs", &literalURLs) + var pathPrefix string + if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { + pathPrefix = "/twirp" // default prefix + } + + // Build method URLs: []/./ + serviceURL := sanitizeBaseURL(baseURL) + serviceURL += baseServicePath(pathPrefix, "livekit.agentdb", "AgentDB") + urls := [5]string{ + serviceURL + "CreateDatabase", + serviceURL + "GetDatabase", + serviceURL + "ListDatabases", + serviceURL + "DeleteDatabase", + serviceURL + "Dump", + } + + return &agentDBJSONClient{ + client: client, + urls: urls, + interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...), + opts: clientOpts, + } +} + +func (c *agentDBJSONClient) CreateDatabase(ctx context.Context, in *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") + ctx = ctxsetters.WithServiceName(ctx, "AgentDB") + ctx = ctxsetters.WithMethodName(ctx, "CreateDatabase") + caller := c.callCreateDatabase + if c.interceptor != nil { + caller = func(ctx context.Context, req *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*CreateDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*CreateDatabaseRequest) when calling interceptor") + } + return c.callCreateDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*CreateDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*CreateDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBJSONClient) callCreateDatabase(ctx context.Context, in *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { + out := new(CreateDatabaseResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBJSONClient) GetDatabase(ctx context.Context, in *GetDatabaseRequest) (*GetDatabaseResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") + ctx = ctxsetters.WithServiceName(ctx, "AgentDB") + ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") + caller := c.callGetDatabase + if c.interceptor != nil { + caller = func(ctx context.Context, req *GetDatabaseRequest) (*GetDatabaseResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*GetDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*GetDatabaseRequest) when calling interceptor") + } + return c.callGetDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*GetDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*GetDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBJSONClient) callGetDatabase(ctx context.Context, in *GetDatabaseRequest) (*GetDatabaseResponse, error) { + out := new(GetDatabaseResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBJSONClient) ListDatabases(ctx context.Context, in *ListDatabasesRequest) (*ListDatabasesResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") + ctx = ctxsetters.WithServiceName(ctx, "AgentDB") + ctx = ctxsetters.WithMethodName(ctx, "ListDatabases") + caller := c.callListDatabases + if c.interceptor != nil { + caller = func(ctx context.Context, req *ListDatabasesRequest) (*ListDatabasesResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*ListDatabasesRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*ListDatabasesRequest) when calling interceptor") + } + return c.callListDatabases(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*ListDatabasesResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*ListDatabasesResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBJSONClient) callListDatabases(ctx context.Context, in *ListDatabasesRequest) (*ListDatabasesResponse, error) { + out := new(ListDatabasesResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBJSONClient) DeleteDatabase(ctx context.Context, in *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") + ctx = ctxsetters.WithServiceName(ctx, "AgentDB") + ctx = ctxsetters.WithMethodName(ctx, "DeleteDatabase") + caller := c.callDeleteDatabase + if c.interceptor != nil { + caller = func(ctx context.Context, req *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DeleteDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DeleteDatabaseRequest) when calling interceptor") + } + return c.callDeleteDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DeleteDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DeleteDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBJSONClient) callDeleteDatabase(ctx context.Context, in *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { + out := new(DeleteDatabaseResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBJSONClient) Dump(ctx context.Context, in *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") + ctx = ctxsetters.WithServiceName(ctx, "AgentDB") + ctx = ctxsetters.WithMethodName(ctx, "Dump") + caller := c.callDump + if c.interceptor != nil { + caller = func(ctx context.Context, req *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DumpDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DumpDatabaseRequest) when calling interceptor") + } + return c.callDump(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DumpDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DumpDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBJSONClient) callDump(ctx context.Context, in *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { + out := new(DumpDatabaseResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +// ====================== +// AgentDB Server Handler +// ====================== + +type agentDBServer struct { + AgentDB + interceptor twirp.Interceptor + hooks *twirp.ServerHooks + pathPrefix string // prefix for routing + jsonSkipDefaults bool // do not include unpopulated fields (default values) in the response + jsonCamelCase bool // JSON fields are serialized as lowerCamelCase rather than keeping the original proto names +} + +// NewAgentDBServer builds a TwirpServer that can be used as an http.Handler to handle +// HTTP requests that are routed to the right method in the provided svc implementation. +// The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks). +func NewAgentDBServer(svc AgentDB, opts ...interface{}) TwirpServer { + serverOpts := newServerOpts(opts) + + // Using ReadOpt allows backwards and forwards compatibility with new options in the future + jsonSkipDefaults := false + _ = serverOpts.ReadOpt("jsonSkipDefaults", &jsonSkipDefaults) + jsonCamelCase := false + _ = serverOpts.ReadOpt("jsonCamelCase", &jsonCamelCase) + var pathPrefix string + if ok := serverOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { + pathPrefix = "/twirp" // default prefix + } + + return &agentDBServer{ + AgentDB: svc, + hooks: serverOpts.Hooks, + interceptor: twirp.ChainInterceptors(serverOpts.Interceptors...), + pathPrefix: pathPrefix, + jsonSkipDefaults: jsonSkipDefaults, + jsonCamelCase: jsonCamelCase, + } +} + +// writeError writes an HTTP response with a valid Twirp error format, and triggers hooks. +// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err) +func (s *agentDBServer) writeError(ctx context.Context, resp http.ResponseWriter, err error) { + writeError(ctx, resp, err, s.hooks) +} + +// handleRequestBodyError is used to handle error when the twirp server cannot read request +func (s *agentDBServer) handleRequestBodyError(ctx context.Context, resp http.ResponseWriter, msg string, err error) { + if context.Canceled == ctx.Err() { + s.writeError(ctx, resp, twirp.NewError(twirp.Canceled, "failed to read request: context canceled")) + return + } + if context.DeadlineExceeded == ctx.Err() { + s.writeError(ctx, resp, twirp.NewError(twirp.DeadlineExceeded, "failed to read request: deadline exceeded")) + return + } + s.writeError(ctx, resp, twirp.WrapError(malformedRequestError(msg), err)) +} + +// AgentDBPathPrefix is a convenience constant that may identify URL paths. +// Should be used with caution, it only matches routes generated by Twirp Go clients, +// with the default "/twirp" prefix and default CamelCase service and method names. +// More info: https://twitchtv.github.io/twirp/docs/routing.html +const AgentDBPathPrefix = "/twirp/livekit.agentdb.AgentDB/" + +func (s *agentDBServer) ServeHTTP(resp http.ResponseWriter, req *http.Request) { + ctx := req.Context() + ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") + ctx = ctxsetters.WithServiceName(ctx, "AgentDB") + ctx = ctxsetters.WithResponseWriter(ctx, resp) + + var err error + ctx, err = callRequestReceived(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + if req.Method != "POST" { + msg := fmt.Sprintf("unsupported method %q (only POST is allowed)", req.Method) + s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) + return + } + + // Verify path format: []/./ + prefix, pkgService, method := parseTwirpPath(req.URL.Path) + if pkgService != "livekit.agentdb.AgentDB" { + msg := fmt.Sprintf("no handler for path %q", req.URL.Path) + s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) + return + } + if prefix != s.pathPrefix { + msg := fmt.Sprintf("invalid path prefix %q, expected %q, on path %q", prefix, s.pathPrefix, req.URL.Path) + s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) + return + } + + switch method { + case "CreateDatabase": + s.serveCreateDatabase(ctx, resp, req) + return + case "GetDatabase": + s.serveGetDatabase(ctx, resp, req) + return + case "ListDatabases": + s.serveListDatabases(ctx, resp, req) + return + case "DeleteDatabase": + s.serveDeleteDatabase(ctx, resp, req) + return + case "Dump": + s.serveDump(ctx, resp, req) + return + default: + msg := fmt.Sprintf("no handler for path %q", req.URL.Path) + s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) + return + } +} + +func (s *agentDBServer) serveCreateDatabase(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveCreateDatabaseJSON(ctx, resp, req) + case "application/protobuf": + s.serveCreateDatabaseProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentDBServer) serveCreateDatabaseJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "CreateDatabase") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(CreateDatabaseRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentDB.CreateDatabase + if s.interceptor != nil { + handler = func(ctx context.Context, req *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*CreateDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*CreateDatabaseRequest) when calling interceptor") + } + return s.AgentDB.CreateDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*CreateDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*CreateDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *CreateDatabaseResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *CreateDatabaseResponse and nil error while calling CreateDatabase. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServer) serveCreateDatabaseProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "CreateDatabase") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(CreateDatabaseRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentDB.CreateDatabase + if s.interceptor != nil { + handler = func(ctx context.Context, req *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*CreateDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*CreateDatabaseRequest) when calling interceptor") + } + return s.AgentDB.CreateDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*CreateDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*CreateDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *CreateDatabaseResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *CreateDatabaseResponse and nil error while calling CreateDatabase. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServer) serveGetDatabase(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveGetDatabaseJSON(ctx, resp, req) + case "application/protobuf": + s.serveGetDatabaseProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentDBServer) serveGetDatabaseJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(GetDatabaseRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentDB.GetDatabase + if s.interceptor != nil { + handler = func(ctx context.Context, req *GetDatabaseRequest) (*GetDatabaseResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*GetDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*GetDatabaseRequest) when calling interceptor") + } + return s.AgentDB.GetDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*GetDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*GetDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *GetDatabaseResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *GetDatabaseResponse and nil error while calling GetDatabase. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServer) serveGetDatabaseProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(GetDatabaseRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentDB.GetDatabase + if s.interceptor != nil { + handler = func(ctx context.Context, req *GetDatabaseRequest) (*GetDatabaseResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*GetDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*GetDatabaseRequest) when calling interceptor") + } + return s.AgentDB.GetDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*GetDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*GetDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *GetDatabaseResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *GetDatabaseResponse and nil error while calling GetDatabase. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServer) serveListDatabases(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveListDatabasesJSON(ctx, resp, req) + case "application/protobuf": + s.serveListDatabasesProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentDBServer) serveListDatabasesJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "ListDatabases") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(ListDatabasesRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentDB.ListDatabases + if s.interceptor != nil { + handler = func(ctx context.Context, req *ListDatabasesRequest) (*ListDatabasesResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*ListDatabasesRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*ListDatabasesRequest) when calling interceptor") + } + return s.AgentDB.ListDatabases(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*ListDatabasesResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*ListDatabasesResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *ListDatabasesResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *ListDatabasesResponse and nil error while calling ListDatabases. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServer) serveListDatabasesProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "ListDatabases") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(ListDatabasesRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentDB.ListDatabases + if s.interceptor != nil { + handler = func(ctx context.Context, req *ListDatabasesRequest) (*ListDatabasesResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*ListDatabasesRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*ListDatabasesRequest) when calling interceptor") + } + return s.AgentDB.ListDatabases(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*ListDatabasesResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*ListDatabasesResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *ListDatabasesResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *ListDatabasesResponse and nil error while calling ListDatabases. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServer) serveDeleteDatabase(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveDeleteDatabaseJSON(ctx, resp, req) + case "application/protobuf": + s.serveDeleteDatabaseProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentDBServer) serveDeleteDatabaseJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "DeleteDatabase") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(DeleteDatabaseRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentDB.DeleteDatabase + if s.interceptor != nil { + handler = func(ctx context.Context, req *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DeleteDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DeleteDatabaseRequest) when calling interceptor") + } + return s.AgentDB.DeleteDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DeleteDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DeleteDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *DeleteDatabaseResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *DeleteDatabaseResponse and nil error while calling DeleteDatabase. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServer) serveDeleteDatabaseProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "DeleteDatabase") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(DeleteDatabaseRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentDB.DeleteDatabase + if s.interceptor != nil { + handler = func(ctx context.Context, req *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DeleteDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DeleteDatabaseRequest) when calling interceptor") + } + return s.AgentDB.DeleteDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DeleteDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DeleteDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *DeleteDatabaseResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *DeleteDatabaseResponse and nil error while calling DeleteDatabase. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServer) serveDump(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveDumpJSON(ctx, resp, req) + case "application/protobuf": + s.serveDumpProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentDBServer) serveDumpJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "Dump") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(DumpDatabaseRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentDB.Dump + if s.interceptor != nil { + handler = func(ctx context.Context, req *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DumpDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DumpDatabaseRequest) when calling interceptor") + } + return s.AgentDB.Dump(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DumpDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DumpDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *DumpDatabaseResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *DumpDatabaseResponse and nil error while calling Dump. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServer) serveDumpProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "Dump") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(DumpDatabaseRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentDB.Dump + if s.interceptor != nil { + handler = func(ctx context.Context, req *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*DumpDatabaseRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*DumpDatabaseRequest) when calling interceptor") + } + return s.AgentDB.Dump(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*DumpDatabaseResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*DumpDatabaseResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *DumpDatabaseResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *DumpDatabaseResponse and nil error while calling Dump. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServer) ServiceDescriptor() ([]byte, int) { + return twirpFileDescriptor0, 0 +} + +func (s *agentDBServer) ProtocGenTwirpVersion() string { + return "v8.1.3" +} + +// PathPrefix returns the base service path, in the form: "//./" +// that is everything in a Twirp route except for the . This can be used for routing, +// for example to identify the requests that are targeted to this service in a mux. +func (s *agentDBServer) PathPrefix() string { + return baseServicePath(s.pathPrefix, "livekit.agentdb", "AgentDB") +} + +// ===== +// Utils +// ===== + +// HTTPClient is the interface used by generated clients to send HTTP requests. +// It is fulfilled by *(net/http).Client, which is sufficient for most users. +// Users can provide their own implementation for special retry policies. +// +// HTTPClient implementations should not follow redirects. Redirects are +// automatically disabled if *(net/http).Client is passed to client +// constructors. See the withoutRedirects function in this file for more +// details. +type HTTPClient interface { + Do(req *http.Request) (*http.Response, error) +} + +// TwirpServer is the interface generated server structs will support: they're +// HTTP handlers with additional methods for accessing metadata about the +// service. Those accessors are a low-level API for building reflection tools. +// Most people can think of TwirpServers as just http.Handlers. +type TwirpServer interface { + http.Handler + + // ServiceDescriptor returns gzipped bytes describing the .proto file that + // this service was generated from. Once unzipped, the bytes can be + // unmarshalled as a + // google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto. + // + // The returned integer is the index of this particular service within that + // FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a + // low-level field, expected to be used for reflection. + ServiceDescriptor() ([]byte, int) + + // ProtocGenTwirpVersion is the semantic version string of the version of + // twirp used to generate this file. + ProtocGenTwirpVersion() string + + // PathPrefix returns the HTTP URL path prefix for all methods handled by this + // service. This can be used with an HTTP mux to route Twirp requests. + // The path prefix is in the form: "//./" + // that is, everything in a Twirp route except for the at the end. + PathPrefix() string +} + +func newServerOpts(opts []interface{}) *twirp.ServerOptions { + serverOpts := &twirp.ServerOptions{} + for _, opt := range opts { + switch o := opt.(type) { + case twirp.ServerOption: + o(serverOpts) + case *twirp.ServerHooks: // backwards compatibility, allow to specify hooks as an argument + twirp.WithServerHooks(o)(serverOpts) + case nil: // backwards compatibility, allow nil value for the argument + continue + default: + panic(fmt.Sprintf("Invalid option type %T, please use a twirp.ServerOption", o)) + } + } + return serverOpts +} + +// WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). +// Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. +// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err) +func WriteError(resp http.ResponseWriter, err error) { + writeError(context.Background(), resp, err, nil) +} + +// writeError writes Twirp errors in the response and triggers hooks. +func writeError(ctx context.Context, resp http.ResponseWriter, err error, hooks *twirp.ServerHooks) { + // Convert to a twirp.Error. Non-twirp errors are converted to internal errors. + var twerr twirp.Error + if !errors.As(err, &twerr) { + twerr = twirp.InternalErrorWith(err) + } + + statusCode := twirp.ServerHTTPStatusFromErrorCode(twerr.Code()) + ctx = ctxsetters.WithStatusCode(ctx, statusCode) + ctx = callError(ctx, hooks, twerr) + + respBody := marshalErrorToJSON(twerr) + + resp.Header().Set("Content-Type", "application/json") // Error responses are always JSON + resp.Header().Set("Content-Length", strconv.Itoa(len(respBody))) + resp.WriteHeader(statusCode) // set HTTP status code and send response + + _, writeErr := resp.Write(respBody) + if writeErr != nil { + // We have three options here. We could log the error, call the Error + // hook, or just silently ignore the error. + // + // Logging is unacceptable because we don't have a user-controlled + // logger; writing out to stderr without permission is too rude. + // + // Calling the Error hook would confuse users: it would mean the Error + // hook got called twice for one request, which is likely to lead to + // duplicated log messages and metrics, no matter how well we document + // the behavior. + // + // Silently ignoring the error is our least-bad option. It's highly + // likely that the connection is broken and the original 'err' says + // so anyway. + _ = writeErr + } + + callResponseSent(ctx, hooks) +} + +// sanitizeBaseURL parses the the baseURL, and adds the "http" scheme if needed. +// If the URL is unparsable, the baseURL is returned unchanged. +func sanitizeBaseURL(baseURL string) string { + u, err := url.Parse(baseURL) + if err != nil { + return baseURL // invalid URL will fail later when making requests + } + if u.Scheme == "" { + u.Scheme = "http" + } + return u.String() +} + +// baseServicePath composes the path prefix for the service (without ). +// e.g.: baseServicePath("/twirp", "my.pkg", "MyService") +// +// returns => "/twirp/my.pkg.MyService/" +// +// e.g.: baseServicePath("", "", "MyService") +// +// returns => "/MyService/" +func baseServicePath(prefix, pkg, service string) string { + fullServiceName := service + if pkg != "" { + fullServiceName = pkg + "." + service + } + return path.Join("/", prefix, fullServiceName) + "/" +} + +// parseTwirpPath extracts path components form a valid Twirp route. +// Expected format: "[]/./" +// e.g.: prefix, pkgService, method := parseTwirpPath("/twirp/pkg.Svc/MakeHat") +func parseTwirpPath(path string) (string, string, string) { + parts := strings.Split(path, "/") + if len(parts) < 2 { + return "", "", "" + } + method := parts[len(parts)-1] + pkgService := parts[len(parts)-2] + prefix := strings.Join(parts[0:len(parts)-2], "/") + return prefix, pkgService, method +} + +// getCustomHTTPReqHeaders retrieves a copy of any headers that are set in +// a context through the twirp.WithHTTPRequestHeaders function. +// If there are no headers set, or if they have the wrong type, nil is returned. +func getCustomHTTPReqHeaders(ctx context.Context) http.Header { + header, ok := twirp.HTTPRequestHeaders(ctx) + if !ok || header == nil { + return nil + } + copied := make(http.Header) + for k, vv := range header { + if vv == nil { + copied[k] = nil + continue + } + copied[k] = make([]string, len(vv)) + copy(copied[k], vv) + } + return copied +} + +// newRequest makes an http.Request from a client, adding common headers. +func newRequest(ctx context.Context, url string, reqBody io.Reader, contentType string) (*http.Request, error) { + req, err := http.NewRequest("POST", url, reqBody) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if customHeader := getCustomHTTPReqHeaders(ctx); customHeader != nil { + req.Header = customHeader + } + req.Header.Set("Accept", contentType) + req.Header.Set("Content-Type", contentType) + req.Header.Set("Twirp-Version", "v8.1.3") + return req, nil +} + +// JSON serialization for errors +type twerrJSON struct { + Code string `json:"code"` + Msg string `json:"msg"` + Meta map[string]string `json:"meta,omitempty"` +} + +// marshalErrorToJSON returns JSON from a twirp.Error, that can be used as HTTP error response body. +// If serialization fails, it will use a descriptive Internal error instead. +func marshalErrorToJSON(twerr twirp.Error) []byte { + // make sure that msg is not too large + msg := twerr.Msg() + if len(msg) > 1e6 { + msg = msg[:1e6] + } + + tj := twerrJSON{ + Code: string(twerr.Code()), + Msg: msg, + Meta: twerr.MetaMap(), + } + + buf, err := json.Marshal(&tj) + if err != nil { + buf = []byte("{\"type\": \"" + twirp.Internal + "\", \"msg\": \"There was an error but it could not be serialized into JSON\"}") // fallback + } + + return buf +} + +// errorFromResponse builds a twirp.Error from a non-200 HTTP response. +// If the response has a valid serialized Twirp error, then it's returned. +// If not, the response status code is used to generate a similar twirp +// error. See twirpErrorFromIntermediary for more info on intermediary errors. +func errorFromResponse(resp *http.Response) twirp.Error { + statusCode := resp.StatusCode + statusText := http.StatusText(statusCode) + + if isHTTPRedirect(statusCode) { + // Unexpected redirect: it must be an error from an intermediary. + // Twirp clients don't follow redirects automatically, Twirp only handles + // POST requests, redirects should only happen on GET and HEAD requests. + location := resp.Header.Get("Location") + msg := fmt.Sprintf("unexpected HTTP status code %d %q received, Location=%q", statusCode, statusText, location) + return twirpErrorFromIntermediary(statusCode, msg, location) + } + + respBodyBytes, err := io.ReadAll(resp.Body) + if err != nil { + return wrapInternal(err, "failed to read server error response body") + } + + var tj twerrJSON + dec := json.NewDecoder(bytes.NewReader(respBodyBytes)) + dec.DisallowUnknownFields() + if err := dec.Decode(&tj); err != nil || tj.Code == "" { + // Invalid JSON response; it must be an error from an intermediary. + msg := fmt.Sprintf("Error from intermediary with HTTP status code %d %q", statusCode, statusText) + return twirpErrorFromIntermediary(statusCode, msg, string(respBodyBytes)) + } + + errorCode := twirp.ErrorCode(tj.Code) + if !twirp.IsValidErrorCode(errorCode) { + msg := "invalid type returned from server error response: " + tj.Code + return twirp.InternalError(msg).WithMeta("body", string(respBodyBytes)) + } + + twerr := twirp.NewError(errorCode, tj.Msg) + for k, v := range tj.Meta { + twerr = twerr.WithMeta(k, v) + } + return twerr +} + +// twirpErrorFromIntermediary maps HTTP errors from non-twirp sources to twirp errors. +// The mapping is similar to gRPC: https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md. +// Returned twirp Errors have some additional metadata for inspection. +func twirpErrorFromIntermediary(status int, msg string, bodyOrLocation string) twirp.Error { + var code twirp.ErrorCode + if isHTTPRedirect(status) { // 3xx + code = twirp.Internal + } else { + switch status { + case 400: // Bad Request + code = twirp.Internal + case 401: // Unauthorized + code = twirp.Unauthenticated + case 403: // Forbidden + code = twirp.PermissionDenied + case 404: // Not Found + code = twirp.BadRoute + case 429: // Too Many Requests + code = twirp.ResourceExhausted + case 502, 503, 504: // Bad Gateway, Service Unavailable, Gateway Timeout + code = twirp.Unavailable + default: // All other codes + code = twirp.Unknown + } + } + + twerr := twirp.NewError(code, msg) + twerr = twerr.WithMeta("http_error_from_intermediary", "true") // to easily know if this error was from intermediary + twerr = twerr.WithMeta("status_code", strconv.Itoa(status)) + if isHTTPRedirect(status) { + twerr = twerr.WithMeta("location", bodyOrLocation) + } else { + twerr = twerr.WithMeta("body", bodyOrLocation) + } + return twerr +} + +func isHTTPRedirect(status int) bool { + return status >= 300 && status <= 399 +} + +// wrapInternal wraps an error with a prefix as an Internal error. +// The original error cause is accessible by github.com/pkg/errors.Cause. +func wrapInternal(err error, prefix string) twirp.Error { + return twirp.InternalErrorWith(&wrappedError{prefix: prefix, cause: err}) +} + +type wrappedError struct { + prefix string + cause error +} + +func (e *wrappedError) Error() string { return e.prefix + ": " + e.cause.Error() } +func (e *wrappedError) Unwrap() error { return e.cause } // for go1.13 + errors.Is/As +func (e *wrappedError) Cause() error { return e.cause } // for github.com/pkg/errors + +// ensurePanicResponses makes sure that rpc methods causing a panic still result in a Twirp Internal +// error response (status 500), and error hooks are properly called with the panic wrapped as an error. +// The panic is re-raised so it can be handled normally with middleware. +func ensurePanicResponses(ctx context.Context, resp http.ResponseWriter, hooks *twirp.ServerHooks) { + if r := recover(); r != nil { + // Wrap the panic as an error so it can be passed to error hooks. + // The original error is accessible from error hooks, but not visible in the response. + err := errFromPanic(r) + twerr := &internalWithCause{msg: "Internal service panic", cause: err} + // Actually write the error + writeError(ctx, resp, twerr, hooks) + // If possible, flush the error to the wire. + f, ok := resp.(http.Flusher) + if ok { + f.Flush() + } + + panic(r) + } +} + +// errFromPanic returns the typed error if the recovered panic is an error, otherwise formats as error. +func errFromPanic(p interface{}) error { + if err, ok := p.(error); ok { + return err + } + return fmt.Errorf("panic: %v", p) +} + +// internalWithCause is a Twirp Internal error wrapping an original error cause, +// but the original error message is not exposed on Msg(). The original error +// can be checked with go1.13+ errors.Is/As, and also by (github.com/pkg/errors).Unwrap +type internalWithCause struct { + msg string + cause error +} + +func (e *internalWithCause) Unwrap() error { return e.cause } // for go1.13 + errors.Is/As +func (e *internalWithCause) Cause() error { return e.cause } // for github.com/pkg/errors +func (e *internalWithCause) Error() string { return e.msg + ": " + e.cause.Error() } +func (e *internalWithCause) Code() twirp.ErrorCode { return twirp.Internal } +func (e *internalWithCause) Msg() string { return e.msg } +func (e *internalWithCause) Meta(key string) string { return "" } +func (e *internalWithCause) MetaMap() map[string]string { return nil } +func (e *internalWithCause) WithMeta(key string, val string) twirp.Error { return e } + +// malformedRequestError is used when the twirp server cannot unmarshal a request +func malformedRequestError(msg string) twirp.Error { + return twirp.NewError(twirp.Malformed, msg) +} + +// badRouteError is used when the twirp server cannot route a request +func badRouteError(msg string, method, url string) twirp.Error { + err := twirp.NewError(twirp.BadRoute, msg) + err = err.WithMeta("twirp_invalid_route", method+" "+url) + return err +} + +// withoutRedirects makes sure that the POST request can not be redirected. +// The standard library will, by default, redirect requests (including POSTs) if it gets a 302 or +// 303 response, and also 301s in go1.8. It redirects by making a second request, changing the +// method to GET and removing the body. This produces very confusing error messages, so instead we +// set a redirect policy that always errors. This stops Go from executing the redirect. +// +// We have to be a little careful in case the user-provided http.Client has its own CheckRedirect +// policy - if so, we'll run through that policy first. +// +// Because this requires modifying the http.Client, we make a new copy of the client and return it. +func withoutRedirects(in *http.Client) *http.Client { + copy := *in + copy.CheckRedirect = func(req *http.Request, via []*http.Request) error { + if in.CheckRedirect != nil { + // Run the input's redirect if it exists, in case it has side effects, but ignore any error it + // returns, since we want to use ErrUseLastResponse. + err := in.CheckRedirect(req, via) + _ = err // Silly, but this makes sure generated code passes errcheck -blank, which some people use. + } + return http.ErrUseLastResponse + } + return © +} + +// doProtobufRequest makes a Protobuf request to the remote Twirp service. +func doProtobufRequest(ctx context.Context, client HTTPClient, hooks *twirp.ClientHooks, url string, in, out proto.Message) (_ context.Context, err error) { + reqBodyBytes, err := proto.Marshal(in) + if err != nil { + return ctx, wrapInternal(err, "failed to marshal proto request") + } + reqBody := bytes.NewBuffer(reqBodyBytes) + if err = ctx.Err(); err != nil { + return ctx, wrapInternal(err, "aborted because context was done") + } + + req, err := newRequest(ctx, url, reqBody, "application/protobuf") + if err != nil { + return ctx, wrapInternal(err, "could not build request") + } + ctx, err = callClientRequestPrepared(ctx, hooks, req) + if err != nil { + return ctx, err + } + + req = req.WithContext(ctx) + resp, err := client.Do(req) + if err != nil { + return ctx, wrapInternal(err, "failed to do request") + } + defer func() { _ = resp.Body.Close() }() + + if err = ctx.Err(); err != nil { + return ctx, wrapInternal(err, "aborted because context was done") + } + + if resp.StatusCode != 200 { + return ctx, errorFromResponse(resp) + } + + respBodyBytes, err := io.ReadAll(resp.Body) + if err != nil { + return ctx, wrapInternal(err, "failed to read response body") + } + if err = ctx.Err(); err != nil { + return ctx, wrapInternal(err, "aborted because context was done") + } + + if err = proto.Unmarshal(respBodyBytes, out); err != nil { + return ctx, wrapInternal(err, "failed to unmarshal proto response") + } + return ctx, nil +} + +// doJSONRequest makes a JSON request to the remote Twirp service. +func doJSONRequest(ctx context.Context, client HTTPClient, hooks *twirp.ClientHooks, url string, in, out proto.Message) (_ context.Context, err error) { + marshaler := &protojson.MarshalOptions{UseProtoNames: true} + reqBytes, err := marshaler.Marshal(in) + if err != nil { + return ctx, wrapInternal(err, "failed to marshal json request") + } + if err = ctx.Err(); err != nil { + return ctx, wrapInternal(err, "aborted because context was done") + } + + req, err := newRequest(ctx, url, bytes.NewReader(reqBytes), "application/json") + if err != nil { + return ctx, wrapInternal(err, "could not build request") + } + ctx, err = callClientRequestPrepared(ctx, hooks, req) + if err != nil { + return ctx, err + } + + req = req.WithContext(ctx) + resp, err := client.Do(req) + if err != nil { + return ctx, wrapInternal(err, "failed to do request") + } + + defer func() { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = wrapInternal(cerr, "failed to close response body") + } + }() + + if err = ctx.Err(); err != nil { + return ctx, wrapInternal(err, "aborted because context was done") + } + + if resp.StatusCode != 200 { + return ctx, errorFromResponse(resp) + } + + d := json.NewDecoder(resp.Body) + rawRespBody := json.RawMessage{} + if err := d.Decode(&rawRespBody); err != nil { + return ctx, wrapInternal(err, "failed to unmarshal json response") + } + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawRespBody, out); err != nil { + return ctx, wrapInternal(err, "failed to unmarshal json response") + } + if err = ctx.Err(); err != nil { + return ctx, wrapInternal(err, "aborted because context was done") + } + return ctx, nil +} + +// Call twirp.ServerHooks.RequestReceived if the hook is available +func callRequestReceived(ctx context.Context, h *twirp.ServerHooks) (context.Context, error) { + if h == nil || h.RequestReceived == nil { + return ctx, nil + } + return h.RequestReceived(ctx) +} + +// Call twirp.ServerHooks.RequestRouted if the hook is available +func callRequestRouted(ctx context.Context, h *twirp.ServerHooks) (context.Context, error) { + if h == nil || h.RequestRouted == nil { + return ctx, nil + } + return h.RequestRouted(ctx) +} + +// Call twirp.ServerHooks.ResponsePrepared if the hook is available +func callResponsePrepared(ctx context.Context, h *twirp.ServerHooks) context.Context { + if h == nil || h.ResponsePrepared == nil { + return ctx + } + return h.ResponsePrepared(ctx) +} + +// Call twirp.ServerHooks.ResponseSent if the hook is available +func callResponseSent(ctx context.Context, h *twirp.ServerHooks) { + if h == nil || h.ResponseSent == nil { + return + } + h.ResponseSent(ctx) +} + +// Call twirp.ServerHooks.Error if the hook is available +func callError(ctx context.Context, h *twirp.ServerHooks, err twirp.Error) context.Context { + if h == nil || h.Error == nil { + return ctx + } + return h.Error(ctx, err) +} + +func callClientResponseReceived(ctx context.Context, h *twirp.ClientHooks) { + if h == nil || h.ResponseReceived == nil { + return + } + h.ResponseReceived(ctx) +} + +func callClientRequestPrepared(ctx context.Context, h *twirp.ClientHooks, req *http.Request) (context.Context, error) { + if h == nil || h.RequestPrepared == nil { + return ctx, nil + } + return h.RequestPrepared(ctx, req) +} + +func callClientError(ctx context.Context, h *twirp.ClientHooks, err twirp.Error) { + if h == nil || h.Error == nil { + return + } + h.Error(ctx, err) +} + +var twirpFileDescriptor0 = []byte{ + // 594 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0x61, 0x6b, 0xd3, 0x40, + 0x18, 0x26, 0xcd, 0x36, 0xed, 0x5b, 0xdb, 0xca, 0x6d, 0x2d, 0xa1, 0x32, 0xac, 0xd1, 0x75, 0x05, + 0x21, 0x83, 0x89, 0x22, 0xfb, 0x20, 0x74, 0x16, 0x44, 0x1c, 0x32, 0x52, 0x07, 0xe2, 0x07, 0xc3, + 0xb5, 0x79, 0xa9, 0xc7, 0xd2, 0x24, 0xe6, 0x2e, 0xb3, 0xdb, 0x17, 0xff, 0x8f, 0x7f, 0xc3, 0x5f, + 0xe1, 0x17, 0x7f, 0x80, 0xbf, 0x42, 0x92, 0x5e, 0x32, 0x9b, 0x1c, 0x66, 0x7e, 0xf4, 0x5b, 0xee, + 0xc9, 0xfb, 0xbc, 0xb9, 0xe7, 0xb9, 0xe7, 0xbd, 0xc0, 0x2e, 0x9d, 0xa3, 0x2f, 0xdc, 0xe9, 0x81, + 0xc7, 0x2e, 0xf0, 0x9c, 0x09, 0x47, 0xae, 0xad, 0x30, 0x0a, 0x44, 0x40, 0xda, 0x12, 0xb6, 0x24, + 0x6c, 0x5e, 0x42, 0xe7, 0x65, 0x84, 0x54, 0xe0, 0x98, 0x0a, 0x3a, 0xa5, 0x1c, 0x6d, 0xfc, 0x1c, + 0x23, 0x17, 0xa4, 0x0b, 0x5b, 0x11, 0xce, 0x59, 0xe0, 0x1b, 0x5a, 0x5f, 0x1b, 0xd6, 0x6d, 0xb9, + 0x22, 0xfb, 0xd0, 0x8e, 0x39, 0x46, 0x0e, 0x15, 0x22, 0x62, 0xd3, 0x58, 0x20, 0x37, 0x6a, 0x69, + 0x41, 0x2b, 0x81, 0x47, 0x39, 0x4a, 0xee, 0x43, 0x43, 0x08, 0xcf, 0xe1, 0x38, 0x0b, 0x7c, 0x97, + 0x1b, 0x7a, 0x5f, 0x1b, 0xea, 0x36, 0x08, 0xe1, 0x4d, 0x56, 0x88, 0x49, 0xa1, 0x5b, 0xfc, 0x34, + 0x0f, 0x03, 0x9f, 0x63, 0x42, 0x75, 0x25, 0xe6, 0x30, 0x57, 0x6e, 0x00, 0x32, 0xe8, 0xb5, 0x4b, + 0x06, 0xd0, 0xc6, 0x65, 0xc8, 0x22, 0xe4, 0x0e, 0x15, 0x4e, 0xec, 0xb3, 0x65, 0xba, 0x09, 0xdd, + 0x6e, 0x4a, 0x78, 0x24, 0xce, 0x7c, 0xb6, 0x34, 0x9f, 0x02, 0x79, 0x85, 0xa2, 0x28, 0xad, 0xaa, + 0xbd, 0xf9, 0x43, 0x83, 0xed, 0x35, 0xde, 0x4d, 0xf7, 0x75, 0x6d, 0x5a, 0xad, 0xca, 0x34, 0x5d, + 0x69, 0xda, 0x00, 0xda, 0xb3, 0xd4, 0x13, 0x37, 0x17, 0xb6, 0xb1, 0x12, 0x26, 0xe1, 0x95, 0x30, + 0x95, 0x01, 0x9b, 0x0a, 0x03, 0xc8, 0x5d, 0xd0, 0x05, 0x0b, 0x8d, 0xad, 0xf4, 0x5d, 0xf2, 0x68, + 0xda, 0xb0, 0x73, 0xc2, 0x78, 0xae, 0x8d, 0x67, 0xa6, 0xdc, 0x83, 0x7a, 0x48, 0xe7, 0xe8, 0x70, + 0x76, 0x85, 0xa9, 0xb2, 0x4d, 0xfb, 0x76, 0x02, 0x4c, 0xd8, 0x15, 0x92, 0x5d, 0x80, 0xf4, 0xa5, + 0x08, 0xce, 0x31, 0xd3, 0x96, 0x96, 0xbf, 0x4b, 0x00, 0xf3, 0x2b, 0x74, 0x0a, 0x3d, 0xa5, 0x61, + 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0x04, 0x80, 0x94, 0x05, 0x2b, 0xf2, 0xd4, 0xdb, 0xab, + 0xa8, 0x5a, 0x35, 0x3d, 0x7e, 0xfb, 0xe1, 0xf1, 0x9c, 0x89, 0x4f, 0xf1, 0xd4, 0x9a, 0x05, 0x8b, + 0xec, 0x17, 0x75, 0x90, 0xfe, 0x9a, 0x66, 0x81, 0x97, 0x03, 0xb2, 0xc7, 0xb7, 0x5a, 0xf3, 0x84, + 0x5d, 0xe0, 0x1b, 0x26, 0xac, 0xd3, 0xa4, 0xe4, 0x57, 0xad, 0x25, 0xd7, 0x47, 0x47, 0x29, 0x30, + 0xdd, 0x4a, 0xa9, 0x4f, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x24, 0x1a, 0xfb, 0xf6, 0x06, + 0x00, 0x00, +} diff --git a/livekit/agentdb/livekit_agentdb_data.pb.go b/livekit/agentdb/livekit_agentdb_data.pb.go new file mode 100644 index 000000000..9e63550f9 --- /dev/null +++ b/livekit/agentdb/livekit_agentdb_data.pb.go @@ -0,0 +1,1741 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: agentdb/livekit_agentdb_data.proto + +package agentdb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// QueryLang selects the query language of a statement; both execute +// against the same database. +type QueryLang int32 + +const ( + QueryLang_QUERY_LANG_SQL QueryLang = 0 + QueryLang_QUERY_LANG_CYPHER QueryLang = 1 +) + +// Enum value maps for QueryLang. +var ( + QueryLang_name = map[int32]string{ + 0: "QUERY_LANG_SQL", + 1: "QUERY_LANG_CYPHER", + } + QueryLang_value = map[string]int32{ + "QUERY_LANG_SQL": 0, + "QUERY_LANG_CYPHER": 1, + } +) + +func (x QueryLang) Enum() *QueryLang { + p := new(QueryLang) + *p = x + return p +} + +func (x QueryLang) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (QueryLang) Descriptor() protoreflect.EnumDescriptor { + return file_agentdb_livekit_agentdb_data_proto_enumTypes[0].Descriptor() +} + +func (QueryLang) Type() protoreflect.EnumType { + return &file_agentdb_livekit_agentdb_data_proto_enumTypes[0] +} + +func (x QueryLang) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use QueryLang.Descriptor instead. +func (QueryLang) EnumDescriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{0} +} + +// ValueType tags one value's storage class within a Column. +type ValueType int32 + +const ( + ValueType_VALUE_TYPE_NULL ValueType = 0 + ValueType_VALUE_TYPE_INT ValueType = 1 + ValueType_VALUE_TYPE_DOUBLE ValueType = 2 + ValueType_VALUE_TYPE_TEXT ValueType = 3 + ValueType_VALUE_TYPE_BLOB ValueType = 4 +) + +// Enum value maps for ValueType. +var ( + ValueType_name = map[int32]string{ + 0: "VALUE_TYPE_NULL", + 1: "VALUE_TYPE_INT", + 2: "VALUE_TYPE_DOUBLE", + 3: "VALUE_TYPE_TEXT", + 4: "VALUE_TYPE_BLOB", + } + ValueType_value = map[string]int32{ + "VALUE_TYPE_NULL": 0, + "VALUE_TYPE_INT": 1, + "VALUE_TYPE_DOUBLE": 2, + "VALUE_TYPE_TEXT": 3, + "VALUE_TYPE_BLOB": 4, + } +) + +func (x ValueType) Enum() *ValueType { + p := new(ValueType) + *p = x + return p +} + +func (x ValueType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ValueType) Descriptor() protoreflect.EnumDescriptor { + return file_agentdb_livekit_agentdb_data_proto_enumTypes[1].Descriptor() +} + +func (ValueType) Type() protoreflect.EnumType { + return &file_agentdb_livekit_agentdb_data_proto_enumTypes[1] +} + +func (x ValueType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ValueType.Descriptor instead. +func (ValueType) EnumDescriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{1} +} + +type ClientMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Types that are valid to be assigned to Message: + // + // *ClientMessage_Hello + // *ClientMessage_Exec + // *ClientMessage_Query + // *ClientMessage_Batch + // *ClientMessage_Begin + // *ClientMessage_Commit + // *ClientMessage_Rollback + // *ClientMessage_Cancel + // *ClientMessage_Credit + // *ClientMessage_Ping + Message isClientMessage_Message `protobuf_oneof:"message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClientMessage) Reset() { + *x = ClientMessage{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClientMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientMessage) ProtoMessage() {} + +func (x *ClientMessage) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientMessage.ProtoReflect.Descriptor instead. +func (*ClientMessage) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{0} +} + +func (x *ClientMessage) GetRequestId() uint32 { + if x != nil { + return x.RequestId + } + return 0 +} + +func (x *ClientMessage) GetMessage() isClientMessage_Message { + if x != nil { + return x.Message + } + return nil +} + +func (x *ClientMessage) GetHello() *Hello { + if x != nil { + if x, ok := x.Message.(*ClientMessage_Hello); ok { + return x.Hello + } + } + return nil +} + +func (x *ClientMessage) GetExec() *Statement { + if x != nil { + if x, ok := x.Message.(*ClientMessage_Exec); ok { + return x.Exec + } + } + return nil +} + +func (x *ClientMessage) GetQuery() *Statement { + if x != nil { + if x, ok := x.Message.(*ClientMessage_Query); ok { + return x.Query + } + } + return nil +} + +func (x *ClientMessage) GetBatch() *Batch { + if x != nil { + if x, ok := x.Message.(*ClientMessage_Batch); ok { + return x.Batch + } + } + return nil +} + +func (x *ClientMessage) GetBegin() *Begin { + if x != nil { + if x, ok := x.Message.(*ClientMessage_Begin); ok { + return x.Begin + } + } + return nil +} + +func (x *ClientMessage) GetCommit() *Commit { + if x != nil { + if x, ok := x.Message.(*ClientMessage_Commit); ok { + return x.Commit + } + } + return nil +} + +func (x *ClientMessage) GetRollback() *Rollback { + if x != nil { + if x, ok := x.Message.(*ClientMessage_Rollback); ok { + return x.Rollback + } + } + return nil +} + +func (x *ClientMessage) GetCancel() *Cancel { + if x != nil { + if x, ok := x.Message.(*ClientMessage_Cancel); ok { + return x.Cancel + } + } + return nil +} + +func (x *ClientMessage) GetCredit() *Credit { + if x != nil { + if x, ok := x.Message.(*ClientMessage_Credit); ok { + return x.Credit + } + } + return nil +} + +func (x *ClientMessage) GetPing() *Ping { + if x != nil { + if x, ok := x.Message.(*ClientMessage_Ping); ok { + return x.Ping + } + } + return nil +} + +type isClientMessage_Message interface { + isClientMessage_Message() +} + +type ClientMessage_Hello struct { + Hello *Hello `protobuf:"bytes,2,opt,name=hello,proto3,oneof"` // must be first on the socket +} + +type ClientMessage_Exec struct { + Exec *Statement `protobuf:"bytes,3,opt,name=exec,proto3,oneof"` // no result rows; answers ExecResult +} + +type ClientMessage_Query struct { + Query *Statement `protobuf:"bytes,4,opt,name=query,proto3,oneof"` // answers Columns + ColumnBatch* + Done +} + +type ClientMessage_Batch struct { + Batch *Batch `protobuf:"bytes,5,opt,name=batch,proto3,oneof"` // atomic multi-statement exec +} + +type ClientMessage_Begin struct { + Begin *Begin `protobuf:"bytes,6,opt,name=begin,proto3,oneof"` // interactive transaction (server enforces idle/duration timeouts) +} + +type ClientMessage_Commit struct { + Commit *Commit `protobuf:"bytes,7,opt,name=commit,proto3,oneof"` +} + +type ClientMessage_Rollback struct { + Rollback *Rollback `protobuf:"bytes,8,opt,name=rollback,proto3,oneof"` +} + +type ClientMessage_Cancel struct { + Cancel *Cancel `protobuf:"bytes,9,opt,name=cancel,proto3,oneof"` // stop a running query's stream/cursor +} + +type ClientMessage_Credit struct { + Credit *Credit `protobuf:"bytes,10,opt,name=credit,proto3,oneof"` // grant more batch credits for request_id +} + +type ClientMessage_Ping struct { + Ping *Ping `protobuf:"bytes,11,opt,name=ping,proto3,oneof"` +} + +func (*ClientMessage_Hello) isClientMessage_Message() {} + +func (*ClientMessage_Exec) isClientMessage_Message() {} + +func (*ClientMessage_Query) isClientMessage_Message() {} + +func (*ClientMessage_Batch) isClientMessage_Message() {} + +func (*ClientMessage_Begin) isClientMessage_Message() {} + +func (*ClientMessage_Commit) isClientMessage_Message() {} + +func (*ClientMessage_Rollback) isClientMessage_Message() {} + +func (*ClientMessage_Cancel) isClientMessage_Message() {} + +func (*ClientMessage_Credit) isClientMessage_Message() {} + +func (*ClientMessage_Ping) isClientMessage_Message() {} + +type ServerMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Types that are valid to be assigned to Message: + // + // *ServerMessage_HelloOk + // *ServerMessage_Columns + // *ServerMessage_ColumnBatch + // *ServerMessage_ExecResult + // *ServerMessage_Done + // *ServerMessage_Error + // *ServerMessage_Pong + Message isServerMessage_Message `protobuf_oneof:"message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ServerMessage) Reset() { + *x = ServerMessage{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ServerMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerMessage) ProtoMessage() {} + +func (x *ServerMessage) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerMessage.ProtoReflect.Descriptor instead. +func (*ServerMessage) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{1} +} + +func (x *ServerMessage) GetRequestId() uint32 { + if x != nil { + return x.RequestId + } + return 0 +} + +func (x *ServerMessage) GetMessage() isServerMessage_Message { + if x != nil { + return x.Message + } + return nil +} + +func (x *ServerMessage) GetHelloOk() *HelloOk { + if x != nil { + if x, ok := x.Message.(*ServerMessage_HelloOk); ok { + return x.HelloOk + } + } + return nil +} + +func (x *ServerMessage) GetColumns() *Columns { + if x != nil { + if x, ok := x.Message.(*ServerMessage_Columns); ok { + return x.Columns + } + } + return nil +} + +func (x *ServerMessage) GetColumnBatch() *ColumnBatch { + if x != nil { + if x, ok := x.Message.(*ServerMessage_ColumnBatch); ok { + return x.ColumnBatch + } + } + return nil +} + +func (x *ServerMessage) GetExecResult() *ExecResult { + if x != nil { + if x, ok := x.Message.(*ServerMessage_ExecResult); ok { + return x.ExecResult + } + } + return nil +} + +func (x *ServerMessage) GetDone() *Done { + if x != nil { + if x, ok := x.Message.(*ServerMessage_Done); ok { + return x.Done + } + } + return nil +} + +func (x *ServerMessage) GetError() *Error { + if x != nil { + if x, ok := x.Message.(*ServerMessage_Error); ok { + return x.Error + } + } + return nil +} + +func (x *ServerMessage) GetPong() *Pong { + if x != nil { + if x, ok := x.Message.(*ServerMessage_Pong); ok { + return x.Pong + } + } + return nil +} + +type isServerMessage_Message interface { + isServerMessage_Message() +} + +type ServerMessage_HelloOk struct { + HelloOk *HelloOk `protobuf:"bytes,2,opt,name=hello_ok,json=helloOk,proto3,oneof"` +} + +type ServerMessage_Columns struct { + Columns *Columns `protobuf:"bytes,3,opt,name=columns,proto3,oneof"` +} + +type ServerMessage_ColumnBatch struct { + ColumnBatch *ColumnBatch `protobuf:"bytes,4,opt,name=column_batch,json=columnBatch,proto3,oneof"` +} + +type ServerMessage_ExecResult struct { + ExecResult *ExecResult `protobuf:"bytes,5,opt,name=exec_result,json=execResult,proto3,oneof"` +} + +type ServerMessage_Done struct { + Done *Done `protobuf:"bytes,6,opt,name=done,proto3,oneof"` +} + +type ServerMessage_Error struct { + Error *Error `protobuf:"bytes,7,opt,name=error,proto3,oneof"` +} + +type ServerMessage_Pong struct { + Pong *Pong `protobuf:"bytes,8,opt,name=pong,proto3,oneof"` +} + +func (*ServerMessage_HelloOk) isServerMessage_Message() {} + +func (*ServerMessage_Columns) isServerMessage_Message() {} + +func (*ServerMessage_ColumnBatch) isServerMessage_Message() {} + +func (*ServerMessage_ExecResult) isServerMessage_Message() {} + +func (*ServerMessage_Done) isServerMessage_Message() {} + +func (*ServerMessage_Error) isServerMessage_Message() {} + +func (*ServerMessage_Pong) isServerMessage_Message() {} + +// Value mirrors SQLite's five storage classes exactly. +type Value struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Value: + // + // *Value_NullValue + // *Value_IntValue + // *Value_DoubleValue + // *Value_TextValue + // *Value_BlobValue + Value isValue_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Value) Reset() { + *x = Value{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Value) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Value) ProtoMessage() {} + +func (x *Value) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Value.ProtoReflect.Descriptor instead. +func (*Value) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{2} +} + +func (x *Value) GetValue() isValue_Value { + if x != nil { + return x.Value + } + return nil +} + +func (x *Value) GetNullValue() bool { + if x != nil { + if x, ok := x.Value.(*Value_NullValue); ok { + return x.NullValue + } + } + return false +} + +func (x *Value) GetIntValue() int64 { + if x != nil { + if x, ok := x.Value.(*Value_IntValue); ok { + return x.IntValue + } + } + return 0 +} + +func (x *Value) GetDoubleValue() float64 { + if x != nil { + if x, ok := x.Value.(*Value_DoubleValue); ok { + return x.DoubleValue + } + } + return 0 +} + +func (x *Value) GetTextValue() string { + if x != nil { + if x, ok := x.Value.(*Value_TextValue); ok { + return x.TextValue + } + } + return "" +} + +func (x *Value) GetBlobValue() []byte { + if x != nil { + if x, ok := x.Value.(*Value_BlobValue); ok { + return x.BlobValue + } + } + return nil +} + +type isValue_Value interface { + isValue_Value() +} + +type Value_NullValue struct { + NullValue bool `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,oneof"` // always true when set +} + +type Value_IntValue struct { + IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` +} + +type Value_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"` +} + +type Value_TextValue struct { + TextValue string `protobuf:"bytes,4,opt,name=text_value,json=textValue,proto3,oneof"` +} + +type Value_BlobValue struct { + BlobValue []byte `protobuf:"bytes,5,opt,name=blob_value,json=blobValue,proto3,oneof"` +} + +func (*Value_NullValue) isValue_Value() {} + +func (*Value_IntValue) isValue_Value() {} + +func (*Value_DoubleValue) isValue_Value() {} + +func (*Value_TextValue) isValue_Value() {} + +func (*Value_BlobValue) isValue_Value() {} + +type Statement struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` // statement text in the selected lang + Params []*Value `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` // positional bind parameters + Lang QueryLang `protobuf:"varint,3,opt,name=lang,proto3,enum=livekit.agentdb.QueryLang" json:"lang,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Statement) Reset() { + *x = Statement{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Statement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Statement) ProtoMessage() {} + +func (x *Statement) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Statement.ProtoReflect.Descriptor instead. +func (*Statement) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{3} +} + +func (x *Statement) GetSql() string { + if x != nil { + return x.Sql + } + return "" +} + +func (x *Statement) GetParams() []*Value { + if x != nil { + return x.Params + } + return nil +} + +func (x *Statement) GetLang() QueryLang { + if x != nil { + return x.Lang + } + return QueryLang_QUERY_LANG_SQL +} + +type Batch struct { + state protoimpl.MessageState `protogen:"open.v1"` + Statements []*Statement `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"` // applied atomically, in order + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Batch) Reset() { + *x = Batch{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Batch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Batch) ProtoMessage() {} + +func (x *Batch) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Batch.ProtoReflect.Descriptor instead. +func (*Batch) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{4} +} + +func (x *Batch) GetStatements() []*Statement { + if x != nil { + return x.Statements + } + return nil +} + +type Begin struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Begin) Reset() { + *x = Begin{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Begin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Begin) ProtoMessage() {} + +func (x *Begin) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Begin.ProtoReflect.Descriptor instead. +func (*Begin) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{5} +} + +type Commit struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Commit) Reset() { + *x = Commit{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Commit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Commit) ProtoMessage() {} + +func (x *Commit) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Commit.ProtoReflect.Descriptor instead. +func (*Commit) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{6} +} + +type Rollback struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Rollback) Reset() { + *x = Rollback{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Rollback) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Rollback) ProtoMessage() {} + +func (x *Rollback) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Rollback.ProtoReflect.Descriptor instead. +func (*Rollback) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{7} +} + +type Cancel struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Cancel) Reset() { + *x = Cancel{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Cancel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cancel) ProtoMessage() {} + +func (x *Cancel) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cancel.ProtoReflect.Descriptor instead. +func (*Cancel) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{8} +} + +type Credit struct { + state protoimpl.MessageState `protogen:"open.v1"` + Batches uint32 `protobuf:"varint,1,opt,name=batches,proto3" json:"batches,omitempty"` // additional batch frames the client can absorb + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Credit) Reset() { + *x = Credit{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Credit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Credit) ProtoMessage() {} + +func (x *Credit) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Credit.ProtoReflect.Descriptor instead. +func (*Credit) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{9} +} + +func (x *Credit) GetBatches() uint32 { + if x != nil { + return x.Batches + } + return 0 +} + +type Ping struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Ping) Reset() { + *x = Ping{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Ping) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ping) ProtoMessage() {} + +func (x *Ping) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Ping.ProtoReflect.Descriptor instead. +func (*Ping) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{10} +} + +func (x *Ping) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type Pong struct { + state protoimpl.MessageState `protogen:"open.v1"` + LastPingTimestamp int64 `protobuf:"varint,1,opt,name=last_ping_timestamp,json=lastPingTimestamp,proto3" json:"last_ping_timestamp,omitempty"` + Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Pong) Reset() { + *x = Pong{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Pong) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Pong) ProtoMessage() {} + +func (x *Pong) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Pong.ProtoReflect.Descriptor instead. +func (*Pong) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{11} +} + +func (x *Pong) GetLastPingTimestamp() int64 { + if x != nil { + return x.LastPingTimestamp + } + return 0 +} + +func (x *Pong) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type Hello struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // access token; authorization is checked here + DatabaseId string `protobuf:"bytes,2,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Hello) Reset() { + *x = Hello{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Hello) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hello) ProtoMessage() {} + +func (x *Hello) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hello.ProtoReflect.Descriptor instead. +func (*Hello) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{12} +} + +func (x *Hello) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *Hello) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +type HelloOk struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence + PingIntervalMs uint32 `protobuf:"varint,2,opt,name=ping_interval_ms,json=pingIntervalMs,proto3" json:"ping_interval_ms,omitempty"` // server-advertised keepalive cadence + PingTimeoutMs uint32 `protobuf:"varint,3,opt,name=ping_timeout_ms,json=pingTimeoutMs,proto3" json:"ping_timeout_ms,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HelloOk) Reset() { + *x = HelloOk{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HelloOk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HelloOk) ProtoMessage() {} + +func (x *HelloOk) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HelloOk.ProtoReflect.Descriptor instead. +func (*HelloOk) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{13} +} + +func (x *HelloOk) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +func (x *HelloOk) GetPingIntervalMs() uint32 { + if x != nil { + return x.PingIntervalMs + } + return 0 +} + +func (x *HelloOk) GetPingTimeoutMs() uint32 { + if x != nil { + return x.PingTimeoutMs + } + return 0 +} + +type Columns struct { + state protoimpl.MessageState `protogen:"open.v1"` + Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Columns) Reset() { + *x = Columns{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Columns) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Columns) ProtoMessage() {} + +func (x *Columns) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Columns.ProtoReflect.Descriptor instead. +func (*Columns) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{14} +} + +func (x *Columns) GetNames() []string { + if x != nil { + return x.Names + } + return nil +} + +// Column is one column of a batch. Values are typed individually, as +// SQLite types them, so a column may mix classes: walk `types` and take the next +// entry from the matching array. A NULL occupies a tag only. +type Column struct { + state protoimpl.MessageState `protogen:"open.v1"` + Types []byte `protobuf:"bytes,1,opt,name=types,proto3" json:"types,omitempty"` // one ValueType per row + Ints []int64 `protobuf:"zigzag64,2,rep,packed,name=ints,proto3" json:"ints,omitempty"` + Doubles []float64 `protobuf:"fixed64,3,rep,packed,name=doubles,proto3" json:"doubles,omitempty"` + // Values concatenated, one exclusive end offset each: value i is + // data[ends[i-1]:ends[i]], with 0 implied before the first. + TextData []byte `protobuf:"bytes,4,opt,name=text_data,json=textData,proto3" json:"text_data,omitempty"` + TextEnds []uint32 `protobuf:"varint,5,rep,packed,name=text_ends,json=textEnds,proto3" json:"text_ends,omitempty"` + BlobData []byte `protobuf:"bytes,6,opt,name=blob_data,json=blobData,proto3" json:"blob_data,omitempty"` + BlobEnds []uint32 `protobuf:"varint,7,rep,packed,name=blob_ends,json=blobEnds,proto3" json:"blob_ends,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Column) Reset() { + *x = Column{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Column) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Column) ProtoMessage() {} + +func (x *Column) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Column.ProtoReflect.Descriptor instead. +func (*Column) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{15} +} + +func (x *Column) GetTypes() []byte { + if x != nil { + return x.Types + } + return nil +} + +func (x *Column) GetInts() []int64 { + if x != nil { + return x.Ints + } + return nil +} + +func (x *Column) GetDoubles() []float64 { + if x != nil { + return x.Doubles + } + return nil +} + +func (x *Column) GetTextData() []byte { + if x != nil { + return x.TextData + } + return nil +} + +func (x *Column) GetTextEnds() []uint32 { + if x != nil { + return x.TextEnds + } + return nil +} + +func (x *Column) GetBlobData() []byte { + if x != nil { + return x.BlobData + } + return nil +} + +func (x *Column) GetBlobEnds() []uint32 { + if x != nil { + return x.BlobEnds + } + return nil +} + +type ColumnBatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + Columns []*Column `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` // one per column of Columns + Rows uint32 `protobuf:"varint,2,opt,name=rows,proto3" json:"rows,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColumnBatch) Reset() { + *x = ColumnBatch{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColumnBatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColumnBatch) ProtoMessage() {} + +func (x *ColumnBatch) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColumnBatch.ProtoReflect.Descriptor instead. +func (*ColumnBatch) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{16} +} + +func (x *ColumnBatch) GetColumns() []*Column { + if x != nil { + return x.Columns + } + return nil +} + +func (x *ColumnBatch) GetRows() uint32 { + if x != nil { + return x.Rows + } + return 0 +} + +type ExecResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + RowsAffected int64 `protobuf:"varint,1,opt,name=rows_affected,json=rowsAffected,proto3" json:"rows_affected,omitempty"` + LastInsertId int64 `protobuf:"varint,2,opt,name=last_insert_id,json=lastInsertId,proto3" json:"last_insert_id,omitempty"` + Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // durable commit sequence after this exec + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExecResult) Reset() { + *x = ExecResult{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExecResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecResult) ProtoMessage() {} + +func (x *ExecResult) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecResult.ProtoReflect.Descriptor instead. +func (*ExecResult) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{17} +} + +func (x *ExecResult) GetRowsAffected() int64 { + if x != nil { + return x.RowsAffected + } + return 0 +} + +func (x *ExecResult) GetLastInsertId() int64 { + if x != nil { + return x.LastInsertId + } + return 0 +} + +func (x *ExecResult) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +type Done struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // snapshot the query ran at + TotalRows uint64 `protobuf:"varint,2,opt,name=total_rows,json=totalRows,proto3" json:"total_rows,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Done) Reset() { + *x = Done{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Done) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Done) ProtoMessage() {} + +func (x *Done) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Done.ProtoReflect.Descriptor instead. +func (*Done) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{18} +} + +func (x *Done) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +func (x *Done) GetTotalRows() uint64 { + if x != nil { + return x.TotalRows + } + return 0 +} + +type Error struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // stable machine-readable code + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Error) Reset() { + *x = Error{} + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Error) ProtoMessage() {} + +func (x *Error) ProtoReflect() protoreflect.Message { + mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Error.ProtoReflect.Descriptor instead. +func (*Error) Descriptor() ([]byte, []int) { + return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{19} +} + +func (x *Error) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *Error) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_agentdb_livekit_agentdb_data_proto protoreflect.FileDescriptor + +const file_agentdb_livekit_agentdb_data_proto_rawDesc = "" + + "\n" + + "\"agentdb/livekit_agentdb_data.proto\x12\x0flivekit.agentdb\"\xae\x04\n" + + "\rClientMessage\x12\x1d\n" + + "\n" + + "request_id\x18\x01 \x01(\rR\trequestId\x12.\n" + + "\x05hello\x18\x02 \x01(\v2\x16.livekit.agentdb.HelloH\x00R\x05hello\x120\n" + + "\x04exec\x18\x03 \x01(\v2\x1a.livekit.agentdb.StatementH\x00R\x04exec\x122\n" + + "\x05query\x18\x04 \x01(\v2\x1a.livekit.agentdb.StatementH\x00R\x05query\x12.\n" + + "\x05batch\x18\x05 \x01(\v2\x16.livekit.agentdb.BatchH\x00R\x05batch\x12.\n" + + "\x05begin\x18\x06 \x01(\v2\x16.livekit.agentdb.BeginH\x00R\x05begin\x121\n" + + "\x06commit\x18\a \x01(\v2\x17.livekit.agentdb.CommitH\x00R\x06commit\x127\n" + + "\brollback\x18\b \x01(\v2\x19.livekit.agentdb.RollbackH\x00R\brollback\x121\n" + + "\x06cancel\x18\t \x01(\v2\x17.livekit.agentdb.CancelH\x00R\x06cancel\x121\n" + + "\x06credit\x18\n" + + " \x01(\v2\x17.livekit.agentdb.CreditH\x00R\x06credit\x12+\n" + + "\x04ping\x18\v \x01(\v2\x15.livekit.agentdb.PingH\x00R\x04pingB\t\n" + + "\amessage\"\xb3\x03\n" + + "\rServerMessage\x12\x1d\n" + + "\n" + + "request_id\x18\x01 \x01(\rR\trequestId\x125\n" + + "\bhello_ok\x18\x02 \x01(\v2\x18.livekit.agentdb.HelloOkH\x00R\ahelloOk\x124\n" + + "\acolumns\x18\x03 \x01(\v2\x18.livekit.agentdb.ColumnsH\x00R\acolumns\x12A\n" + + "\fcolumn_batch\x18\x04 \x01(\v2\x1c.livekit.agentdb.ColumnBatchH\x00R\vcolumnBatch\x12>\n" + + "\vexec_result\x18\x05 \x01(\v2\x1b.livekit.agentdb.ExecResultH\x00R\n" + + "execResult\x12+\n" + + "\x04done\x18\x06 \x01(\v2\x15.livekit.agentdb.DoneH\x00R\x04done\x12.\n" + + "\x05error\x18\a \x01(\v2\x16.livekit.agentdb.ErrorH\x00R\x05error\x12+\n" + + "\x04pong\x18\b \x01(\v2\x15.livekit.agentdb.PongH\x00R\x04pongB\t\n" + + "\amessage\"\xb7\x01\n" + + "\x05Value\x12\x1f\n" + + "\n" + + "null_value\x18\x01 \x01(\bH\x00R\tnullValue\x12\x1d\n" + + "\tint_value\x18\x02 \x01(\x03H\x00R\bintValue\x12#\n" + + "\fdouble_value\x18\x03 \x01(\x01H\x00R\vdoubleValue\x12\x1f\n" + + "\n" + + "text_value\x18\x04 \x01(\tH\x00R\ttextValue\x12\x1f\n" + + "\n" + + "blob_value\x18\x05 \x01(\fH\x00R\tblobValueB\a\n" + + "\x05value\"}\n" + + "\tStatement\x12\x10\n" + + "\x03sql\x18\x01 \x01(\tR\x03sql\x12.\n" + + "\x06params\x18\x02 \x03(\v2\x16.livekit.agentdb.ValueR\x06params\x12.\n" + + "\x04lang\x18\x03 \x01(\x0e2\x1a.livekit.agentdb.QueryLangR\x04lang\"C\n" + + "\x05Batch\x12:\n" + + "\n" + + "statements\x18\x01 \x03(\v2\x1a.livekit.agentdb.StatementR\n" + + "statements\"\a\n" + + "\x05Begin\"\b\n" + + "\x06Commit\"\n" + + "\n" + + "\bRollback\"\b\n" + + "\x06Cancel\"\"\n" + + "\x06Credit\x12\x18\n" + + "\abatches\x18\x01 \x01(\rR\abatches\"$\n" + + "\x04Ping\x12\x1c\n" + + "\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\"T\n" + + "\x04Pong\x12.\n" + + "\x13last_ping_timestamp\x18\x01 \x01(\x03R\x11lastPingTimestamp\x12\x1c\n" + + "\ttimestamp\x18\x02 \x01(\x03R\ttimestamp\">\n" + + "\x05Hello\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\x12\x1f\n" + + "\vdatabase_id\x18\x02 \x01(\tR\n" + + "databaseId\"m\n" + + "\aHelloOk\x12\x10\n" + + "\x03tip\x18\x01 \x01(\x03R\x03tip\x12(\n" + + "\x10ping_interval_ms\x18\x02 \x01(\rR\x0epingIntervalMs\x12&\n" + + "\x0fping_timeout_ms\x18\x03 \x01(\rR\rpingTimeoutMs\"\x1f\n" + + "\aColumns\x12\x14\n" + + "\x05names\x18\x01 \x03(\tR\x05names\"\xc0\x01\n" + + "\x06Column\x12\x14\n" + + "\x05types\x18\x01 \x01(\fR\x05types\x12\x12\n" + + "\x04ints\x18\x02 \x03(\x12R\x04ints\x12\x18\n" + + "\adoubles\x18\x03 \x03(\x01R\adoubles\x12\x1b\n" + + "\ttext_data\x18\x04 \x01(\fR\btextData\x12\x1b\n" + + "\ttext_ends\x18\x05 \x03(\rR\btextEnds\x12\x1b\n" + + "\tblob_data\x18\x06 \x01(\fR\bblobData\x12\x1b\n" + + "\tblob_ends\x18\a \x03(\rR\bblobEnds\"T\n" + + "\vColumnBatch\x121\n" + + "\acolumns\x18\x01 \x03(\v2\x17.livekit.agentdb.ColumnR\acolumns\x12\x12\n" + + "\x04rows\x18\x02 \x01(\rR\x04rows\"i\n" + + "\n" + + "ExecResult\x12#\n" + + "\rrows_affected\x18\x01 \x01(\x03R\frowsAffected\x12$\n" + + "\x0elast_insert_id\x18\x02 \x01(\x03R\flastInsertId\x12\x10\n" + + "\x03tip\x18\x03 \x01(\x03R\x03tip\"7\n" + + "\x04Done\x12\x10\n" + + "\x03tip\x18\x01 \x01(\x03R\x03tip\x12\x1d\n" + + "\n" + + "total_rows\x18\x02 \x01(\x04R\ttotalRows\"5\n" + + "\x05Error\x12\x12\n" + + "\x04code\x18\x01 \x01(\tR\x04code\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage*6\n" + + "\tQueryLang\x12\x12\n" + + "\x0eQUERY_LANG_SQL\x10\x00\x12\x15\n" + + "\x11QUERY_LANG_CYPHER\x10\x01*u\n" + + "\tValueType\x12\x13\n" + + "\x0fVALUE_TYPE_NULL\x10\x00\x12\x12\n" + + "\x0eVALUE_TYPE_INT\x10\x01\x12\x15\n" + + "\x11VALUE_TYPE_DOUBLE\x10\x02\x12\x13\n" + + "\x0fVALUE_TYPE_TEXT\x10\x03\x12\x13\n" + + "\x0fVALUE_TYPE_BLOB\x10\x04BNZ+github.com/livekit/protocol/livekit/agentdb\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" + +var ( + file_agentdb_livekit_agentdb_data_proto_rawDescOnce sync.Once + file_agentdb_livekit_agentdb_data_proto_rawDescData []byte +) + +func file_agentdb_livekit_agentdb_data_proto_rawDescGZIP() []byte { + file_agentdb_livekit_agentdb_data_proto_rawDescOnce.Do(func() { + file_agentdb_livekit_agentdb_data_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_agentdb_livekit_agentdb_data_proto_rawDesc), len(file_agentdb_livekit_agentdb_data_proto_rawDesc))) + }) + return file_agentdb_livekit_agentdb_data_proto_rawDescData +} + +var file_agentdb_livekit_agentdb_data_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_agentdb_livekit_agentdb_data_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_agentdb_livekit_agentdb_data_proto_goTypes = []any{ + (QueryLang)(0), // 0: livekit.agentdb.QueryLang + (ValueType)(0), // 1: livekit.agentdb.ValueType + (*ClientMessage)(nil), // 2: livekit.agentdb.ClientMessage + (*ServerMessage)(nil), // 3: livekit.agentdb.ServerMessage + (*Value)(nil), // 4: livekit.agentdb.Value + (*Statement)(nil), // 5: livekit.agentdb.Statement + (*Batch)(nil), // 6: livekit.agentdb.Batch + (*Begin)(nil), // 7: livekit.agentdb.Begin + (*Commit)(nil), // 8: livekit.agentdb.Commit + (*Rollback)(nil), // 9: livekit.agentdb.Rollback + (*Cancel)(nil), // 10: livekit.agentdb.Cancel + (*Credit)(nil), // 11: livekit.agentdb.Credit + (*Ping)(nil), // 12: livekit.agentdb.Ping + (*Pong)(nil), // 13: livekit.agentdb.Pong + (*Hello)(nil), // 14: livekit.agentdb.Hello + (*HelloOk)(nil), // 15: livekit.agentdb.HelloOk + (*Columns)(nil), // 16: livekit.agentdb.Columns + (*Column)(nil), // 17: livekit.agentdb.Column + (*ColumnBatch)(nil), // 18: livekit.agentdb.ColumnBatch + (*ExecResult)(nil), // 19: livekit.agentdb.ExecResult + (*Done)(nil), // 20: livekit.agentdb.Done + (*Error)(nil), // 21: livekit.agentdb.Error +} +var file_agentdb_livekit_agentdb_data_proto_depIdxs = []int32{ + 14, // 0: livekit.agentdb.ClientMessage.hello:type_name -> livekit.agentdb.Hello + 5, // 1: livekit.agentdb.ClientMessage.exec:type_name -> livekit.agentdb.Statement + 5, // 2: livekit.agentdb.ClientMessage.query:type_name -> livekit.agentdb.Statement + 6, // 3: livekit.agentdb.ClientMessage.batch:type_name -> livekit.agentdb.Batch + 7, // 4: livekit.agentdb.ClientMessage.begin:type_name -> livekit.agentdb.Begin + 8, // 5: livekit.agentdb.ClientMessage.commit:type_name -> livekit.agentdb.Commit + 9, // 6: livekit.agentdb.ClientMessage.rollback:type_name -> livekit.agentdb.Rollback + 10, // 7: livekit.agentdb.ClientMessage.cancel:type_name -> livekit.agentdb.Cancel + 11, // 8: livekit.agentdb.ClientMessage.credit:type_name -> livekit.agentdb.Credit + 12, // 9: livekit.agentdb.ClientMessage.ping:type_name -> livekit.agentdb.Ping + 15, // 10: livekit.agentdb.ServerMessage.hello_ok:type_name -> livekit.agentdb.HelloOk + 16, // 11: livekit.agentdb.ServerMessage.columns:type_name -> livekit.agentdb.Columns + 18, // 12: livekit.agentdb.ServerMessage.column_batch:type_name -> livekit.agentdb.ColumnBatch + 19, // 13: livekit.agentdb.ServerMessage.exec_result:type_name -> livekit.agentdb.ExecResult + 20, // 14: livekit.agentdb.ServerMessage.done:type_name -> livekit.agentdb.Done + 21, // 15: livekit.agentdb.ServerMessage.error:type_name -> livekit.agentdb.Error + 13, // 16: livekit.agentdb.ServerMessage.pong:type_name -> livekit.agentdb.Pong + 4, // 17: livekit.agentdb.Statement.params:type_name -> livekit.agentdb.Value + 0, // 18: livekit.agentdb.Statement.lang:type_name -> livekit.agentdb.QueryLang + 5, // 19: livekit.agentdb.Batch.statements:type_name -> livekit.agentdb.Statement + 17, // 20: livekit.agentdb.ColumnBatch.columns:type_name -> livekit.agentdb.Column + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name +} + +func init() { file_agentdb_livekit_agentdb_data_proto_init() } +func file_agentdb_livekit_agentdb_data_proto_init() { + if File_agentdb_livekit_agentdb_data_proto != nil { + return + } + file_agentdb_livekit_agentdb_data_proto_msgTypes[0].OneofWrappers = []any{ + (*ClientMessage_Hello)(nil), + (*ClientMessage_Exec)(nil), + (*ClientMessage_Query)(nil), + (*ClientMessage_Batch)(nil), + (*ClientMessage_Begin)(nil), + (*ClientMessage_Commit)(nil), + (*ClientMessage_Rollback)(nil), + (*ClientMessage_Cancel)(nil), + (*ClientMessage_Credit)(nil), + (*ClientMessage_Ping)(nil), + } + file_agentdb_livekit_agentdb_data_proto_msgTypes[1].OneofWrappers = []any{ + (*ServerMessage_HelloOk)(nil), + (*ServerMessage_Columns)(nil), + (*ServerMessage_ColumnBatch)(nil), + (*ServerMessage_ExecResult)(nil), + (*ServerMessage_Done)(nil), + (*ServerMessage_Error)(nil), + (*ServerMessage_Pong)(nil), + } + file_agentdb_livekit_agentdb_data_proto_msgTypes[2].OneofWrappers = []any{ + (*Value_NullValue)(nil), + (*Value_IntValue)(nil), + (*Value_DoubleValue)(nil), + (*Value_TextValue)(nil), + (*Value_BlobValue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_agentdb_livekit_agentdb_data_proto_rawDesc), len(file_agentdb_livekit_agentdb_data_proto_rawDesc)), + NumEnums: 2, + NumMessages: 20, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_agentdb_livekit_agentdb_data_proto_goTypes, + DependencyIndexes: file_agentdb_livekit_agentdb_data_proto_depIdxs, + EnumInfos: file_agentdb_livekit_agentdb_data_proto_enumTypes, + MessageInfos: file_agentdb_livekit_agentdb_data_proto_msgTypes, + }.Build() + File_agentdb_livekit_agentdb_data_proto = out.File + file_agentdb_livekit_agentdb_data_proto_goTypes = nil + file_agentdb_livekit_agentdb_data_proto_depIdxs = nil +} diff --git a/livekit/livekit_agent_session_db.pb.go b/livekit/livekit_agent_session_db.pb.go deleted file mode 100644 index 8cf5f4ded..000000000 --- a/livekit/livekit_agent_session_db.pb.go +++ /dev/null @@ -1,1739 +0,0 @@ -// Copyright 2026 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.35.1 -// source: livekit_agent_session_db.proto - -package livekit - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// SessionQueryLang selects the query language of a statement; both execute -// against the same session database. -type SessionQueryLang int32 - -const ( - SessionQueryLang_SESSION_QUERY_LANG_SQL SessionQueryLang = 0 - SessionQueryLang_SESSION_QUERY_LANG_CYPHER SessionQueryLang = 1 -) - -// Enum value maps for SessionQueryLang. -var ( - SessionQueryLang_name = map[int32]string{ - 0: "SESSION_QUERY_LANG_SQL", - 1: "SESSION_QUERY_LANG_CYPHER", - } - SessionQueryLang_value = map[string]int32{ - "SESSION_QUERY_LANG_SQL": 0, - "SESSION_QUERY_LANG_CYPHER": 1, - } -) - -func (x SessionQueryLang) Enum() *SessionQueryLang { - p := new(SessionQueryLang) - *p = x - return p -} - -func (x SessionQueryLang) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SessionQueryLang) Descriptor() protoreflect.EnumDescriptor { - return file_livekit_agent_session_db_proto_enumTypes[0].Descriptor() -} - -func (SessionQueryLang) Type() protoreflect.EnumType { - return &file_livekit_agent_session_db_proto_enumTypes[0] -} - -func (x SessionQueryLang) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SessionQueryLang.Descriptor instead. -func (SessionQueryLang) EnumDescriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{0} -} - -// SessionValueType tags one value's storage class within a SessionColumn. -type SessionValueType int32 - -const ( - SessionValueType_SESSION_VALUE_TYPE_NULL SessionValueType = 0 - SessionValueType_SESSION_VALUE_TYPE_INT SessionValueType = 1 - SessionValueType_SESSION_VALUE_TYPE_DOUBLE SessionValueType = 2 - SessionValueType_SESSION_VALUE_TYPE_TEXT SessionValueType = 3 - SessionValueType_SESSION_VALUE_TYPE_BLOB SessionValueType = 4 -) - -// Enum value maps for SessionValueType. -var ( - SessionValueType_name = map[int32]string{ - 0: "SESSION_VALUE_TYPE_NULL", - 1: "SESSION_VALUE_TYPE_INT", - 2: "SESSION_VALUE_TYPE_DOUBLE", - 3: "SESSION_VALUE_TYPE_TEXT", - 4: "SESSION_VALUE_TYPE_BLOB", - } - SessionValueType_value = map[string]int32{ - "SESSION_VALUE_TYPE_NULL": 0, - "SESSION_VALUE_TYPE_INT": 1, - "SESSION_VALUE_TYPE_DOUBLE": 2, - "SESSION_VALUE_TYPE_TEXT": 3, - "SESSION_VALUE_TYPE_BLOB": 4, - } -) - -func (x SessionValueType) Enum() *SessionValueType { - p := new(SessionValueType) - *p = x - return p -} - -func (x SessionValueType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SessionValueType) Descriptor() protoreflect.EnumDescriptor { - return file_livekit_agent_session_db_proto_enumTypes[1].Descriptor() -} - -func (SessionValueType) Type() protoreflect.EnumType { - return &file_livekit_agent_session_db_proto_enumTypes[1] -} - -func (x SessionValueType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SessionValueType.Descriptor instead. -func (SessionValueType) EnumDescriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{1} -} - -type SessionStoreRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // Types that are valid to be assigned to Message: - // - // *SessionStoreRequest_Hello - // *SessionStoreRequest_Exec - // *SessionStoreRequest_Query - // *SessionStoreRequest_Batch - // *SessionStoreRequest_Begin - // *SessionStoreRequest_Commit - // *SessionStoreRequest_Rollback - // *SessionStoreRequest_Cancel - // *SessionStoreRequest_Credit - // *SessionStoreRequest_Ping - Message isSessionStoreRequest_Message `protobuf_oneof:"message"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionStoreRequest) Reset() { - *x = SessionStoreRequest{} - mi := &file_livekit_agent_session_db_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionStoreRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionStoreRequest) ProtoMessage() {} - -func (x *SessionStoreRequest) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionStoreRequest.ProtoReflect.Descriptor instead. -func (*SessionStoreRequest) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{0} -} - -func (x *SessionStoreRequest) GetRequestId() uint32 { - if x != nil { - return x.RequestId - } - return 0 -} - -func (x *SessionStoreRequest) GetMessage() isSessionStoreRequest_Message { - if x != nil { - return x.Message - } - return nil -} - -func (x *SessionStoreRequest) GetHello() *SessionHello { - if x != nil { - if x, ok := x.Message.(*SessionStoreRequest_Hello); ok { - return x.Hello - } - } - return nil -} - -func (x *SessionStoreRequest) GetExec() *SessionStatement { - if x != nil { - if x, ok := x.Message.(*SessionStoreRequest_Exec); ok { - return x.Exec - } - } - return nil -} - -func (x *SessionStoreRequest) GetQuery() *SessionStatement { - if x != nil { - if x, ok := x.Message.(*SessionStoreRequest_Query); ok { - return x.Query - } - } - return nil -} - -func (x *SessionStoreRequest) GetBatch() *SessionBatch { - if x != nil { - if x, ok := x.Message.(*SessionStoreRequest_Batch); ok { - return x.Batch - } - } - return nil -} - -func (x *SessionStoreRequest) GetBegin() *SessionBegin { - if x != nil { - if x, ok := x.Message.(*SessionStoreRequest_Begin); ok { - return x.Begin - } - } - return nil -} - -func (x *SessionStoreRequest) GetCommit() *SessionCommit { - if x != nil { - if x, ok := x.Message.(*SessionStoreRequest_Commit); ok { - return x.Commit - } - } - return nil -} - -func (x *SessionStoreRequest) GetRollback() *SessionRollback { - if x != nil { - if x, ok := x.Message.(*SessionStoreRequest_Rollback); ok { - return x.Rollback - } - } - return nil -} - -func (x *SessionStoreRequest) GetCancel() *SessionCancel { - if x != nil { - if x, ok := x.Message.(*SessionStoreRequest_Cancel); ok { - return x.Cancel - } - } - return nil -} - -func (x *SessionStoreRequest) GetCredit() *SessionCredit { - if x != nil { - if x, ok := x.Message.(*SessionStoreRequest_Credit); ok { - return x.Credit - } - } - return nil -} - -func (x *SessionStoreRequest) GetPing() *SessionPing { - if x != nil { - if x, ok := x.Message.(*SessionStoreRequest_Ping); ok { - return x.Ping - } - } - return nil -} - -type isSessionStoreRequest_Message interface { - isSessionStoreRequest_Message() -} - -type SessionStoreRequest_Hello struct { - Hello *SessionHello `protobuf:"bytes,2,opt,name=hello,proto3,oneof"` // must be first on the socket -} - -type SessionStoreRequest_Exec struct { - Exec *SessionStatement `protobuf:"bytes,3,opt,name=exec,proto3,oneof"` // no result rows; answers SessionExecResult -} - -type SessionStoreRequest_Query struct { - Query *SessionStatement `protobuf:"bytes,4,opt,name=query,proto3,oneof"` // answers SessionColumns + SessionColumnBatch* + SessionDone -} - -type SessionStoreRequest_Batch struct { - Batch *SessionBatch `protobuf:"bytes,5,opt,name=batch,proto3,oneof"` // atomic multi-statement exec -} - -type SessionStoreRequest_Begin struct { - Begin *SessionBegin `protobuf:"bytes,6,opt,name=begin,proto3,oneof"` // interactive transaction (server enforces idle/duration timeouts) -} - -type SessionStoreRequest_Commit struct { - Commit *SessionCommit `protobuf:"bytes,7,opt,name=commit,proto3,oneof"` -} - -type SessionStoreRequest_Rollback struct { - Rollback *SessionRollback `protobuf:"bytes,8,opt,name=rollback,proto3,oneof"` -} - -type SessionStoreRequest_Cancel struct { - Cancel *SessionCancel `protobuf:"bytes,9,opt,name=cancel,proto3,oneof"` // stop a running query's stream/cursor -} - -type SessionStoreRequest_Credit struct { - Credit *SessionCredit `protobuf:"bytes,10,opt,name=credit,proto3,oneof"` // grant more batch credits for request_id -} - -type SessionStoreRequest_Ping struct { - Ping *SessionPing `protobuf:"bytes,11,opt,name=ping,proto3,oneof"` -} - -func (*SessionStoreRequest_Hello) isSessionStoreRequest_Message() {} - -func (*SessionStoreRequest_Exec) isSessionStoreRequest_Message() {} - -func (*SessionStoreRequest_Query) isSessionStoreRequest_Message() {} - -func (*SessionStoreRequest_Batch) isSessionStoreRequest_Message() {} - -func (*SessionStoreRequest_Begin) isSessionStoreRequest_Message() {} - -func (*SessionStoreRequest_Commit) isSessionStoreRequest_Message() {} - -func (*SessionStoreRequest_Rollback) isSessionStoreRequest_Message() {} - -func (*SessionStoreRequest_Cancel) isSessionStoreRequest_Message() {} - -func (*SessionStoreRequest_Credit) isSessionStoreRequest_Message() {} - -func (*SessionStoreRequest_Ping) isSessionStoreRequest_Message() {} - -type SessionStoreResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // Types that are valid to be assigned to Message: - // - // *SessionStoreResponse_HelloOk - // *SessionStoreResponse_Columns - // *SessionStoreResponse_ColumnBatch - // *SessionStoreResponse_ExecResult - // *SessionStoreResponse_Done - // *SessionStoreResponse_Error - // *SessionStoreResponse_Pong - Message isSessionStoreResponse_Message `protobuf_oneof:"message"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionStoreResponse) Reset() { - *x = SessionStoreResponse{} - mi := &file_livekit_agent_session_db_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionStoreResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionStoreResponse) ProtoMessage() {} - -func (x *SessionStoreResponse) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionStoreResponse.ProtoReflect.Descriptor instead. -func (*SessionStoreResponse) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{1} -} - -func (x *SessionStoreResponse) GetRequestId() uint32 { - if x != nil { - return x.RequestId - } - return 0 -} - -func (x *SessionStoreResponse) GetMessage() isSessionStoreResponse_Message { - if x != nil { - return x.Message - } - return nil -} - -func (x *SessionStoreResponse) GetHelloOk() *SessionHelloOk { - if x != nil { - if x, ok := x.Message.(*SessionStoreResponse_HelloOk); ok { - return x.HelloOk - } - } - return nil -} - -func (x *SessionStoreResponse) GetColumns() *SessionColumns { - if x != nil { - if x, ok := x.Message.(*SessionStoreResponse_Columns); ok { - return x.Columns - } - } - return nil -} - -func (x *SessionStoreResponse) GetColumnBatch() *SessionColumnBatch { - if x != nil { - if x, ok := x.Message.(*SessionStoreResponse_ColumnBatch); ok { - return x.ColumnBatch - } - } - return nil -} - -func (x *SessionStoreResponse) GetExecResult() *SessionExecResult { - if x != nil { - if x, ok := x.Message.(*SessionStoreResponse_ExecResult); ok { - return x.ExecResult - } - } - return nil -} - -func (x *SessionStoreResponse) GetDone() *SessionDone { - if x != nil { - if x, ok := x.Message.(*SessionStoreResponse_Done); ok { - return x.Done - } - } - return nil -} - -func (x *SessionStoreResponse) GetError() *SessionStoreError { - if x != nil { - if x, ok := x.Message.(*SessionStoreResponse_Error); ok { - return x.Error - } - } - return nil -} - -func (x *SessionStoreResponse) GetPong() *SessionPong { - if x != nil { - if x, ok := x.Message.(*SessionStoreResponse_Pong); ok { - return x.Pong - } - } - return nil -} - -type isSessionStoreResponse_Message interface { - isSessionStoreResponse_Message() -} - -type SessionStoreResponse_HelloOk struct { - HelloOk *SessionHelloOk `protobuf:"bytes,2,opt,name=hello_ok,json=helloOk,proto3,oneof"` -} - -type SessionStoreResponse_Columns struct { - Columns *SessionColumns `protobuf:"bytes,3,opt,name=columns,proto3,oneof"` -} - -type SessionStoreResponse_ColumnBatch struct { - ColumnBatch *SessionColumnBatch `protobuf:"bytes,4,opt,name=column_batch,json=columnBatch,proto3,oneof"` -} - -type SessionStoreResponse_ExecResult struct { - ExecResult *SessionExecResult `protobuf:"bytes,5,opt,name=exec_result,json=execResult,proto3,oneof"` -} - -type SessionStoreResponse_Done struct { - Done *SessionDone `protobuf:"bytes,6,opt,name=done,proto3,oneof"` -} - -type SessionStoreResponse_Error struct { - Error *SessionStoreError `protobuf:"bytes,7,opt,name=error,proto3,oneof"` -} - -type SessionStoreResponse_Pong struct { - Pong *SessionPong `protobuf:"bytes,8,opt,name=pong,proto3,oneof"` -} - -func (*SessionStoreResponse_HelloOk) isSessionStoreResponse_Message() {} - -func (*SessionStoreResponse_Columns) isSessionStoreResponse_Message() {} - -func (*SessionStoreResponse_ColumnBatch) isSessionStoreResponse_Message() {} - -func (*SessionStoreResponse_ExecResult) isSessionStoreResponse_Message() {} - -func (*SessionStoreResponse_Done) isSessionStoreResponse_Message() {} - -func (*SessionStoreResponse_Error) isSessionStoreResponse_Message() {} - -func (*SessionStoreResponse_Pong) isSessionStoreResponse_Message() {} - -// SessionValue mirrors SQLite's five storage classes exactly. -type SessionValue struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Value: - // - // *SessionValue_NullValue - // *SessionValue_IntValue - // *SessionValue_DoubleValue - // *SessionValue_TextValue - // *SessionValue_BlobValue - Value isSessionValue_Value `protobuf_oneof:"value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionValue) Reset() { - *x = SessionValue{} - mi := &file_livekit_agent_session_db_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionValue) ProtoMessage() {} - -func (x *SessionValue) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionValue.ProtoReflect.Descriptor instead. -func (*SessionValue) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{2} -} - -func (x *SessionValue) GetValue() isSessionValue_Value { - if x != nil { - return x.Value - } - return nil -} - -func (x *SessionValue) GetNullValue() bool { - if x != nil { - if x, ok := x.Value.(*SessionValue_NullValue); ok { - return x.NullValue - } - } - return false -} - -func (x *SessionValue) GetIntValue() int64 { - if x != nil { - if x, ok := x.Value.(*SessionValue_IntValue); ok { - return x.IntValue - } - } - return 0 -} - -func (x *SessionValue) GetDoubleValue() float64 { - if x != nil { - if x, ok := x.Value.(*SessionValue_DoubleValue); ok { - return x.DoubleValue - } - } - return 0 -} - -func (x *SessionValue) GetTextValue() string { - if x != nil { - if x, ok := x.Value.(*SessionValue_TextValue); ok { - return x.TextValue - } - } - return "" -} - -func (x *SessionValue) GetBlobValue() []byte { - if x != nil { - if x, ok := x.Value.(*SessionValue_BlobValue); ok { - return x.BlobValue - } - } - return nil -} - -type isSessionValue_Value interface { - isSessionValue_Value() -} - -type SessionValue_NullValue struct { - NullValue bool `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,oneof"` // always true when set -} - -type SessionValue_IntValue struct { - IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` -} - -type SessionValue_DoubleValue struct { - DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"` -} - -type SessionValue_TextValue struct { - TextValue string `protobuf:"bytes,4,opt,name=text_value,json=textValue,proto3,oneof"` -} - -type SessionValue_BlobValue struct { - BlobValue []byte `protobuf:"bytes,5,opt,name=blob_value,json=blobValue,proto3,oneof"` -} - -func (*SessionValue_NullValue) isSessionValue_Value() {} - -func (*SessionValue_IntValue) isSessionValue_Value() {} - -func (*SessionValue_DoubleValue) isSessionValue_Value() {} - -func (*SessionValue_TextValue) isSessionValue_Value() {} - -func (*SessionValue_BlobValue) isSessionValue_Value() {} - -type SessionStatement struct { - state protoimpl.MessageState `protogen:"open.v1"` - Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` // statement text in the selected lang - Params []*SessionValue `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` // positional bind parameters - Lang SessionQueryLang `protobuf:"varint,3,opt,name=lang,proto3,enum=livekit.SessionQueryLang" json:"lang,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionStatement) Reset() { - *x = SessionStatement{} - mi := &file_livekit_agent_session_db_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionStatement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionStatement) ProtoMessage() {} - -func (x *SessionStatement) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionStatement.ProtoReflect.Descriptor instead. -func (*SessionStatement) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{3} -} - -func (x *SessionStatement) GetSql() string { - if x != nil { - return x.Sql - } - return "" -} - -func (x *SessionStatement) GetParams() []*SessionValue { - if x != nil { - return x.Params - } - return nil -} - -func (x *SessionStatement) GetLang() SessionQueryLang { - if x != nil { - return x.Lang - } - return SessionQueryLang_SESSION_QUERY_LANG_SQL -} - -type SessionBatch struct { - state protoimpl.MessageState `protogen:"open.v1"` - Statements []*SessionStatement `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"` // applied atomically, in order - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionBatch) Reset() { - *x = SessionBatch{} - mi := &file_livekit_agent_session_db_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionBatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionBatch) ProtoMessage() {} - -func (x *SessionBatch) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionBatch.ProtoReflect.Descriptor instead. -func (*SessionBatch) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{4} -} - -func (x *SessionBatch) GetStatements() []*SessionStatement { - if x != nil { - return x.Statements - } - return nil -} - -type SessionBegin struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionBegin) Reset() { - *x = SessionBegin{} - mi := &file_livekit_agent_session_db_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionBegin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionBegin) ProtoMessage() {} - -func (x *SessionBegin) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionBegin.ProtoReflect.Descriptor instead. -func (*SessionBegin) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{5} -} - -type SessionCommit struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionCommit) Reset() { - *x = SessionCommit{} - mi := &file_livekit_agent_session_db_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionCommit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionCommit) ProtoMessage() {} - -func (x *SessionCommit) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionCommit.ProtoReflect.Descriptor instead. -func (*SessionCommit) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{6} -} - -type SessionRollback struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionRollback) Reset() { - *x = SessionRollback{} - mi := &file_livekit_agent_session_db_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionRollback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionRollback) ProtoMessage() {} - -func (x *SessionRollback) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionRollback.ProtoReflect.Descriptor instead. -func (*SessionRollback) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{7} -} - -type SessionCancel struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionCancel) Reset() { - *x = SessionCancel{} - mi := &file_livekit_agent_session_db_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionCancel) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionCancel) ProtoMessage() {} - -func (x *SessionCancel) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionCancel.ProtoReflect.Descriptor instead. -func (*SessionCancel) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{8} -} - -type SessionCredit struct { - state protoimpl.MessageState `protogen:"open.v1"` - Batches uint32 `protobuf:"varint,1,opt,name=batches,proto3" json:"batches,omitempty"` // additional batch frames the client can absorb - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionCredit) Reset() { - *x = SessionCredit{} - mi := &file_livekit_agent_session_db_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionCredit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionCredit) ProtoMessage() {} - -func (x *SessionCredit) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionCredit.ProtoReflect.Descriptor instead. -func (*SessionCredit) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{9} -} - -func (x *SessionCredit) GetBatches() uint32 { - if x != nil { - return x.Batches - } - return 0 -} - -type SessionPing struct { - state protoimpl.MessageState `protogen:"open.v1"` - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionPing) Reset() { - *x = SessionPing{} - mi := &file_livekit_agent_session_db_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionPing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionPing) ProtoMessage() {} - -func (x *SessionPing) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionPing.ProtoReflect.Descriptor instead. -func (*SessionPing) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{10} -} - -func (x *SessionPing) GetTimestamp() int64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -type SessionPong struct { - state protoimpl.MessageState `protogen:"open.v1"` - LastPingTimestamp int64 `protobuf:"varint,1,opt,name=last_ping_timestamp,json=lastPingTimestamp,proto3" json:"last_ping_timestamp,omitempty"` - Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionPong) Reset() { - *x = SessionPong{} - mi := &file_livekit_agent_session_db_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionPong) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionPong) ProtoMessage() {} - -func (x *SessionPong) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionPong.ProtoReflect.Descriptor instead. -func (*SessionPong) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{11} -} - -func (x *SessionPong) GetLastPingTimestamp() int64 { - if x != nil { - return x.LastPingTimestamp - } - return 0 -} - -func (x *SessionPong) GetTimestamp() int64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -type SessionHello struct { - state protoimpl.MessageState `protogen:"open.v1"` - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // access token; authorization is checked here - SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionHello) Reset() { - *x = SessionHello{} - mi := &file_livekit_agent_session_db_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionHello) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionHello) ProtoMessage() {} - -func (x *SessionHello) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionHello.ProtoReflect.Descriptor instead. -func (*SessionHello) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{12} -} - -func (x *SessionHello) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *SessionHello) GetSessionId() string { - if x != nil { - return x.SessionId - } - return "" -} - -type SessionHelloOk struct { - state protoimpl.MessageState `protogen:"open.v1"` - Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence - PingIntervalMs uint32 `protobuf:"varint,2,opt,name=ping_interval_ms,json=pingIntervalMs,proto3" json:"ping_interval_ms,omitempty"` // server-advertised keepalive cadence - PingTimeoutMs uint32 `protobuf:"varint,3,opt,name=ping_timeout_ms,json=pingTimeoutMs,proto3" json:"ping_timeout_ms,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionHelloOk) Reset() { - *x = SessionHelloOk{} - mi := &file_livekit_agent_session_db_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionHelloOk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionHelloOk) ProtoMessage() {} - -func (x *SessionHelloOk) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionHelloOk.ProtoReflect.Descriptor instead. -func (*SessionHelloOk) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{13} -} - -func (x *SessionHelloOk) GetTip() int64 { - if x != nil { - return x.Tip - } - return 0 -} - -func (x *SessionHelloOk) GetPingIntervalMs() uint32 { - if x != nil { - return x.PingIntervalMs - } - return 0 -} - -func (x *SessionHelloOk) GetPingTimeoutMs() uint32 { - if x != nil { - return x.PingTimeoutMs - } - return 0 -} - -type SessionColumns struct { - state protoimpl.MessageState `protogen:"open.v1"` - Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionColumns) Reset() { - *x = SessionColumns{} - mi := &file_livekit_agent_session_db_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionColumns) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionColumns) ProtoMessage() {} - -func (x *SessionColumns) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionColumns.ProtoReflect.Descriptor instead. -func (*SessionColumns) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{14} -} - -func (x *SessionColumns) GetNames() []string { - if x != nil { - return x.Names - } - return nil -} - -// SessionColumn is one column of a batch. Values are typed individually, as -// SQLite types them, so a column may mix classes: walk `types` and take the next -// entry from the matching array. A NULL occupies a tag only. -type SessionColumn struct { - state protoimpl.MessageState `protogen:"open.v1"` - Types []byte `protobuf:"bytes,1,opt,name=types,proto3" json:"types,omitempty"` // one SessionValueType per row - Ints []int64 `protobuf:"zigzag64,2,rep,packed,name=ints,proto3" json:"ints,omitempty"` - Doubles []float64 `protobuf:"fixed64,3,rep,packed,name=doubles,proto3" json:"doubles,omitempty"` - // Values concatenated, one exclusive end offset each: value i is - // data[ends[i-1]:ends[i]], with 0 implied before the first. - TextData []byte `protobuf:"bytes,4,opt,name=text_data,json=textData,proto3" json:"text_data,omitempty"` - TextEnds []uint32 `protobuf:"varint,5,rep,packed,name=text_ends,json=textEnds,proto3" json:"text_ends,omitempty"` - BlobData []byte `protobuf:"bytes,6,opt,name=blob_data,json=blobData,proto3" json:"blob_data,omitempty"` - BlobEnds []uint32 `protobuf:"varint,7,rep,packed,name=blob_ends,json=blobEnds,proto3" json:"blob_ends,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionColumn) Reset() { - *x = SessionColumn{} - mi := &file_livekit_agent_session_db_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionColumn) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionColumn) ProtoMessage() {} - -func (x *SessionColumn) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionColumn.ProtoReflect.Descriptor instead. -func (*SessionColumn) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{15} -} - -func (x *SessionColumn) GetTypes() []byte { - if x != nil { - return x.Types - } - return nil -} - -func (x *SessionColumn) GetInts() []int64 { - if x != nil { - return x.Ints - } - return nil -} - -func (x *SessionColumn) GetDoubles() []float64 { - if x != nil { - return x.Doubles - } - return nil -} - -func (x *SessionColumn) GetTextData() []byte { - if x != nil { - return x.TextData - } - return nil -} - -func (x *SessionColumn) GetTextEnds() []uint32 { - if x != nil { - return x.TextEnds - } - return nil -} - -func (x *SessionColumn) GetBlobData() []byte { - if x != nil { - return x.BlobData - } - return nil -} - -func (x *SessionColumn) GetBlobEnds() []uint32 { - if x != nil { - return x.BlobEnds - } - return nil -} - -type SessionColumnBatch struct { - state protoimpl.MessageState `protogen:"open.v1"` - Columns []*SessionColumn `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` // one per column of SessionColumns - Rows uint32 `protobuf:"varint,2,opt,name=rows,proto3" json:"rows,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionColumnBatch) Reset() { - *x = SessionColumnBatch{} - mi := &file_livekit_agent_session_db_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionColumnBatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionColumnBatch) ProtoMessage() {} - -func (x *SessionColumnBatch) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[16] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionColumnBatch.ProtoReflect.Descriptor instead. -func (*SessionColumnBatch) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{16} -} - -func (x *SessionColumnBatch) GetColumns() []*SessionColumn { - if x != nil { - return x.Columns - } - return nil -} - -func (x *SessionColumnBatch) GetRows() uint32 { - if x != nil { - return x.Rows - } - return 0 -} - -type SessionExecResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - RowsAffected int64 `protobuf:"varint,1,opt,name=rows_affected,json=rowsAffected,proto3" json:"rows_affected,omitempty"` - LastInsertId int64 `protobuf:"varint,2,opt,name=last_insert_id,json=lastInsertId,proto3" json:"last_insert_id,omitempty"` - Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // durable commit sequence after this exec - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionExecResult) Reset() { - *x = SessionExecResult{} - mi := &file_livekit_agent_session_db_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionExecResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionExecResult) ProtoMessage() {} - -func (x *SessionExecResult) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[17] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionExecResult.ProtoReflect.Descriptor instead. -func (*SessionExecResult) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{17} -} - -func (x *SessionExecResult) GetRowsAffected() int64 { - if x != nil { - return x.RowsAffected - } - return 0 -} - -func (x *SessionExecResult) GetLastInsertId() int64 { - if x != nil { - return x.LastInsertId - } - return 0 -} - -func (x *SessionExecResult) GetTip() int64 { - if x != nil { - return x.Tip - } - return 0 -} - -type SessionDone struct { - state protoimpl.MessageState `protogen:"open.v1"` - Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // snapshot the query ran at - TotalRows uint64 `protobuf:"varint,2,opt,name=total_rows,json=totalRows,proto3" json:"total_rows,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionDone) Reset() { - *x = SessionDone{} - mi := &file_livekit_agent_session_db_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionDone) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionDone) ProtoMessage() {} - -func (x *SessionDone) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[18] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionDone.ProtoReflect.Descriptor instead. -func (*SessionDone) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{18} -} - -func (x *SessionDone) GetTip() int64 { - if x != nil { - return x.Tip - } - return 0 -} - -func (x *SessionDone) GetTotalRows() uint64 { - if x != nil { - return x.TotalRows - } - return 0 -} - -type SessionStoreError struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // stable machine-readable code - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionStoreError) Reset() { - *x = SessionStoreError{} - mi := &file_livekit_agent_session_db_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionStoreError) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionStoreError) ProtoMessage() {} - -func (x *SessionStoreError) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_db_proto_msgTypes[19] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionStoreError.ProtoReflect.Descriptor instead. -func (*SessionStoreError) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_db_proto_rawDescGZIP(), []int{19} -} - -func (x *SessionStoreError) GetCode() string { - if x != nil { - return x.Code - } - return "" -} - -func (x *SessionStoreError) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -var File_livekit_agent_session_db_proto protoreflect.FileDescriptor - -const file_livekit_agent_session_db_proto_rawDesc = "" + - "\n" + - "\x1elivekit_agent_session_db.proto\x12\alivekit\"\xaa\x04\n" + - "\x13SessionStoreRequest\x12\x1d\n" + - "\n" + - "request_id\x18\x01 \x01(\rR\trequestId\x12-\n" + - "\x05hello\x18\x02 \x01(\v2\x15.livekit.SessionHelloH\x00R\x05hello\x12/\n" + - "\x04exec\x18\x03 \x01(\v2\x19.livekit.SessionStatementH\x00R\x04exec\x121\n" + - "\x05query\x18\x04 \x01(\v2\x19.livekit.SessionStatementH\x00R\x05query\x12-\n" + - "\x05batch\x18\x05 \x01(\v2\x15.livekit.SessionBatchH\x00R\x05batch\x12-\n" + - "\x05begin\x18\x06 \x01(\v2\x15.livekit.SessionBeginH\x00R\x05begin\x120\n" + - "\x06commit\x18\a \x01(\v2\x16.livekit.SessionCommitH\x00R\x06commit\x126\n" + - "\brollback\x18\b \x01(\v2\x18.livekit.SessionRollbackH\x00R\brollback\x120\n" + - "\x06cancel\x18\t \x01(\v2\x16.livekit.SessionCancelH\x00R\x06cancel\x120\n" + - "\x06credit\x18\n" + - " \x01(\v2\x16.livekit.SessionCreditH\x00R\x06credit\x12*\n" + - "\x04ping\x18\v \x01(\v2\x14.livekit.SessionPingH\x00R\x04pingB\t\n" + - "\amessage\"\xb8\x03\n" + - "\x14SessionStoreResponse\x12\x1d\n" + - "\n" + - "request_id\x18\x01 \x01(\rR\trequestId\x124\n" + - "\bhello_ok\x18\x02 \x01(\v2\x17.livekit.SessionHelloOkH\x00R\ahelloOk\x123\n" + - "\acolumns\x18\x03 \x01(\v2\x17.livekit.SessionColumnsH\x00R\acolumns\x12@\n" + - "\fcolumn_batch\x18\x04 \x01(\v2\x1b.livekit.SessionColumnBatchH\x00R\vcolumnBatch\x12=\n" + - "\vexec_result\x18\x05 \x01(\v2\x1a.livekit.SessionExecResultH\x00R\n" + - "execResult\x12*\n" + - "\x04done\x18\x06 \x01(\v2\x14.livekit.SessionDoneH\x00R\x04done\x122\n" + - "\x05error\x18\a \x01(\v2\x1a.livekit.SessionStoreErrorH\x00R\x05error\x12*\n" + - "\x04pong\x18\b \x01(\v2\x14.livekit.SessionPongH\x00R\x04pongB\t\n" + - "\amessage\"\xbe\x01\n" + - "\fSessionValue\x12\x1f\n" + - "\n" + - "null_value\x18\x01 \x01(\bH\x00R\tnullValue\x12\x1d\n" + - "\tint_value\x18\x02 \x01(\x03H\x00R\bintValue\x12#\n" + - "\fdouble_value\x18\x03 \x01(\x01H\x00R\vdoubleValue\x12\x1f\n" + - "\n" + - "text_value\x18\x04 \x01(\tH\x00R\ttextValue\x12\x1f\n" + - "\n" + - "blob_value\x18\x05 \x01(\fH\x00R\tblobValueB\a\n" + - "\x05value\"\x82\x01\n" + - "\x10SessionStatement\x12\x10\n" + - "\x03sql\x18\x01 \x01(\tR\x03sql\x12-\n" + - "\x06params\x18\x02 \x03(\v2\x15.livekit.SessionValueR\x06params\x12-\n" + - "\x04lang\x18\x03 \x01(\x0e2\x19.livekit.SessionQueryLangR\x04lang\"I\n" + - "\fSessionBatch\x129\n" + - "\n" + - "statements\x18\x01 \x03(\v2\x19.livekit.SessionStatementR\n" + - "statements\"\x0e\n" + - "\fSessionBegin\"\x0f\n" + - "\rSessionCommit\"\x11\n" + - "\x0fSessionRollback\"\x0f\n" + - "\rSessionCancel\")\n" + - "\rSessionCredit\x12\x18\n" + - "\abatches\x18\x01 \x01(\rR\abatches\"+\n" + - "\vSessionPing\x12\x1c\n" + - "\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\"[\n" + - "\vSessionPong\x12.\n" + - "\x13last_ping_timestamp\x18\x01 \x01(\x03R\x11lastPingTimestamp\x12\x1c\n" + - "\ttimestamp\x18\x02 \x01(\x03R\ttimestamp\"C\n" + - "\fSessionHello\x12\x14\n" + - "\x05token\x18\x01 \x01(\tR\x05token\x12\x1d\n" + - "\n" + - "session_id\x18\x02 \x01(\tR\tsessionId\"t\n" + - "\x0eSessionHelloOk\x12\x10\n" + - "\x03tip\x18\x01 \x01(\x03R\x03tip\x12(\n" + - "\x10ping_interval_ms\x18\x02 \x01(\rR\x0epingIntervalMs\x12&\n" + - "\x0fping_timeout_ms\x18\x03 \x01(\rR\rpingTimeoutMs\"&\n" + - "\x0eSessionColumns\x12\x14\n" + - "\x05names\x18\x01 \x03(\tR\x05names\"\xc7\x01\n" + - "\rSessionColumn\x12\x14\n" + - "\x05types\x18\x01 \x01(\fR\x05types\x12\x12\n" + - "\x04ints\x18\x02 \x03(\x12R\x04ints\x12\x18\n" + - "\adoubles\x18\x03 \x03(\x01R\adoubles\x12\x1b\n" + - "\ttext_data\x18\x04 \x01(\fR\btextData\x12\x1b\n" + - "\ttext_ends\x18\x05 \x03(\rR\btextEnds\x12\x1b\n" + - "\tblob_data\x18\x06 \x01(\fR\bblobData\x12\x1b\n" + - "\tblob_ends\x18\a \x03(\rR\bblobEnds\"Z\n" + - "\x12SessionColumnBatch\x120\n" + - "\acolumns\x18\x01 \x03(\v2\x16.livekit.SessionColumnR\acolumns\x12\x12\n" + - "\x04rows\x18\x02 \x01(\rR\x04rows\"p\n" + - "\x11SessionExecResult\x12#\n" + - "\rrows_affected\x18\x01 \x01(\x03R\frowsAffected\x12$\n" + - "\x0elast_insert_id\x18\x02 \x01(\x03R\flastInsertId\x12\x10\n" + - "\x03tip\x18\x03 \x01(\x03R\x03tip\">\n" + - "\vSessionDone\x12\x10\n" + - "\x03tip\x18\x01 \x01(\x03R\x03tip\x12\x1d\n" + - "\n" + - "total_rows\x18\x02 \x01(\x04R\ttotalRows\"A\n" + - "\x11SessionStoreError\x12\x12\n" + - "\x04code\x18\x01 \x01(\tR\x04code\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage*M\n" + - "\x10SessionQueryLang\x12\x1a\n" + - "\x16SESSION_QUERY_LANG_SQL\x10\x00\x12\x1d\n" + - "\x19SESSION_QUERY_LANG_CYPHER\x10\x01*\xa4\x01\n" + - "\x10SessionValueType\x12\x1b\n" + - "\x17SESSION_VALUE_TYPE_NULL\x10\x00\x12\x1a\n" + - "\x16SESSION_VALUE_TYPE_INT\x10\x01\x12\x1d\n" + - "\x19SESSION_VALUE_TYPE_DOUBLE\x10\x02\x12\x1b\n" + - "\x17SESSION_VALUE_TYPE_TEXT\x10\x03\x12\x1b\n" + - "\x17SESSION_VALUE_TYPE_BLOB\x10\x04BFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" - -var ( - file_livekit_agent_session_db_proto_rawDescOnce sync.Once - file_livekit_agent_session_db_proto_rawDescData []byte -) - -func file_livekit_agent_session_db_proto_rawDescGZIP() []byte { - file_livekit_agent_session_db_proto_rawDescOnce.Do(func() { - file_livekit_agent_session_db_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_livekit_agent_session_db_proto_rawDesc), len(file_livekit_agent_session_db_proto_rawDesc))) - }) - return file_livekit_agent_session_db_proto_rawDescData -} - -var file_livekit_agent_session_db_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_livekit_agent_session_db_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_livekit_agent_session_db_proto_goTypes = []any{ - (SessionQueryLang)(0), // 0: livekit.SessionQueryLang - (SessionValueType)(0), // 1: livekit.SessionValueType - (*SessionStoreRequest)(nil), // 2: livekit.SessionStoreRequest - (*SessionStoreResponse)(nil), // 3: livekit.SessionStoreResponse - (*SessionValue)(nil), // 4: livekit.SessionValue - (*SessionStatement)(nil), // 5: livekit.SessionStatement - (*SessionBatch)(nil), // 6: livekit.SessionBatch - (*SessionBegin)(nil), // 7: livekit.SessionBegin - (*SessionCommit)(nil), // 8: livekit.SessionCommit - (*SessionRollback)(nil), // 9: livekit.SessionRollback - (*SessionCancel)(nil), // 10: livekit.SessionCancel - (*SessionCredit)(nil), // 11: livekit.SessionCredit - (*SessionPing)(nil), // 12: livekit.SessionPing - (*SessionPong)(nil), // 13: livekit.SessionPong - (*SessionHello)(nil), // 14: livekit.SessionHello - (*SessionHelloOk)(nil), // 15: livekit.SessionHelloOk - (*SessionColumns)(nil), // 16: livekit.SessionColumns - (*SessionColumn)(nil), // 17: livekit.SessionColumn - (*SessionColumnBatch)(nil), // 18: livekit.SessionColumnBatch - (*SessionExecResult)(nil), // 19: livekit.SessionExecResult - (*SessionDone)(nil), // 20: livekit.SessionDone - (*SessionStoreError)(nil), // 21: livekit.SessionStoreError -} -var file_livekit_agent_session_db_proto_depIdxs = []int32{ - 14, // 0: livekit.SessionStoreRequest.hello:type_name -> livekit.SessionHello - 5, // 1: livekit.SessionStoreRequest.exec:type_name -> livekit.SessionStatement - 5, // 2: livekit.SessionStoreRequest.query:type_name -> livekit.SessionStatement - 6, // 3: livekit.SessionStoreRequest.batch:type_name -> livekit.SessionBatch - 7, // 4: livekit.SessionStoreRequest.begin:type_name -> livekit.SessionBegin - 8, // 5: livekit.SessionStoreRequest.commit:type_name -> livekit.SessionCommit - 9, // 6: livekit.SessionStoreRequest.rollback:type_name -> livekit.SessionRollback - 10, // 7: livekit.SessionStoreRequest.cancel:type_name -> livekit.SessionCancel - 11, // 8: livekit.SessionStoreRequest.credit:type_name -> livekit.SessionCredit - 12, // 9: livekit.SessionStoreRequest.ping:type_name -> livekit.SessionPing - 15, // 10: livekit.SessionStoreResponse.hello_ok:type_name -> livekit.SessionHelloOk - 16, // 11: livekit.SessionStoreResponse.columns:type_name -> livekit.SessionColumns - 18, // 12: livekit.SessionStoreResponse.column_batch:type_name -> livekit.SessionColumnBatch - 19, // 13: livekit.SessionStoreResponse.exec_result:type_name -> livekit.SessionExecResult - 20, // 14: livekit.SessionStoreResponse.done:type_name -> livekit.SessionDone - 21, // 15: livekit.SessionStoreResponse.error:type_name -> livekit.SessionStoreError - 13, // 16: livekit.SessionStoreResponse.pong:type_name -> livekit.SessionPong - 4, // 17: livekit.SessionStatement.params:type_name -> livekit.SessionValue - 0, // 18: livekit.SessionStatement.lang:type_name -> livekit.SessionQueryLang - 5, // 19: livekit.SessionBatch.statements:type_name -> livekit.SessionStatement - 17, // 20: livekit.SessionColumnBatch.columns:type_name -> livekit.SessionColumn - 21, // [21:21] is the sub-list for method output_type - 21, // [21:21] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name -} - -func init() { file_livekit_agent_session_db_proto_init() } -func file_livekit_agent_session_db_proto_init() { - if File_livekit_agent_session_db_proto != nil { - return - } - file_livekit_agent_session_db_proto_msgTypes[0].OneofWrappers = []any{ - (*SessionStoreRequest_Hello)(nil), - (*SessionStoreRequest_Exec)(nil), - (*SessionStoreRequest_Query)(nil), - (*SessionStoreRequest_Batch)(nil), - (*SessionStoreRequest_Begin)(nil), - (*SessionStoreRequest_Commit)(nil), - (*SessionStoreRequest_Rollback)(nil), - (*SessionStoreRequest_Cancel)(nil), - (*SessionStoreRequest_Credit)(nil), - (*SessionStoreRequest_Ping)(nil), - } - file_livekit_agent_session_db_proto_msgTypes[1].OneofWrappers = []any{ - (*SessionStoreResponse_HelloOk)(nil), - (*SessionStoreResponse_Columns)(nil), - (*SessionStoreResponse_ColumnBatch)(nil), - (*SessionStoreResponse_ExecResult)(nil), - (*SessionStoreResponse_Done)(nil), - (*SessionStoreResponse_Error)(nil), - (*SessionStoreResponse_Pong)(nil), - } - file_livekit_agent_session_db_proto_msgTypes[2].OneofWrappers = []any{ - (*SessionValue_NullValue)(nil), - (*SessionValue_IntValue)(nil), - (*SessionValue_DoubleValue)(nil), - (*SessionValue_TextValue)(nil), - (*SessionValue_BlobValue)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_agent_session_db_proto_rawDesc), len(file_livekit_agent_session_db_proto_rawDesc)), - NumEnums: 2, - NumMessages: 20, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_livekit_agent_session_db_proto_goTypes, - DependencyIndexes: file_livekit_agent_session_db_proto_depIdxs, - EnumInfos: file_livekit_agent_session_db_proto_enumTypes, - MessageInfos: file_livekit_agent_session_db_proto_msgTypes, - }.Build() - File_livekit_agent_session_db_proto = out.File - file_livekit_agent_session_db_proto_goTypes = nil - file_livekit_agent_session_db_proto_depIdxs = nil -} diff --git a/livekit/livekit_agent_session_store.pb.go b/livekit/livekit_agent_session_store.pb.go deleted file mode 100644 index 419899987..000000000 --- a/livekit/livekit_agent_session_store.pb.go +++ /dev/null @@ -1,769 +0,0 @@ -// Copyright 2026 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.35.1 -// source: livekit_agent_session_store.proto - -package livekit - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CreateSessionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` - UserAttributes string `protobuf:"bytes,2,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` // opaque JSON metadata for the caller - TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` // unset: never expires. Otherwise clamped to the server cap, and never extended - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateSessionRequest) Reset() { - *x = CreateSessionRequest{} - mi := &file_livekit_agent_session_store_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateSessionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSessionRequest) ProtoMessage() {} - -func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead. -func (*CreateSessionRequest) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateSessionRequest) GetRegion() string { - if x != nil { - return x.Region - } - return "" -} - -func (x *CreateSessionRequest) GetUserAttributes() string { - if x != nil { - return x.UserAttributes - } - return "" -} - -func (x *CreateSessionRequest) GetTtlSeconds() int64 { - if x != nil { - return x.TtlSeconds - } - return 0 -} - -type CreateSessionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // "SESS_..." - ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateSessionResponse) Reset() { - *x = CreateSessionResponse{} - mi := &file_livekit_agent_session_store_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateSessionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSessionResponse) ProtoMessage() {} - -func (x *CreateSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateSessionResponse.ProtoReflect.Descriptor instead. -func (*CreateSessionResponse) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateSessionResponse) GetSessionId() string { - if x != nil { - return x.SessionId - } - return "" -} - -func (x *CreateSessionResponse) GetExpiresAtUnix() int64 { - if x != nil { - return x.ExpiresAtUnix - } - return 0 -} - -type GetSessionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetSessionRequest) Reset() { - *x = GetSessionRequest{} - mi := &file_livekit_agent_session_store_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetSessionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSessionRequest) ProtoMessage() {} - -func (x *GetSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSessionRequest.ProtoReflect.Descriptor instead. -func (*GetSessionRequest) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{2} -} - -func (x *GetSessionRequest) GetSessionId() string { - if x != nil { - return x.SessionId - } - return "" -} - -type GetSessionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` - UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` - CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` - ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires - Tip int64 `protobuf:"varint,6,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetSessionResponse) Reset() { - *x = GetSessionResponse{} - mi := &file_livekit_agent_session_store_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetSessionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSessionResponse) ProtoMessage() {} - -func (x *GetSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSessionResponse.ProtoReflect.Descriptor instead. -func (*GetSessionResponse) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{3} -} - -func (x *GetSessionResponse) GetSessionId() string { - if x != nil { - return x.SessionId - } - return "" -} - -func (x *GetSessionResponse) GetRegion() string { - if x != nil { - return x.Region - } - return "" -} - -func (x *GetSessionResponse) GetUserAttributes() string { - if x != nil { - return x.UserAttributes - } - return "" -} - -func (x *GetSessionResponse) GetCreatedAtUnix() int64 { - if x != nil { - return x.CreatedAtUnix - } - return 0 -} - -func (x *GetSessionResponse) GetExpiresAtUnix() int64 { - if x != nil { - return x.ExpiresAtUnix - } - return 0 -} - -func (x *GetSessionResponse) GetTip() int64 { - if x != nil { - return x.Tip - } - return 0 -} - -type ListSessionsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // server-clamped - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // opaque cursor from a previous response - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListSessionsRequest) Reset() { - *x = ListSessionsRequest{} - mi := &file_livekit_agent_session_store_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListSessionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSessionsRequest) ProtoMessage() {} - -func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListSessionsRequest.ProtoReflect.Descriptor instead. -func (*ListSessionsRequest) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{4} -} - -func (x *ListSessionsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListSessionsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -type ListSessionsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Sessions []*SessionSummary `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"` - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // empty when exhausted - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListSessionsResponse) Reset() { - *x = ListSessionsResponse{} - mi := &file_livekit_agent_session_store_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListSessionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSessionsResponse) ProtoMessage() {} - -func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListSessionsResponse.ProtoReflect.Descriptor instead. -func (*ListSessionsResponse) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{5} -} - -func (x *ListSessionsResponse) GetSessions() []*SessionSummary { - if x != nil { - return x.Sessions - } - return nil -} - -func (x *ListSessionsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// SessionSummary is a session's immutable fields. No tip: it changes on every -// commit, so call GetSession for it. -type SessionSummary struct { - state protoimpl.MessageState `protogen:"open.v1"` - SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` - UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` - CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` - ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SessionSummary) Reset() { - *x = SessionSummary{} - mi := &file_livekit_agent_session_store_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SessionSummary) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionSummary) ProtoMessage() {} - -func (x *SessionSummary) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionSummary.ProtoReflect.Descriptor instead. -func (*SessionSummary) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{6} -} - -func (x *SessionSummary) GetSessionId() string { - if x != nil { - return x.SessionId - } - return "" -} - -func (x *SessionSummary) GetRegion() string { - if x != nil { - return x.Region - } - return "" -} - -func (x *SessionSummary) GetUserAttributes() string { - if x != nil { - return x.UserAttributes - } - return "" -} - -func (x *SessionSummary) GetCreatedAtUnix() int64 { - if x != nil { - return x.CreatedAtUnix - } - return 0 -} - -func (x *SessionSummary) GetExpiresAtUnix() int64 { - if x != nil { - return x.ExpiresAtUnix - } - return 0 -} - -type DeleteSessionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteSessionRequest) Reset() { - *x = DeleteSessionRequest{} - mi := &file_livekit_agent_session_store_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteSessionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSessionRequest) ProtoMessage() {} - -func (x *DeleteSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSessionRequest.ProtoReflect.Descriptor instead. -func (*DeleteSessionRequest) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{7} -} - -func (x *DeleteSessionRequest) GetSessionId() string { - if x != nil { - return x.SessionId - } - return "" -} - -type DeleteSessionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteSessionResponse) Reset() { - *x = DeleteSessionResponse{} - mi := &file_livekit_agent_session_store_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteSessionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSessionResponse) ProtoMessage() {} - -func (x *DeleteSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSessionResponse.ProtoReflect.Descriptor instead. -func (*DeleteSessionResponse) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{8} -} - -type DumpSessionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DumpSessionRequest) Reset() { - *x = DumpSessionRequest{} - mi := &file_livekit_agent_session_store_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DumpSessionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DumpSessionRequest) ProtoMessage() {} - -func (x *DumpSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DumpSessionRequest.ProtoReflect.Descriptor instead. -func (*DumpSessionRequest) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{9} -} - -func (x *DumpSessionRequest) GetSessionId() string { - if x != nil { - return x.SessionId - } - return "" -} - -type DumpSessionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - DownloadUrl string `protobuf:"bytes,1,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"` // pre-authenticated object-storage URL - ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // URL expiry - Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // commit sequence the dump is consistent at - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DumpSessionResponse) Reset() { - *x = DumpSessionResponse{} - mi := &file_livekit_agent_session_store_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DumpSessionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DumpSessionResponse) ProtoMessage() {} - -func (x *DumpSessionResponse) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agent_session_store_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DumpSessionResponse.ProtoReflect.Descriptor instead. -func (*DumpSessionResponse) Descriptor() ([]byte, []int) { - return file_livekit_agent_session_store_proto_rawDescGZIP(), []int{10} -} - -func (x *DumpSessionResponse) GetDownloadUrl() string { - if x != nil { - return x.DownloadUrl - } - return "" -} - -func (x *DumpSessionResponse) GetExpiresAtUnix() int64 { - if x != nil { - return x.ExpiresAtUnix - } - return 0 -} - -func (x *DumpSessionResponse) GetTip() int64 { - if x != nil { - return x.Tip - } - return 0 -} - -var File_livekit_agent_session_store_proto protoreflect.FileDescriptor - -const file_livekit_agent_session_store_proto_rawDesc = "" + - "\n" + - "!livekit_agent_session_store.proto\x12\alivekit\"x\n" + - "\x14CreateSessionRequest\x12\x16\n" + - "\x06region\x18\x01 \x01(\tR\x06region\x12'\n" + - "\x0fuser_attributes\x18\x02 \x01(\tR\x0euserAttributes\x12\x1f\n" + - "\vttl_seconds\x18\x03 \x01(\x03R\n" + - "ttlSeconds\"^\n" + - "\x15CreateSessionResponse\x12\x1d\n" + - "\n" + - "session_id\x18\x01 \x01(\tR\tsessionId\x12&\n" + - "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\"2\n" + - "\x11GetSessionRequest\x12\x1d\n" + - "\n" + - "session_id\x18\x01 \x01(\tR\tsessionId\"\xd6\x01\n" + - "\x12GetSessionResponse\x12\x1d\n" + - "\n" + - "session_id\x18\x01 \x01(\tR\tsessionId\x12\x16\n" + - "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + - "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12&\n" + - "\x0fcreated_at_unix\x18\x04 \x01(\x03R\rcreatedAtUnix\x12&\n" + - "\x0fexpires_at_unix\x18\x05 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + - "\x03tip\x18\x06 \x01(\x03R\x03tip\"Q\n" + - "\x13ListSessionsRequest\x12\x1b\n" + - "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + - "\n" + - "page_token\x18\x02 \x01(\tR\tpageToken\"s\n" + - "\x14ListSessionsResponse\x123\n" + - "\bsessions\x18\x01 \x03(\v2\x17.livekit.SessionSummaryR\bsessions\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xc0\x01\n" + - "\x0eSessionSummary\x12\x1d\n" + - "\n" + - "session_id\x18\x01 \x01(\tR\tsessionId\x12\x16\n" + - "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + - "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12&\n" + - "\x0fcreated_at_unix\x18\x04 \x01(\x03R\rcreatedAtUnix\x12&\n" + - "\x0fexpires_at_unix\x18\x05 \x01(\x03R\rexpiresAtUnix\"5\n" + - "\x14DeleteSessionRequest\x12\x1d\n" + - "\n" + - "session_id\x18\x01 \x01(\tR\tsessionId\"\x17\n" + - "\x15DeleteSessionResponse\"3\n" + - "\x12DumpSessionRequest\x12\x1d\n" + - "\n" + - "session_id\x18\x01 \x01(\tR\tsessionId\"r\n" + - "\x13DumpSessionResponse\x12!\n" + - "\fdownload_url\x18\x01 \x01(\tR\vdownloadUrl\x12&\n" + - "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + - "\x03tip\x18\x03 \x01(\x03R\x03tip2\x8a\x03\n" + - "\x11AgentSessionStore\x12N\n" + - "\rCreateSession\x12\x1d.livekit.CreateSessionRequest\x1a\x1e.livekit.CreateSessionResponse\x12E\n" + - "\n" + - "GetSession\x12\x1a.livekit.GetSessionRequest\x1a\x1b.livekit.GetSessionResponse\x12K\n" + - "\fListSessions\x12\x1c.livekit.ListSessionsRequest\x1a\x1d.livekit.ListSessionsResponse\x12N\n" + - "\rDeleteSession\x12\x1d.livekit.DeleteSessionRequest\x1a\x1e.livekit.DeleteSessionResponse\x12A\n" + - "\x04Dump\x12\x1b.livekit.DumpSessionRequest\x1a\x1c.livekit.DumpSessionResponseBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" - -var ( - file_livekit_agent_session_store_proto_rawDescOnce sync.Once - file_livekit_agent_session_store_proto_rawDescData []byte -) - -func file_livekit_agent_session_store_proto_rawDescGZIP() []byte { - file_livekit_agent_session_store_proto_rawDescOnce.Do(func() { - file_livekit_agent_session_store_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_livekit_agent_session_store_proto_rawDesc), len(file_livekit_agent_session_store_proto_rawDesc))) - }) - return file_livekit_agent_session_store_proto_rawDescData -} - -var file_livekit_agent_session_store_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_livekit_agent_session_store_proto_goTypes = []any{ - (*CreateSessionRequest)(nil), // 0: livekit.CreateSessionRequest - (*CreateSessionResponse)(nil), // 1: livekit.CreateSessionResponse - (*GetSessionRequest)(nil), // 2: livekit.GetSessionRequest - (*GetSessionResponse)(nil), // 3: livekit.GetSessionResponse - (*ListSessionsRequest)(nil), // 4: livekit.ListSessionsRequest - (*ListSessionsResponse)(nil), // 5: livekit.ListSessionsResponse - (*SessionSummary)(nil), // 6: livekit.SessionSummary - (*DeleteSessionRequest)(nil), // 7: livekit.DeleteSessionRequest - (*DeleteSessionResponse)(nil), // 8: livekit.DeleteSessionResponse - (*DumpSessionRequest)(nil), // 9: livekit.DumpSessionRequest - (*DumpSessionResponse)(nil), // 10: livekit.DumpSessionResponse -} -var file_livekit_agent_session_store_proto_depIdxs = []int32{ - 6, // 0: livekit.ListSessionsResponse.sessions:type_name -> livekit.SessionSummary - 0, // 1: livekit.AgentSessionStore.CreateSession:input_type -> livekit.CreateSessionRequest - 2, // 2: livekit.AgentSessionStore.GetSession:input_type -> livekit.GetSessionRequest - 4, // 3: livekit.AgentSessionStore.ListSessions:input_type -> livekit.ListSessionsRequest - 7, // 4: livekit.AgentSessionStore.DeleteSession:input_type -> livekit.DeleteSessionRequest - 9, // 5: livekit.AgentSessionStore.Dump:input_type -> livekit.DumpSessionRequest - 1, // 6: livekit.AgentSessionStore.CreateSession:output_type -> livekit.CreateSessionResponse - 3, // 7: livekit.AgentSessionStore.GetSession:output_type -> livekit.GetSessionResponse - 5, // 8: livekit.AgentSessionStore.ListSessions:output_type -> livekit.ListSessionsResponse - 8, // 9: livekit.AgentSessionStore.DeleteSession:output_type -> livekit.DeleteSessionResponse - 10, // 10: livekit.AgentSessionStore.Dump:output_type -> livekit.DumpSessionResponse - 6, // [6:11] is the sub-list for method output_type - 1, // [1:6] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_livekit_agent_session_store_proto_init() } -func file_livekit_agent_session_store_proto_init() { - if File_livekit_agent_session_store_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_agent_session_store_proto_rawDesc), len(file_livekit_agent_session_store_proto_rawDesc)), - NumEnums: 0, - NumMessages: 11, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_livekit_agent_session_store_proto_goTypes, - DependencyIndexes: file_livekit_agent_session_store_proto_depIdxs, - MessageInfos: file_livekit_agent_session_store_proto_msgTypes, - }.Build() - File_livekit_agent_session_store_proto = out.File - file_livekit_agent_session_store_proto_goTypes = nil - file_livekit_agent_session_store_proto_depIdxs = nil -} diff --git a/livekit/livekit_agent_session_store.twirp.go b/livekit/livekit_agent_session_store.twirp.go deleted file mode 100644 index 76795a979..000000000 --- a/livekit/livekit_agent_session_store.twirp.go +++ /dev/null @@ -1,1679 +0,0 @@ -// Code generated by protoc-gen-twirp v8.1.3, DO NOT EDIT. -// source: livekit_agent_session_store.proto - -package livekit - -import context "context" -import fmt "fmt" -import http "net/http" -import io "io" -import json "encoding/json" -import strconv "strconv" -import strings "strings" - -import protojson "google.golang.org/protobuf/encoding/protojson" -import proto "google.golang.org/protobuf/proto" -import twirp "github.com/twitchtv/twirp" -import ctxsetters "github.com/twitchtv/twirp/ctxsetters" - -// Version compatibility assertion. -// If the constant is not defined in the package, that likely means -// the package needs to be updated to work with this generated code. -// See https://twitchtv.github.io/twirp/docs/version_matrix.html -const _ = twirp.TwirpPackageMinVersion_8_1_0 - -// =========================== -// AgentSessionStore Interface -// =========================== - -// AgentSessionStore manages per-session SQLite databases: lifecycle and export. -// Querying goes through the data plane in livekit_agent_session_db.proto. The -// project comes from the access token, never from a request field. -type AgentSessionStore interface { - CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error) - - GetSession(context.Context, *GetSessionRequest) (*GetSessionResponse, error) - - ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) - - // Deletes the stored data too, not just the metadata row. - DeleteSession(context.Context, *DeleteSessionRequest) (*DeleteSessionResponse, error) - - // Exports a consistent SQLite file, returning a time-limited download URL. - Dump(context.Context, *DumpSessionRequest) (*DumpSessionResponse, error) -} - -// ================================= -// AgentSessionStore Protobuf Client -// ================================= - -type agentSessionStoreProtobufClient struct { - client HTTPClient - urls [5]string - interceptor twirp.Interceptor - opts twirp.ClientOptions -} - -// NewAgentSessionStoreProtobufClient creates a Protobuf client that implements the AgentSessionStore interface. -// It communicates using Protobuf and can be configured with a custom HTTPClient. -func NewAgentSessionStoreProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) AgentSessionStore { - if c, ok := client.(*http.Client); ok { - client = withoutRedirects(c) - } - - clientOpts := twirp.ClientOptions{} - for _, o := range opts { - o(&clientOpts) - } - - // Using ReadOpt allows backwards and forwards compatibility with new options in the future - literalURLs := false - _ = clientOpts.ReadOpt("literalURLs", &literalURLs) - var pathPrefix string - if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { - pathPrefix = "/twirp" // default prefix - } - - // Build method URLs: []/./ - serviceURL := sanitizeBaseURL(baseURL) - serviceURL += baseServicePath(pathPrefix, "livekit", "AgentSessionStore") - urls := [5]string{ - serviceURL + "CreateSession", - serviceURL + "GetSession", - serviceURL + "ListSessions", - serviceURL + "DeleteSession", - serviceURL + "Dump", - } - - return &agentSessionStoreProtobufClient{ - client: client, - urls: urls, - interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...), - opts: clientOpts, - } -} - -func (c *agentSessionStoreProtobufClient) CreateSession(ctx context.Context, in *CreateSessionRequest) (*CreateSessionResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit") - ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") - ctx = ctxsetters.WithMethodName(ctx, "CreateSession") - caller := c.callCreateSession - if c.interceptor != nil { - caller = func(ctx context.Context, req *CreateSessionRequest) (*CreateSessionResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*CreateSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*CreateSessionRequest) when calling interceptor") - } - return c.callCreateSession(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*CreateSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*CreateSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentSessionStoreProtobufClient) callCreateSession(ctx context.Context, in *CreateSessionRequest) (*CreateSessionResponse, error) { - out := new(CreateSessionResponse) - ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentSessionStoreProtobufClient) GetSession(ctx context.Context, in *GetSessionRequest) (*GetSessionResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit") - ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") - ctx = ctxsetters.WithMethodName(ctx, "GetSession") - caller := c.callGetSession - if c.interceptor != nil { - caller = func(ctx context.Context, req *GetSessionRequest) (*GetSessionResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*GetSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*GetSessionRequest) when calling interceptor") - } - return c.callGetSession(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*GetSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*GetSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentSessionStoreProtobufClient) callGetSession(ctx context.Context, in *GetSessionRequest) (*GetSessionResponse, error) { - out := new(GetSessionResponse) - ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentSessionStoreProtobufClient) ListSessions(ctx context.Context, in *ListSessionsRequest) (*ListSessionsResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit") - ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") - ctx = ctxsetters.WithMethodName(ctx, "ListSessions") - caller := c.callListSessions - if c.interceptor != nil { - caller = func(ctx context.Context, req *ListSessionsRequest) (*ListSessionsResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListSessionsRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListSessionsRequest) when calling interceptor") - } - return c.callListSessions(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*ListSessionsResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListSessionsResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentSessionStoreProtobufClient) callListSessions(ctx context.Context, in *ListSessionsRequest) (*ListSessionsResponse, error) { - out := new(ListSessionsResponse) - ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentSessionStoreProtobufClient) DeleteSession(ctx context.Context, in *DeleteSessionRequest) (*DeleteSessionResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit") - ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") - ctx = ctxsetters.WithMethodName(ctx, "DeleteSession") - caller := c.callDeleteSession - if c.interceptor != nil { - caller = func(ctx context.Context, req *DeleteSessionRequest) (*DeleteSessionResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DeleteSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DeleteSessionRequest) when calling interceptor") - } - return c.callDeleteSession(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DeleteSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DeleteSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentSessionStoreProtobufClient) callDeleteSession(ctx context.Context, in *DeleteSessionRequest) (*DeleteSessionResponse, error) { - out := new(DeleteSessionResponse) - ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentSessionStoreProtobufClient) Dump(ctx context.Context, in *DumpSessionRequest) (*DumpSessionResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit") - ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") - ctx = ctxsetters.WithMethodName(ctx, "Dump") - caller := c.callDump - if c.interceptor != nil { - caller = func(ctx context.Context, req *DumpSessionRequest) (*DumpSessionResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DumpSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DumpSessionRequest) when calling interceptor") - } - return c.callDump(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DumpSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DumpSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentSessionStoreProtobufClient) callDump(ctx context.Context, in *DumpSessionRequest) (*DumpSessionResponse, error) { - out := new(DumpSessionResponse) - ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -// ============================= -// AgentSessionStore JSON Client -// ============================= - -type agentSessionStoreJSONClient struct { - client HTTPClient - urls [5]string - interceptor twirp.Interceptor - opts twirp.ClientOptions -} - -// NewAgentSessionStoreJSONClient creates a JSON client that implements the AgentSessionStore interface. -// It communicates using JSON and can be configured with a custom HTTPClient. -func NewAgentSessionStoreJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) AgentSessionStore { - if c, ok := client.(*http.Client); ok { - client = withoutRedirects(c) - } - - clientOpts := twirp.ClientOptions{} - for _, o := range opts { - o(&clientOpts) - } - - // Using ReadOpt allows backwards and forwards compatibility with new options in the future - literalURLs := false - _ = clientOpts.ReadOpt("literalURLs", &literalURLs) - var pathPrefix string - if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { - pathPrefix = "/twirp" // default prefix - } - - // Build method URLs: []/./ - serviceURL := sanitizeBaseURL(baseURL) - serviceURL += baseServicePath(pathPrefix, "livekit", "AgentSessionStore") - urls := [5]string{ - serviceURL + "CreateSession", - serviceURL + "GetSession", - serviceURL + "ListSessions", - serviceURL + "DeleteSession", - serviceURL + "Dump", - } - - return &agentSessionStoreJSONClient{ - client: client, - urls: urls, - interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...), - opts: clientOpts, - } -} - -func (c *agentSessionStoreJSONClient) CreateSession(ctx context.Context, in *CreateSessionRequest) (*CreateSessionResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit") - ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") - ctx = ctxsetters.WithMethodName(ctx, "CreateSession") - caller := c.callCreateSession - if c.interceptor != nil { - caller = func(ctx context.Context, req *CreateSessionRequest) (*CreateSessionResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*CreateSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*CreateSessionRequest) when calling interceptor") - } - return c.callCreateSession(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*CreateSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*CreateSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentSessionStoreJSONClient) callCreateSession(ctx context.Context, in *CreateSessionRequest) (*CreateSessionResponse, error) { - out := new(CreateSessionResponse) - ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentSessionStoreJSONClient) GetSession(ctx context.Context, in *GetSessionRequest) (*GetSessionResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit") - ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") - ctx = ctxsetters.WithMethodName(ctx, "GetSession") - caller := c.callGetSession - if c.interceptor != nil { - caller = func(ctx context.Context, req *GetSessionRequest) (*GetSessionResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*GetSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*GetSessionRequest) when calling interceptor") - } - return c.callGetSession(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*GetSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*GetSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentSessionStoreJSONClient) callGetSession(ctx context.Context, in *GetSessionRequest) (*GetSessionResponse, error) { - out := new(GetSessionResponse) - ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentSessionStoreJSONClient) ListSessions(ctx context.Context, in *ListSessionsRequest) (*ListSessionsResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit") - ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") - ctx = ctxsetters.WithMethodName(ctx, "ListSessions") - caller := c.callListSessions - if c.interceptor != nil { - caller = func(ctx context.Context, req *ListSessionsRequest) (*ListSessionsResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListSessionsRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListSessionsRequest) when calling interceptor") - } - return c.callListSessions(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*ListSessionsResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListSessionsResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentSessionStoreJSONClient) callListSessions(ctx context.Context, in *ListSessionsRequest) (*ListSessionsResponse, error) { - out := new(ListSessionsResponse) - ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentSessionStoreJSONClient) DeleteSession(ctx context.Context, in *DeleteSessionRequest) (*DeleteSessionResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit") - ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") - ctx = ctxsetters.WithMethodName(ctx, "DeleteSession") - caller := c.callDeleteSession - if c.interceptor != nil { - caller = func(ctx context.Context, req *DeleteSessionRequest) (*DeleteSessionResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DeleteSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DeleteSessionRequest) when calling interceptor") - } - return c.callDeleteSession(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DeleteSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DeleteSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentSessionStoreJSONClient) callDeleteSession(ctx context.Context, in *DeleteSessionRequest) (*DeleteSessionResponse, error) { - out := new(DeleteSessionResponse) - ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentSessionStoreJSONClient) Dump(ctx context.Context, in *DumpSessionRequest) (*DumpSessionResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit") - ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") - ctx = ctxsetters.WithMethodName(ctx, "Dump") - caller := c.callDump - if c.interceptor != nil { - caller = func(ctx context.Context, req *DumpSessionRequest) (*DumpSessionResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DumpSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DumpSessionRequest) when calling interceptor") - } - return c.callDump(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DumpSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DumpSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentSessionStoreJSONClient) callDump(ctx context.Context, in *DumpSessionRequest) (*DumpSessionResponse, error) { - out := new(DumpSessionResponse) - ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -// ================================ -// AgentSessionStore Server Handler -// ================================ - -type agentSessionStoreServer struct { - AgentSessionStore - interceptor twirp.Interceptor - hooks *twirp.ServerHooks - pathPrefix string // prefix for routing - jsonSkipDefaults bool // do not include unpopulated fields (default values) in the response - jsonCamelCase bool // JSON fields are serialized as lowerCamelCase rather than keeping the original proto names -} - -// NewAgentSessionStoreServer builds a TwirpServer that can be used as an http.Handler to handle -// HTTP requests that are routed to the right method in the provided svc implementation. -// The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks). -func NewAgentSessionStoreServer(svc AgentSessionStore, opts ...interface{}) TwirpServer { - serverOpts := newServerOpts(opts) - - // Using ReadOpt allows backwards and forwards compatibility with new options in the future - jsonSkipDefaults := false - _ = serverOpts.ReadOpt("jsonSkipDefaults", &jsonSkipDefaults) - jsonCamelCase := false - _ = serverOpts.ReadOpt("jsonCamelCase", &jsonCamelCase) - var pathPrefix string - if ok := serverOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { - pathPrefix = "/twirp" // default prefix - } - - return &agentSessionStoreServer{ - AgentSessionStore: svc, - hooks: serverOpts.Hooks, - interceptor: twirp.ChainInterceptors(serverOpts.Interceptors...), - pathPrefix: pathPrefix, - jsonSkipDefaults: jsonSkipDefaults, - jsonCamelCase: jsonCamelCase, - } -} - -// writeError writes an HTTP response with a valid Twirp error format, and triggers hooks. -// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err) -func (s *agentSessionStoreServer) writeError(ctx context.Context, resp http.ResponseWriter, err error) { - writeError(ctx, resp, err, s.hooks) -} - -// handleRequestBodyError is used to handle error when the twirp server cannot read request -func (s *agentSessionStoreServer) handleRequestBodyError(ctx context.Context, resp http.ResponseWriter, msg string, err error) { - if context.Canceled == ctx.Err() { - s.writeError(ctx, resp, twirp.NewError(twirp.Canceled, "failed to read request: context canceled")) - return - } - if context.DeadlineExceeded == ctx.Err() { - s.writeError(ctx, resp, twirp.NewError(twirp.DeadlineExceeded, "failed to read request: deadline exceeded")) - return - } - s.writeError(ctx, resp, twirp.WrapError(malformedRequestError(msg), err)) -} - -// AgentSessionStorePathPrefix is a convenience constant that may identify URL paths. -// Should be used with caution, it only matches routes generated by Twirp Go clients, -// with the default "/twirp" prefix and default CamelCase service and method names. -// More info: https://twitchtv.github.io/twirp/docs/routing.html -const AgentSessionStorePathPrefix = "/twirp/livekit.AgentSessionStore/" - -func (s *agentSessionStoreServer) ServeHTTP(resp http.ResponseWriter, req *http.Request) { - ctx := req.Context() - ctx = ctxsetters.WithPackageName(ctx, "livekit") - ctx = ctxsetters.WithServiceName(ctx, "AgentSessionStore") - ctx = ctxsetters.WithResponseWriter(ctx, resp) - - var err error - ctx, err = callRequestReceived(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - if req.Method != "POST" { - msg := fmt.Sprintf("unsupported method %q (only POST is allowed)", req.Method) - s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) - return - } - - // Verify path format: []/./ - prefix, pkgService, method := parseTwirpPath(req.URL.Path) - if pkgService != "livekit.AgentSessionStore" { - msg := fmt.Sprintf("no handler for path %q", req.URL.Path) - s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) - return - } - if prefix != s.pathPrefix { - msg := fmt.Sprintf("invalid path prefix %q, expected %q, on path %q", prefix, s.pathPrefix, req.URL.Path) - s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) - return - } - - switch method { - case "CreateSession": - s.serveCreateSession(ctx, resp, req) - return - case "GetSession": - s.serveGetSession(ctx, resp, req) - return - case "ListSessions": - s.serveListSessions(ctx, resp, req) - return - case "DeleteSession": - s.serveDeleteSession(ctx, resp, req) - return - case "Dump": - s.serveDump(ctx, resp, req) - return - default: - msg := fmt.Sprintf("no handler for path %q", req.URL.Path) - s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) - return - } -} - -func (s *agentSessionStoreServer) serveCreateSession(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - header := req.Header.Get("Content-Type") - i := strings.Index(header, ";") - if i == -1 { - i = len(header) - } - switch strings.TrimSpace(strings.ToLower(header[:i])) { - case "application/json": - s.serveCreateSessionJSON(ctx, resp, req) - case "application/protobuf": - s.serveCreateSessionProtobuf(ctx, resp, req) - default: - msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) - twerr := badRouteError(msg, req.Method, req.URL.Path) - s.writeError(ctx, resp, twerr) - } -} - -func (s *agentSessionStoreServer) serveCreateSessionJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "CreateSession") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - d := json.NewDecoder(req.Body) - rawReqBody := json.RawMessage{} - if err := d.Decode(&rawReqBody); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - reqContent := new(CreateSessionRequest) - unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} - if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - - handler := s.AgentSessionStore.CreateSession - if s.interceptor != nil { - handler = func(ctx context.Context, req *CreateSessionRequest) (*CreateSessionResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*CreateSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*CreateSessionRequest) when calling interceptor") - } - return s.AgentSessionStore.CreateSession(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*CreateSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*CreateSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *CreateSessionResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *CreateSessionResponse and nil error while calling CreateSession. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} - respBytes, err := marshaler.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/json") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentSessionStoreServer) serveCreateSessionProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "CreateSession") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - buf, err := io.ReadAll(req.Body) - if err != nil { - s.handleRequestBodyError(ctx, resp, "failed to read request body", err) - return - } - reqContent := new(CreateSessionRequest) - if err = proto.Unmarshal(buf, reqContent); err != nil { - s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) - return - } - - handler := s.AgentSessionStore.CreateSession - if s.interceptor != nil { - handler = func(ctx context.Context, req *CreateSessionRequest) (*CreateSessionResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*CreateSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*CreateSessionRequest) when calling interceptor") - } - return s.AgentSessionStore.CreateSession(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*CreateSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*CreateSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *CreateSessionResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *CreateSessionResponse and nil error while calling CreateSession. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - respBytes, err := proto.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/protobuf") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentSessionStoreServer) serveGetSession(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - header := req.Header.Get("Content-Type") - i := strings.Index(header, ";") - if i == -1 { - i = len(header) - } - switch strings.TrimSpace(strings.ToLower(header[:i])) { - case "application/json": - s.serveGetSessionJSON(ctx, resp, req) - case "application/protobuf": - s.serveGetSessionProtobuf(ctx, resp, req) - default: - msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) - twerr := badRouteError(msg, req.Method, req.URL.Path) - s.writeError(ctx, resp, twerr) - } -} - -func (s *agentSessionStoreServer) serveGetSessionJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "GetSession") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - d := json.NewDecoder(req.Body) - rawReqBody := json.RawMessage{} - if err := d.Decode(&rawReqBody); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - reqContent := new(GetSessionRequest) - unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} - if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - - handler := s.AgentSessionStore.GetSession - if s.interceptor != nil { - handler = func(ctx context.Context, req *GetSessionRequest) (*GetSessionResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*GetSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*GetSessionRequest) when calling interceptor") - } - return s.AgentSessionStore.GetSession(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*GetSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*GetSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *GetSessionResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *GetSessionResponse and nil error while calling GetSession. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} - respBytes, err := marshaler.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/json") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentSessionStoreServer) serveGetSessionProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "GetSession") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - buf, err := io.ReadAll(req.Body) - if err != nil { - s.handleRequestBodyError(ctx, resp, "failed to read request body", err) - return - } - reqContent := new(GetSessionRequest) - if err = proto.Unmarshal(buf, reqContent); err != nil { - s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) - return - } - - handler := s.AgentSessionStore.GetSession - if s.interceptor != nil { - handler = func(ctx context.Context, req *GetSessionRequest) (*GetSessionResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*GetSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*GetSessionRequest) when calling interceptor") - } - return s.AgentSessionStore.GetSession(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*GetSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*GetSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *GetSessionResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *GetSessionResponse and nil error while calling GetSession. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - respBytes, err := proto.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/protobuf") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentSessionStoreServer) serveListSessions(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - header := req.Header.Get("Content-Type") - i := strings.Index(header, ";") - if i == -1 { - i = len(header) - } - switch strings.TrimSpace(strings.ToLower(header[:i])) { - case "application/json": - s.serveListSessionsJSON(ctx, resp, req) - case "application/protobuf": - s.serveListSessionsProtobuf(ctx, resp, req) - default: - msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) - twerr := badRouteError(msg, req.Method, req.URL.Path) - s.writeError(ctx, resp, twerr) - } -} - -func (s *agentSessionStoreServer) serveListSessionsJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "ListSessions") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - d := json.NewDecoder(req.Body) - rawReqBody := json.RawMessage{} - if err := d.Decode(&rawReqBody); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - reqContent := new(ListSessionsRequest) - unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} - if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - - handler := s.AgentSessionStore.ListSessions - if s.interceptor != nil { - handler = func(ctx context.Context, req *ListSessionsRequest) (*ListSessionsResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListSessionsRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListSessionsRequest) when calling interceptor") - } - return s.AgentSessionStore.ListSessions(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*ListSessionsResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListSessionsResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *ListSessionsResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *ListSessionsResponse and nil error while calling ListSessions. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} - respBytes, err := marshaler.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/json") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentSessionStoreServer) serveListSessionsProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "ListSessions") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - buf, err := io.ReadAll(req.Body) - if err != nil { - s.handleRequestBodyError(ctx, resp, "failed to read request body", err) - return - } - reqContent := new(ListSessionsRequest) - if err = proto.Unmarshal(buf, reqContent); err != nil { - s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) - return - } - - handler := s.AgentSessionStore.ListSessions - if s.interceptor != nil { - handler = func(ctx context.Context, req *ListSessionsRequest) (*ListSessionsResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListSessionsRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListSessionsRequest) when calling interceptor") - } - return s.AgentSessionStore.ListSessions(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*ListSessionsResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListSessionsResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *ListSessionsResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *ListSessionsResponse and nil error while calling ListSessions. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - respBytes, err := proto.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/protobuf") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentSessionStoreServer) serveDeleteSession(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - header := req.Header.Get("Content-Type") - i := strings.Index(header, ";") - if i == -1 { - i = len(header) - } - switch strings.TrimSpace(strings.ToLower(header[:i])) { - case "application/json": - s.serveDeleteSessionJSON(ctx, resp, req) - case "application/protobuf": - s.serveDeleteSessionProtobuf(ctx, resp, req) - default: - msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) - twerr := badRouteError(msg, req.Method, req.URL.Path) - s.writeError(ctx, resp, twerr) - } -} - -func (s *agentSessionStoreServer) serveDeleteSessionJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "DeleteSession") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - d := json.NewDecoder(req.Body) - rawReqBody := json.RawMessage{} - if err := d.Decode(&rawReqBody); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - reqContent := new(DeleteSessionRequest) - unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} - if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - - handler := s.AgentSessionStore.DeleteSession - if s.interceptor != nil { - handler = func(ctx context.Context, req *DeleteSessionRequest) (*DeleteSessionResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DeleteSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DeleteSessionRequest) when calling interceptor") - } - return s.AgentSessionStore.DeleteSession(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DeleteSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DeleteSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *DeleteSessionResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *DeleteSessionResponse and nil error while calling DeleteSession. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} - respBytes, err := marshaler.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/json") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentSessionStoreServer) serveDeleteSessionProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "DeleteSession") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - buf, err := io.ReadAll(req.Body) - if err != nil { - s.handleRequestBodyError(ctx, resp, "failed to read request body", err) - return - } - reqContent := new(DeleteSessionRequest) - if err = proto.Unmarshal(buf, reqContent); err != nil { - s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) - return - } - - handler := s.AgentSessionStore.DeleteSession - if s.interceptor != nil { - handler = func(ctx context.Context, req *DeleteSessionRequest) (*DeleteSessionResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DeleteSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DeleteSessionRequest) when calling interceptor") - } - return s.AgentSessionStore.DeleteSession(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DeleteSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DeleteSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *DeleteSessionResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *DeleteSessionResponse and nil error while calling DeleteSession. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - respBytes, err := proto.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/protobuf") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentSessionStoreServer) serveDump(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - header := req.Header.Get("Content-Type") - i := strings.Index(header, ";") - if i == -1 { - i = len(header) - } - switch strings.TrimSpace(strings.ToLower(header[:i])) { - case "application/json": - s.serveDumpJSON(ctx, resp, req) - case "application/protobuf": - s.serveDumpProtobuf(ctx, resp, req) - default: - msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) - twerr := badRouteError(msg, req.Method, req.URL.Path) - s.writeError(ctx, resp, twerr) - } -} - -func (s *agentSessionStoreServer) serveDumpJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "Dump") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - d := json.NewDecoder(req.Body) - rawReqBody := json.RawMessage{} - if err := d.Decode(&rawReqBody); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - reqContent := new(DumpSessionRequest) - unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} - if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - - handler := s.AgentSessionStore.Dump - if s.interceptor != nil { - handler = func(ctx context.Context, req *DumpSessionRequest) (*DumpSessionResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DumpSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DumpSessionRequest) when calling interceptor") - } - return s.AgentSessionStore.Dump(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DumpSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DumpSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *DumpSessionResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *DumpSessionResponse and nil error while calling Dump. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} - respBytes, err := marshaler.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/json") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentSessionStoreServer) serveDumpProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "Dump") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - buf, err := io.ReadAll(req.Body) - if err != nil { - s.handleRequestBodyError(ctx, resp, "failed to read request body", err) - return - } - reqContent := new(DumpSessionRequest) - if err = proto.Unmarshal(buf, reqContent); err != nil { - s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) - return - } - - handler := s.AgentSessionStore.Dump - if s.interceptor != nil { - handler = func(ctx context.Context, req *DumpSessionRequest) (*DumpSessionResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DumpSessionRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DumpSessionRequest) when calling interceptor") - } - return s.AgentSessionStore.Dump(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DumpSessionResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DumpSessionResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *DumpSessionResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *DumpSessionResponse and nil error while calling Dump. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - respBytes, err := proto.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/protobuf") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentSessionStoreServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor2, 0 -} - -func (s *agentSessionStoreServer) ProtocGenTwirpVersion() string { - return "v8.1.3" -} - -// PathPrefix returns the base service path, in the form: "//./" -// that is everything in a Twirp route except for the . This can be used for routing, -// for example to identify the requests that are targeted to this service in a mux. -func (s *agentSessionStoreServer) PathPrefix() string { - return baseServicePath(s.pathPrefix, "livekit", "AgentSessionStore") -} - -var twirpFileDescriptor2 = []byte{ - // 591 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0x96, 0xe3, 0xb6, 0xbf, 0x66, 0xd2, 0x24, 0xbf, 0x6e, 0x53, 0x1a, 0xa5, 0x0d, 0xa4, 0x46, - 0x2a, 0x39, 0xa5, 0x52, 0x22, 0x2e, 0xbd, 0x05, 0x0a, 0x08, 0xb5, 0xaa, 0x8a, 0x43, 0x2f, 0x1c, - 0xb0, 0x9c, 0x78, 0x14, 0x56, 0x75, 0xbc, 0x66, 0x77, 0x5d, 0x42, 0x1f, 0x81, 0x47, 0xe1, 0x29, - 0x78, 0x0a, 0x1e, 0x82, 0xa7, 0x40, 0x5e, 0xaf, 0x9d, 0x7f, 0x2e, 0x2d, 0x47, 0x6e, 0xf1, 0x37, - 0xdf, 0xcc, 0xee, 0x37, 0xf3, 0xed, 0x04, 0x0e, 0x7d, 0x7a, 0x83, 0xd7, 0x54, 0x3a, 0xee, 0x18, - 0x03, 0xe9, 0x08, 0x14, 0x82, 0xb2, 0xc0, 0x11, 0x92, 0x71, 0xec, 0x84, 0x9c, 0x49, 0x46, 0xfe, - 0xd3, 0x14, 0x6b, 0x0a, 0xb5, 0x97, 0x1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 0x32, 0x67, 0xb0, 0x35, 0xef, 0x6e, 0x72, 0x90, 0x91, 0x73, 0xde, 0x51, - 0xa3, 0x79, 0x47, 0x54, 0x17, 0xbb, 0x80, 0xf2, 0xc2, 0xec, 0xe6, 0x34, 0xe6, 0x59, 0x61, 0x4e, - 0x63, 0xee, 0xc8, 0x49, 0x1f, 0xd6, 0xe2, 0xe9, 0x91, 0x99, 0x82, 0x55, 0x07, 0x34, 0x0e, 0xf2, - 0x83, 0x49, 0x89, 0x17, 0xaf, 0x3f, 0x3c, 0x1d, 0x53, 0xf9, 0x29, 0x1a, 0x76, 0x46, 0x6c, 0x72, - 0xac, 0x99, 0xc7, 0xea, 0xcf, 0x61, 0xc4, 0xfc, 0x14, 0xf8, 0x5e, 0x28, 0x9f, 0xd3, 0x1b, 0x3c, - 0xa3, 0xb2, 0x73, 0x19, 0x87, 0x7e, 0x15, 0x2a, 0xfa, 0xfb, 0xe4, 0x44, 0x01, 0xc3, 0x0d, 0x95, - 0xd2, 0xfb, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x56, 0xcf, 0x7b, 0x99, 0x74, 0x06, 0x00, 0x00, -} diff --git a/magefile.go b/magefile.go index 7f2980770..7fd8b2854 100644 --- a/magefile.go +++ b/magefile.go @@ -45,7 +45,6 @@ func Proto() error { twirpProtoFiles := []string{ "cloud_replay.proto", "livekit_agent_dispatch.proto", - "livekit_agent_session_store.proto", "livekit_egress.proto", "livekit_ingress.proto", "livekit_room.proto", @@ -67,7 +66,6 @@ func Proto() error { protoFiles := []string{ "livekit_agent.proto", - "livekit_agent_session_db.proto", "livekit_analytics.proto", "livekit_internal.proto", "livekit_models.proto", @@ -172,6 +170,28 @@ func Proto() error { } } + // Own go_package, so its own invocation: protoc-gen-twirp refuses to mix + // packages in one run. + fmt.Println("generating protobuf (livekit/agentdb)") + { + args := []string{ + "--go_out", target, + "--twirp_out", target, + "--go_opt=paths=source_relative", + "--twirp_opt=paths=source_relative", + "--plugin=go=" + protocGoPath, + "--plugin=twirp=" + twirpPath, + "-I=./protobufs", + "agentdb/livekit_agentdb.proto", + "agentdb/livekit_agentdb_data.proto", + } + cmd := exec.Command(protoc, args...) + connectStd(cmd) + if err := cmd.Run(); err != nil { + return err + } + } + fmt.Println("generating protobuf (livekit/roomrpc)") for _, protoName := range roomrpcTypeNames { pkgName := "roomrpc/" + protoName + "rpc" diff --git a/protobufs/livekit_agent_session_store.proto b/protobufs/agentdb/livekit_agentdb.proto similarity index 57% rename from protobufs/livekit_agent_session_store.proto rename to protobufs/agentdb/livekit_agentdb.proto index 69aa3ea3a..a8bdd347d 100644 --- a/protobufs/livekit_agent_session_store.proto +++ b/protobufs/agentdb/livekit_agentdb.proto @@ -14,44 +14,44 @@ syntax = "proto3"; -package livekit; +package livekit.agentdb; -option go_package = "github.com/livekit/protocol/livekit"; +option go_package = "github.com/livekit/protocol/livekit/agentdb"; option csharp_namespace = "LiveKit.Proto"; option ruby_package = "LiveKit::Proto"; -// AgentSessionStore manages per-session SQLite databases: lifecycle and export. -// Querying goes through the data plane in livekit_agent_session_db.proto. The -// project comes from the access token, never from a request field. -service AgentSessionStore { - rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse); - rpc GetSession(GetSessionRequest) returns (GetSessionResponse); - rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse); +// AgentDB hands out SQLite databases: lifecycle and export. Querying goes +// through the data plane in livekit_agentdb_data.proto. The project comes from +// the access token, never from a request field. +service AgentDB { + rpc CreateDatabase(CreateDatabaseRequest) returns (CreateDatabaseResponse); + rpc GetDatabase(GetDatabaseRequest) returns (GetDatabaseResponse); + rpc ListDatabases(ListDatabasesRequest) returns (ListDatabasesResponse); // Deletes the stored data too, not just the metadata row. - rpc DeleteSession(DeleteSessionRequest) returns (DeleteSessionResponse); + rpc DeleteDatabase(DeleteDatabaseRequest) returns (DeleteDatabaseResponse); // Exports a consistent SQLite file, returning a time-limited download URL. - rpc Dump(DumpSessionRequest) returns (DumpSessionResponse); + rpc Dump(DumpDatabaseRequest) returns (DumpDatabaseResponse); } -message CreateSessionRequest { +message CreateDatabaseRequest { string region = 1; string user_attributes = 2; // opaque JSON metadata for the caller int64 ttl_seconds = 3; // unset: never expires. Otherwise clamped to the server cap, and never extended } -message CreateSessionResponse { - string session_id = 1; // "SESS_..." +message CreateDatabaseResponse { + string database_id = 1; // "DB_..." int64 expires_at_unix = 2; // 0: never expires } -message GetSessionRequest { - string session_id = 1; +message GetDatabaseRequest { + string database_id = 1; } -message GetSessionResponse { - string session_id = 1; +message GetDatabaseResponse { + string database_id = 1; string region = 2; string user_attributes = 3; int64 created_at_unix = 4; @@ -59,37 +59,37 @@ message GetSessionResponse { int64 tip = 6; // latest durable commit sequence } -message ListSessionsRequest { +message ListDatabasesRequest { int32 page_size = 1; // server-clamped string page_token = 2; // opaque cursor from a previous response } -message ListSessionsResponse { - repeated SessionSummary sessions = 1; +message ListDatabasesResponse { + repeated DatabaseSummary databases = 1; string next_page_token = 2; // empty when exhausted } -// SessionSummary is a session's immutable fields. No tip: it changes on every -// commit, so call GetSession for it. -message SessionSummary { - string session_id = 1; +// DatabaseSummary is a database's immutable fields. No tip: it changes on every +// commit, so call GetDatabase for it. +message DatabaseSummary { + string database_id = 1; string region = 2; string user_attributes = 3; int64 created_at_unix = 4; int64 expires_at_unix = 5; // 0: never expires } -message DeleteSessionRequest { - string session_id = 1; +message DeleteDatabaseRequest { + string database_id = 1; } -message DeleteSessionResponse {} +message DeleteDatabaseResponse {} -message DumpSessionRequest { - string session_id = 1; +message DumpDatabaseRequest { + string database_id = 1; } -message DumpSessionResponse { +message DumpDatabaseResponse { string download_url = 1; // pre-authenticated object-storage URL int64 expires_at_unix = 2; // URL expiry int64 tip = 3; // commit sequence the dump is consistent at diff --git a/protobufs/agentdb/livekit_agentdb_data.proto b/protobufs/agentdb/livekit_agentdb_data.proto new file mode 100644 index 000000000..417612cc6 --- /dev/null +++ b/protobufs/agentdb/livekit_agentdb_data.proto @@ -0,0 +1,164 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package livekit.agentdb; + +option go_package = "github.com/livekit/protocol/livekit/agentdb"; +option csharp_namespace = "LiveKit.Proto"; +option ruby_package = "LiveKit::Proto"; + +// Data plane for AgentDB databases: one WebSocket per database, one +// protobuf message per frame, requests and responses correlated by a +// client-chosen request_id. +// +// Query results stream as ColumnBatch frames paced by the credits the +// client advertises (Credit): the server never sends more un-consumed +// batches than granted. + +message ClientMessage { + uint32 request_id = 1; + oneof message { + Hello hello = 2; // must be first on the socket + Statement exec = 3; // no result rows; answers ExecResult + Statement query = 4; // answers Columns + ColumnBatch* + Done + Batch batch = 5; // atomic multi-statement exec + Begin begin = 6; // interactive transaction (server enforces idle/duration timeouts) + Commit commit = 7; + Rollback rollback = 8; + Cancel cancel = 9; // stop a running query's stream/cursor + Credit credit = 10; // grant more batch credits for request_id + Ping ping = 11; + } +} + +message ServerMessage { + uint32 request_id = 1; + oneof message { + HelloOk hello_ok = 2; + Columns columns = 3; + ColumnBatch column_batch = 4; + ExecResult exec_result = 5; + Done done = 6; + Error error = 7; + Pong pong = 8; + } +} + +// QueryLang selects the query language of a statement; both execute +// against the same database. +enum QueryLang { + QUERY_LANG_SQL = 0; + QUERY_LANG_CYPHER = 1; +} + +// Value mirrors SQLite's five storage classes exactly. +message Value { + oneof value { + bool null_value = 1; // always true when set + int64 int_value = 2; + double double_value = 3; + string text_value = 4; + bytes blob_value = 5; + } +} + +message Statement { + string sql = 1; // statement text in the selected lang + repeated Value params = 2; // positional bind parameters + QueryLang lang = 3; +} + +message Batch { + repeated Statement statements = 1; // applied atomically, in order +} + +message Begin {} +message Commit {} +message Rollback {} +message Cancel {} + +message Credit { + uint32 batches = 1; // additional batch frames the client can absorb +} + +message Ping { + int64 timestamp = 1; +} + +message Pong { + int64 last_ping_timestamp = 1; + int64 timestamp = 2; +} + +message Hello { + string token = 1; // access token; authorization is checked here + string database_id = 2; +} + +message HelloOk { + int64 tip = 1; // latest durable commit sequence + uint32 ping_interval_ms = 2; // server-advertised keepalive cadence + uint32 ping_timeout_ms = 3; +} + +message Columns { + repeated string names = 1; +} + +// ValueType tags one value's storage class within a Column. +enum ValueType { + VALUE_TYPE_NULL = 0; + VALUE_TYPE_INT = 1; + VALUE_TYPE_DOUBLE = 2; + VALUE_TYPE_TEXT = 3; + VALUE_TYPE_BLOB = 4; +} + +// Column is one column of a batch. Values are typed individually, as +// SQLite types them, so a column may mix classes: walk `types` and take the next +// entry from the matching array. A NULL occupies a tag only. +message Column { + bytes types = 1; // one ValueType per row + repeated sint64 ints = 2; + repeated double doubles = 3; + // Values concatenated, one exclusive end offset each: value i is + // data[ends[i-1]:ends[i]], with 0 implied before the first. + bytes text_data = 4; + repeated uint32 text_ends = 5; + bytes blob_data = 6; + repeated uint32 blob_ends = 7; +} + +message ColumnBatch { + repeated Column columns = 1; // one per column of Columns + uint32 rows = 2; +} + +message ExecResult { + int64 rows_affected = 1; + int64 last_insert_id = 2; + int64 tip = 3; // durable commit sequence after this exec +} + +message Done { + int64 tip = 1; // snapshot the query ran at + uint64 total_rows = 2; +} + +message Error { + string code = 1; // stable machine-readable code + string message = 2; +} diff --git a/protobufs/livekit_agent_session_db.proto b/protobufs/livekit_agent_session_db.proto deleted file mode 100644 index 5ee9a8035..000000000 --- a/protobufs/livekit_agent_session_db.proto +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright 2026 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package livekit; - -option go_package = "github.com/livekit/protocol/livekit"; -option csharp_namespace = "LiveKit.Proto"; -option ruby_package = "LiveKit::Proto"; - -// Data plane for AgentSessionStore databases: one WebSocket per session, one -// protobuf message per frame, requests and responses correlated by a -// client-chosen request_id. -// -// Query results stream as SessionColumnBatch frames paced by the credits the -// client advertises (SessionCredit): the server never sends more un-consumed -// batches than granted. - -message SessionStoreRequest { - uint32 request_id = 1; - oneof message { - SessionHello hello = 2; // must be first on the socket - SessionStatement exec = 3; // no result rows; answers SessionExecResult - SessionStatement query = 4; // answers SessionColumns + SessionColumnBatch* + SessionDone - SessionBatch batch = 5; // atomic multi-statement exec - SessionBegin begin = 6; // interactive transaction (server enforces idle/duration timeouts) - SessionCommit commit = 7; - SessionRollback rollback = 8; - SessionCancel cancel = 9; // stop a running query's stream/cursor - SessionCredit credit = 10; // grant more batch credits for request_id - SessionPing ping = 11; - } -} - -message SessionStoreResponse { - uint32 request_id = 1; - oneof message { - SessionHelloOk hello_ok = 2; - SessionColumns columns = 3; - SessionColumnBatch column_batch = 4; - SessionExecResult exec_result = 5; - SessionDone done = 6; - SessionStoreError error = 7; - SessionPong pong = 8; - } -} - -// SessionQueryLang selects the query language of a statement; both execute -// against the same session database. -enum SessionQueryLang { - SESSION_QUERY_LANG_SQL = 0; - SESSION_QUERY_LANG_CYPHER = 1; -} - -// SessionValue mirrors SQLite's five storage classes exactly. -message SessionValue { - oneof value { - bool null_value = 1; // always true when set - int64 int_value = 2; - double double_value = 3; - string text_value = 4; - bytes blob_value = 5; - } -} - -message SessionStatement { - string sql = 1; // statement text in the selected lang - repeated SessionValue params = 2; // positional bind parameters - SessionQueryLang lang = 3; -} - -message SessionBatch { - repeated SessionStatement statements = 1; // applied atomically, in order -} - -message SessionBegin {} -message SessionCommit {} -message SessionRollback {} -message SessionCancel {} - -message SessionCredit { - uint32 batches = 1; // additional batch frames the client can absorb -} - -message SessionPing { - int64 timestamp = 1; -} - -message SessionPong { - int64 last_ping_timestamp = 1; - int64 timestamp = 2; -} - -message SessionHello { - string token = 1; // access token; authorization is checked here - string session_id = 2; -} - -message SessionHelloOk { - int64 tip = 1; // latest durable commit sequence - uint32 ping_interval_ms = 2; // server-advertised keepalive cadence - uint32 ping_timeout_ms = 3; -} - -message SessionColumns { - repeated string names = 1; -} - -// SessionValueType tags one value's storage class within a SessionColumn. -enum SessionValueType { - SESSION_VALUE_TYPE_NULL = 0; - SESSION_VALUE_TYPE_INT = 1; - SESSION_VALUE_TYPE_DOUBLE = 2; - SESSION_VALUE_TYPE_TEXT = 3; - SESSION_VALUE_TYPE_BLOB = 4; -} - -// SessionColumn is one column of a batch. Values are typed individually, as -// SQLite types them, so a column may mix classes: walk `types` and take the next -// entry from the matching array. A NULL occupies a tag only. -message SessionColumn { - bytes types = 1; // one SessionValueType per row - repeated sint64 ints = 2; - repeated double doubles = 3; - // Values concatenated, one exclusive end offset each: value i is - // data[ends[i-1]:ends[i]], with 0 implied before the first. - bytes text_data = 4; - repeated uint32 text_ends = 5; - bytes blob_data = 6; - repeated uint32 blob_ends = 7; -} - -message SessionColumnBatch { - repeated SessionColumn columns = 1; // one per column of SessionColumns - uint32 rows = 2; -} - -message SessionExecResult { - int64 rows_affected = 1; - int64 last_insert_id = 2; - int64 tip = 3; // durable commit sequence after this exec -} - -message SessionDone { - int64 tip = 1; // snapshot the query ran at - uint64 total_rows = 2; -} - -message SessionStoreError { - string code = 1; // stable machine-readable code - string message = 2; -} From 218e366bcfcc8a1a707b0d9ea0121afd7b7905ef Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 20:16:49 +0000 Subject: [PATCH 12/24] generated protobuf --- livekit/agentdb/livekit_agentdb.pb.go | 2 +- livekit/agentdb/livekit_agentdb_data.pb.go | 2 +- livekit/livekit_agent_simulation.twirp.go | 4 ++-- livekit/livekit_cloud_agent.twirp.go | 4 ++-- livekit/livekit_connector.twirp.go | 4 ++-- livekit/livekit_egress.twirp.go | 4 ++-- livekit/livekit_ingress.twirp.go | 4 ++-- livekit/livekit_phone_number.twirp.go | 4 ++-- livekit/livekit_room.twirp.go | 4 ++-- livekit/livekit_sip.twirp.go | 4 ++-- rpc/agent.psrpc.go | 2 +- rpc/agent_dispatch.psrpc.go | 2 +- rpc/egress.psrpc.go | 2 +- rpc/ingress.psrpc.go | 2 +- rpc/io.psrpc.go | 2 +- rpc/keepalive.psrpc.go | 2 +- rpc/participant.psrpc.go | 2 +- rpc/room.psrpc.go | 2 +- rpc/roommanager.psrpc.go | 2 +- rpc/signal.psrpc.go | 2 +- rpc/sip.psrpc.go | 2 +- rpc/whip_signal.psrpc.go | 2 +- 22 files changed, 30 insertions(+), 30 deletions(-) diff --git a/livekit/agentdb/livekit_agentdb.pb.go b/livekit/agentdb/livekit_agentdb.pb.go index 2a374ed81..849bd0232 100644 --- a/livekit/agentdb/livekit_agentdb.pb.go +++ b/livekit/agentdb/livekit_agentdb.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v7.35.1 // source: agentdb/livekit_agentdb.proto package agentdb diff --git a/livekit/agentdb/livekit_agentdb_data.pb.go b/livekit/agentdb/livekit_agentdb_data.pb.go index 9e63550f9..47cef38a8 100644 --- a/livekit/agentdb/livekit_agentdb_data.pb.go +++ b/livekit/agentdb/livekit_agentdb_data.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v7.35.1 // source: agentdb/livekit_agentdb_data.proto package agentdb diff --git a/livekit/livekit_agent_simulation.twirp.go b/livekit/livekit_agent_simulation.twirp.go index 79ee02cf0..b2d752787 100644 --- a/livekit/livekit_agent_simulation.twirp.go +++ b/livekit/livekit_agent_simulation.twirp.go @@ -1897,7 +1897,7 @@ func (s *agentSimulationServer) serveCreateScenarioFromSessionProtobuf(ctx conte } func (s *agentSimulationServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor10, 0 + return twirpFileDescriptor9, 0 } func (s *agentSimulationServer) ProtocGenTwirpVersion() string { @@ -1911,7 +1911,7 @@ func (s *agentSimulationServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "AgentSimulation") } -var twirpFileDescriptor10 = []byte{ +var twirpFileDescriptor9 = []byte{ // 3365 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0x49, 0x76, 0x37, 0x3f, 0x45, 0x3e, 0x8a, 0x1f, 0x2a, 0xc9, 0x32, 0xdd, 0xb3, 0x9e, 0x91, 0x3d, 0x33, diff --git a/livekit/livekit_cloud_agent.twirp.go b/livekit/livekit_cloud_agent.twirp.go index 689ae25bc..27ce9a912 100644 --- a/livekit/livekit_cloud_agent.twirp.go +++ b/livekit/livekit_cloud_agent.twirp.go @@ -5245,7 +5245,7 @@ func (s *cloudAgentServer) serveGetPrivateLinkStatusProtobuf(ctx context.Context } func (s *cloudAgentServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor7, 0 + return twirpFileDescriptor6, 0 } func (s *cloudAgentServer) ProtocGenTwirpVersion() string { @@ -5259,7 +5259,7 @@ func (s *cloudAgentServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "CloudAgent") } -var twirpFileDescriptor7 = []byte{ +var twirpFileDescriptor6 = []byte{ // 2600 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x6f, 0x1b, 0x4b, 0xf9, 0xcf, 0xfa, 0x2d, 0xf6, 0xe3, 0xb8, 0x71, 0x26, 0x69, 0xea, 0x38, 0x49, 0x9b, 0x6c, 0xdb, diff --git a/livekit/livekit_connector.twirp.go b/livekit/livekit_connector.twirp.go index 472bc090a..d88f01c00 100644 --- a/livekit/livekit_connector.twirp.go +++ b/livekit/livekit_connector.twirp.go @@ -1618,7 +1618,7 @@ func (s *connectorServer) serveConnectTwilioCallProtobuf(ctx context.Context, re } func (s *connectorServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor9, 0 + return twirpFileDescriptor8, 0 } func (s *connectorServer) ProtocGenTwirpVersion() string { @@ -1632,7 +1632,7 @@ func (s *connectorServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "Connector") } -var twirpFileDescriptor9 = []byte{ +var twirpFileDescriptor8 = []byte{ // 313 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x4b, 0xf3, 0x30, 0x1c, 0xc6, 0xdf, 0xb7, 0xc2, 0xd4, 0xbf, 0x4e, 0x6b, 0x04, 0x85, 0x1e, 0x64, 0x5b, 0x45, 0xc1, diff --git a/livekit/livekit_egress.twirp.go b/livekit/livekit_egress.twirp.go index 86cf46b7c..df5542a5a 100644 --- a/livekit/livekit_egress.twirp.go +++ b/livekit/livekit_egress.twirp.go @@ -3019,7 +3019,7 @@ func (s *egressServer) serveStartTrackEgressProtobuf(ctx context.Context, resp h } func (s *egressServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor3, 0 + return twirpFileDescriptor2, 0 } func (s *egressServer) ProtocGenTwirpVersion() string { @@ -3033,7 +3033,7 @@ func (s *egressServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "Egress") } -var twirpFileDescriptor3 = []byte{ +var twirpFileDescriptor2 = []byte{ // 4257 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3b, 0x4b, 0x70, 0x1c, 0x59, 0x52, 0xaa, 0xea, 0x7f, 0xf6, 0xaf, 0xf4, 0x24, 0x6b, 0xda, 0xf2, 0x7a, 0xec, 0x6d, 0xef, 0x8c, diff --git a/livekit/livekit_ingress.twirp.go b/livekit/livekit_ingress.twirp.go index acb4d95a2..fa7244522 100644 --- a/livekit/livekit_ingress.twirp.go +++ b/livekit/livekit_ingress.twirp.go @@ -1341,7 +1341,7 @@ func (s *ingressServer) serveDeleteIngressProtobuf(ctx context.Context, resp htt } func (s *ingressServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor4, 0 + return twirpFileDescriptor3, 0 } func (s *ingressServer) ProtocGenTwirpVersion() string { @@ -1355,7 +1355,7 @@ func (s *ingressServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "Ingress") } -var twirpFileDescriptor4 = []byte{ +var twirpFileDescriptor3 = []byte{ // 1620 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x6f, 0xdb, 0xcc, 0x11, 0x36, 0xf5, 0xad, 0x91, 0x25, 0x2b, 0x6b, 0xf9, 0x7d, 0x15, 0x7f, 0xb4, 0x82, 0x92, 0x22, diff --git a/livekit/livekit_phone_number.twirp.go b/livekit/livekit_phone_number.twirp.go index 9b78d0f35..21c6c897f 100644 --- a/livekit/livekit_phone_number.twirp.go +++ b/livekit/livekit_phone_number.twirp.go @@ -1904,7 +1904,7 @@ func (s *phoneNumberServiceServer) serveReleasePhoneNumbersProtobuf(ctx context. } func (s *phoneNumberServiceServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor8, 0 + return twirpFileDescriptor7, 0 } func (s *phoneNumberServiceServer) ProtocGenTwirpVersion() string { @@ -1918,7 +1918,7 @@ func (s *phoneNumberServiceServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "PhoneNumberService") } -var twirpFileDescriptor8 = []byte{ +var twirpFileDescriptor7 = []byte{ // 1241 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0x51, 0x6e, 0xdb, 0x46, 0x13, 0xd6, 0x52, 0xb6, 0x63, 0x8d, 0x64, 0x5b, 0xd9, 0x38, 0x09, 0x4d, 0x27, 0xb1, 0x42, 0xff, diff --git a/livekit/livekit_room.twirp.go b/livekit/livekit_room.twirp.go index 122269f8a..eae205ebf 100644 --- a/livekit/livekit_room.twirp.go +++ b/livekit/livekit_room.twirp.go @@ -4152,7 +4152,7 @@ func (s *roomServiceServer) servePerformRpcProtobuf(ctx context.Context, resp ht } func (s *roomServiceServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor5, 0 + return twirpFileDescriptor4, 0 } func (s *roomServiceServer) ProtocGenTwirpVersion() string { @@ -4166,7 +4166,7 @@ func (s *roomServiceServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "RoomService") } -var twirpFileDescriptor5 = []byte{ +var twirpFileDescriptor4 = []byte{ // 1612 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x5b, 0x6f, 0x13, 0xd7, 0x16, 0x3e, 0x4e, 0x6c, 0xc7, 0x5e, 0xce, 0xcd, 0x3b, 0x01, 0x26, 0x13, 0x2e, 0x66, 0xc2, 0x39, diff --git a/livekit/livekit_sip.twirp.go b/livekit/livekit_sip.twirp.go index 3150829ac..3677e1398 100644 --- a/livekit/livekit_sip.twirp.go +++ b/livekit/livekit_sip.twirp.go @@ -4689,7 +4689,7 @@ func (s *sIPServer) serveTransferSIPParticipantProtobuf(ctx context.Context, res } func (s *sIPServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor6, 0 + return twirpFileDescriptor5, 0 } func (s *sIPServer) ProtocGenTwirpVersion() string { @@ -4703,7 +4703,7 @@ func (s *sIPServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "SIP") } -var twirpFileDescriptor6 = []byte{ +var twirpFileDescriptor5 = []byte{ // 5797 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x7c, 0x69, 0x8c, 0x1b, 0xc9, 0x75, 0xb0, 0xc8, 0xe6, 0xcc, 0x70, 0x1e, 0xe7, 0xe8, 0xa9, 0x19, 0x8d, 0xa8, 0xd1, 0x35, 0x4b, diff --git a/rpc/agent.psrpc.go b/rpc/agent.psrpc.go index 434d66530..40f7489e5 100644 --- a/rpc/agent.psrpc.go +++ b/rpc/agent.psrpc.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-psrpc v0.7.2, DO NOT EDIT. +// Code generated by protoc-gen-psrpc v0.7.3, DO NOT EDIT. // source: rpc/agent.proto package rpc diff --git a/rpc/agent_dispatch.psrpc.go b/rpc/agent_dispatch.psrpc.go index 29d546646..2715d016a 100644 --- a/rpc/agent_dispatch.psrpc.go +++ b/rpc/agent_dispatch.psrpc.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-psrpc v0.7.2, DO NOT EDIT. +// Code generated by protoc-gen-psrpc v0.7.3, DO NOT EDIT. // source: rpc/agent_dispatch.proto package rpc diff --git a/rpc/egress.psrpc.go b/rpc/egress.psrpc.go index 2cd187b02..f41b6491d 100644 --- a/rpc/egress.psrpc.go +++ b/rpc/egress.psrpc.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-psrpc v0.7.2, DO NOT EDIT. +// Code generated by protoc-gen-psrpc v0.7.3, DO NOT EDIT. // source: rpc/egress.proto package rpc diff --git a/rpc/ingress.psrpc.go b/rpc/ingress.psrpc.go index 25faf9c1d..3c433b129 100644 --- a/rpc/ingress.psrpc.go +++ b/rpc/ingress.psrpc.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-psrpc v0.7.2, DO NOT EDIT. +// Code generated by protoc-gen-psrpc v0.7.3, DO NOT EDIT. // source: rpc/ingress.proto package rpc diff --git a/rpc/io.psrpc.go b/rpc/io.psrpc.go index 6f225e1b5..6a00fcc92 100644 --- a/rpc/io.psrpc.go +++ b/rpc/io.psrpc.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-psrpc v0.7.2, DO NOT EDIT. +// Code generated by protoc-gen-psrpc v0.7.3, DO NOT EDIT. // source: rpc/io.proto package rpc diff --git a/rpc/keepalive.psrpc.go b/rpc/keepalive.psrpc.go index 4735f8d58..107bb8fa8 100644 --- a/rpc/keepalive.psrpc.go +++ b/rpc/keepalive.psrpc.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-psrpc v0.7.2, DO NOT EDIT. +// Code generated by protoc-gen-psrpc v0.7.3, DO NOT EDIT. // source: rpc/keepalive.proto package rpc diff --git a/rpc/participant.psrpc.go b/rpc/participant.psrpc.go index 5a3fd5e7a..b8d1293d2 100644 --- a/rpc/participant.psrpc.go +++ b/rpc/participant.psrpc.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-psrpc v0.7.2, DO NOT EDIT. +// Code generated by protoc-gen-psrpc v0.7.3, DO NOT EDIT. // source: rpc/participant.proto package rpc diff --git a/rpc/room.psrpc.go b/rpc/room.psrpc.go index 0b1a8b622..83818a5e4 100644 --- a/rpc/room.psrpc.go +++ b/rpc/room.psrpc.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-psrpc v0.7.2, DO NOT EDIT. +// Code generated by protoc-gen-psrpc v0.7.3, DO NOT EDIT. // source: rpc/room.proto package rpc diff --git a/rpc/roommanager.psrpc.go b/rpc/roommanager.psrpc.go index 9dbc22974..5df0da239 100644 --- a/rpc/roommanager.psrpc.go +++ b/rpc/roommanager.psrpc.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-psrpc v0.7.2, DO NOT EDIT. +// Code generated by protoc-gen-psrpc v0.7.3, DO NOT EDIT. // source: rpc/roommanager.proto package rpc diff --git a/rpc/signal.psrpc.go b/rpc/signal.psrpc.go index acd68bb05..5ac766af3 100644 --- a/rpc/signal.psrpc.go +++ b/rpc/signal.psrpc.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-psrpc v0.7.2, DO NOT EDIT. +// Code generated by protoc-gen-psrpc v0.7.3, DO NOT EDIT. // source: rpc/signal.proto package rpc diff --git a/rpc/sip.psrpc.go b/rpc/sip.psrpc.go index b1012975c..26979c257 100644 --- a/rpc/sip.psrpc.go +++ b/rpc/sip.psrpc.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-psrpc v0.7.2, DO NOT EDIT. +// Code generated by protoc-gen-psrpc v0.7.3, DO NOT EDIT. // source: rpc/sip.proto package rpc diff --git a/rpc/whip_signal.psrpc.go b/rpc/whip_signal.psrpc.go index 29707b064..0f4f4ddf7 100644 --- a/rpc/whip_signal.psrpc.go +++ b/rpc/whip_signal.psrpc.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-psrpc v0.7.2, DO NOT EDIT. +// Code generated by protoc-gen-psrpc v0.7.3, DO NOT EDIT. // source: rpc/whip_signal.proto package rpc From 425485e8aea6c86701b84be18b0d0821ea3e77d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Tue, 4 Aug 2026 23:09:18 -0700 Subject: [PATCH 13/24] agentdb: nest the messages instead of a separate package Reverts the livekit.agentdb namespace. The review asked for encapsulation or prefixes, and a package of our own was a heavier answer than the feedback called for. Nesting gives the same encapsulation without either cost: every message lives inside a container message AgentDB, so Value, Ping, Statement and ClientMessage need no prefix and still cannot collide with anything else in the livekit package. DataStream in livekit_models.proto already does this, so it is house style rather than a new idea. Generated Go names are AgentDB_Value, AgentDB_ClientMessage and so on. Two consequences worth knowing. A service and a message cannot share a name in one proto package, so the service is AgentDBService, matching RoomService and AgentDispatchService. And a message cannot span files, so the management and wire protos merge into livekit_agentdb.proto. The eight twirp files touched are two lines each: adding a proto to the shared twirp batch renumbers twirpFileDescriptorN across the batch, so they have to be regenerated together. --- livekit/agentdb/livekit_agentdb.pb.go | 768 ------ livekit/agentdb/livekit_agentdb.twirp.go | 2250 ---------------- livekit/agentdb/livekit_agentdb_data.pb.go | 1741 ------------- livekit/livekit_agent_simulation.twirp.go | 4 +- livekit/livekit_agentdb.pb.go | 2462 ++++++++++++++++++ livekit/livekit_agentdb.twirp.go | 1742 +++++++++++++ livekit/livekit_cloud_agent.twirp.go | 4 +- livekit/livekit_connector.twirp.go | 4 +- livekit/livekit_egress.twirp.go | 4 +- livekit/livekit_ingress.twirp.go | 4 +- livekit/livekit_phone_number.twirp.go | 4 +- livekit/livekit_room.twirp.go | 4 +- livekit/livekit_sip.twirp.go | 4 +- magefile.go | 23 +- protobufs/agentdb/livekit_agentdb.proto | 96 - protobufs/agentdb/livekit_agentdb_data.proto | 164 -- protobufs/livekit_agentdb.proto | 244 ++ 17 files changed, 4465 insertions(+), 5057 deletions(-) delete mode 100644 livekit/agentdb/livekit_agentdb.pb.go delete mode 100644 livekit/agentdb/livekit_agentdb.twirp.go delete mode 100644 livekit/agentdb/livekit_agentdb_data.pb.go create mode 100644 livekit/livekit_agentdb.pb.go create mode 100644 livekit/livekit_agentdb.twirp.go delete mode 100644 protobufs/agentdb/livekit_agentdb.proto delete mode 100644 protobufs/agentdb/livekit_agentdb_data.proto create mode 100644 protobufs/livekit_agentdb.proto diff --git a/livekit/agentdb/livekit_agentdb.pb.go b/livekit/agentdb/livekit_agentdb.pb.go deleted file mode 100644 index 849bd0232..000000000 --- a/livekit/agentdb/livekit_agentdb.pb.go +++ /dev/null @@ -1,768 +0,0 @@ -// Copyright 2026 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.35.1 -// source: agentdb/livekit_agentdb.proto - -package agentdb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CreateDatabaseRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` - UserAttributes string `protobuf:"bytes,2,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` // opaque JSON metadata for the caller - TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` // unset: never expires. Otherwise clamped to the server cap, and never extended - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateDatabaseRequest) Reset() { - *x = CreateDatabaseRequest{} - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateDatabaseRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateDatabaseRequest) ProtoMessage() {} - -func (x *CreateDatabaseRequest) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateDatabaseRequest.ProtoReflect.Descriptor instead. -func (*CreateDatabaseRequest) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateDatabaseRequest) GetRegion() string { - if x != nil { - return x.Region - } - return "" -} - -func (x *CreateDatabaseRequest) GetUserAttributes() string { - if x != nil { - return x.UserAttributes - } - return "" -} - -func (x *CreateDatabaseRequest) GetTtlSeconds() int64 { - if x != nil { - return x.TtlSeconds - } - return 0 -} - -type CreateDatabaseResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` // "DB_..." - ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateDatabaseResponse) Reset() { - *x = CreateDatabaseResponse{} - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateDatabaseResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateDatabaseResponse) ProtoMessage() {} - -func (x *CreateDatabaseResponse) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateDatabaseResponse.ProtoReflect.Descriptor instead. -func (*CreateDatabaseResponse) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateDatabaseResponse) GetDatabaseId() string { - if x != nil { - return x.DatabaseId - } - return "" -} - -func (x *CreateDatabaseResponse) GetExpiresAtUnix() int64 { - if x != nil { - return x.ExpiresAtUnix - } - return 0 -} - -type GetDatabaseRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetDatabaseRequest) Reset() { - *x = GetDatabaseRequest{} - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetDatabaseRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDatabaseRequest) ProtoMessage() {} - -func (x *GetDatabaseRequest) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDatabaseRequest.ProtoReflect.Descriptor instead. -func (*GetDatabaseRequest) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{2} -} - -func (x *GetDatabaseRequest) GetDatabaseId() string { - if x != nil { - return x.DatabaseId - } - return "" -} - -type GetDatabaseResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` - Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` - UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` - CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` - ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires - Tip int64 `protobuf:"varint,6,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetDatabaseResponse) Reset() { - *x = GetDatabaseResponse{} - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetDatabaseResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDatabaseResponse) ProtoMessage() {} - -func (x *GetDatabaseResponse) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDatabaseResponse.ProtoReflect.Descriptor instead. -func (*GetDatabaseResponse) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{3} -} - -func (x *GetDatabaseResponse) GetDatabaseId() string { - if x != nil { - return x.DatabaseId - } - return "" -} - -func (x *GetDatabaseResponse) GetRegion() string { - if x != nil { - return x.Region - } - return "" -} - -func (x *GetDatabaseResponse) GetUserAttributes() string { - if x != nil { - return x.UserAttributes - } - return "" -} - -func (x *GetDatabaseResponse) GetCreatedAtUnix() int64 { - if x != nil { - return x.CreatedAtUnix - } - return 0 -} - -func (x *GetDatabaseResponse) GetExpiresAtUnix() int64 { - if x != nil { - return x.ExpiresAtUnix - } - return 0 -} - -func (x *GetDatabaseResponse) GetTip() int64 { - if x != nil { - return x.Tip - } - return 0 -} - -type ListDatabasesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // server-clamped - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // opaque cursor from a previous response - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListDatabasesRequest) Reset() { - *x = ListDatabasesRequest{} - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListDatabasesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDatabasesRequest) ProtoMessage() {} - -func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDatabasesRequest.ProtoReflect.Descriptor instead. -func (*ListDatabasesRequest) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{4} -} - -func (x *ListDatabasesRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListDatabasesRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -type ListDatabasesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Databases []*DatabaseSummary `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"` - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // empty when exhausted - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListDatabasesResponse) Reset() { - *x = ListDatabasesResponse{} - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListDatabasesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDatabasesResponse) ProtoMessage() {} - -func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListDatabasesResponse.ProtoReflect.Descriptor instead. -func (*ListDatabasesResponse) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{5} -} - -func (x *ListDatabasesResponse) GetDatabases() []*DatabaseSummary { - if x != nil { - return x.Databases - } - return nil -} - -func (x *ListDatabasesResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// DatabaseSummary is a database's immutable fields. No tip: it changes on every -// commit, so call GetDatabase for it. -type DatabaseSummary struct { - state protoimpl.MessageState `protogen:"open.v1"` - DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` - Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` - UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` - CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` - ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DatabaseSummary) Reset() { - *x = DatabaseSummary{} - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DatabaseSummary) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DatabaseSummary) ProtoMessage() {} - -func (x *DatabaseSummary) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DatabaseSummary.ProtoReflect.Descriptor instead. -func (*DatabaseSummary) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{6} -} - -func (x *DatabaseSummary) GetDatabaseId() string { - if x != nil { - return x.DatabaseId - } - return "" -} - -func (x *DatabaseSummary) GetRegion() string { - if x != nil { - return x.Region - } - return "" -} - -func (x *DatabaseSummary) GetUserAttributes() string { - if x != nil { - return x.UserAttributes - } - return "" -} - -func (x *DatabaseSummary) GetCreatedAtUnix() int64 { - if x != nil { - return x.CreatedAtUnix - } - return 0 -} - -func (x *DatabaseSummary) GetExpiresAtUnix() int64 { - if x != nil { - return x.ExpiresAtUnix - } - return 0 -} - -type DeleteDatabaseRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteDatabaseRequest) Reset() { - *x = DeleteDatabaseRequest{} - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteDatabaseRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteDatabaseRequest) ProtoMessage() {} - -func (x *DeleteDatabaseRequest) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteDatabaseRequest.ProtoReflect.Descriptor instead. -func (*DeleteDatabaseRequest) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{7} -} - -func (x *DeleteDatabaseRequest) GetDatabaseId() string { - if x != nil { - return x.DatabaseId - } - return "" -} - -type DeleteDatabaseResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteDatabaseResponse) Reset() { - *x = DeleteDatabaseResponse{} - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteDatabaseResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteDatabaseResponse) ProtoMessage() {} - -func (x *DeleteDatabaseResponse) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteDatabaseResponse.ProtoReflect.Descriptor instead. -func (*DeleteDatabaseResponse) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{8} -} - -type DumpDatabaseRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DumpDatabaseRequest) Reset() { - *x = DumpDatabaseRequest{} - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DumpDatabaseRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DumpDatabaseRequest) ProtoMessage() {} - -func (x *DumpDatabaseRequest) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DumpDatabaseRequest.ProtoReflect.Descriptor instead. -func (*DumpDatabaseRequest) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{9} -} - -func (x *DumpDatabaseRequest) GetDatabaseId() string { - if x != nil { - return x.DatabaseId - } - return "" -} - -type DumpDatabaseResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - DownloadUrl string `protobuf:"bytes,1,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"` // pre-authenticated object-storage URL - ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // URL expiry - Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // commit sequence the dump is consistent at - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DumpDatabaseResponse) Reset() { - *x = DumpDatabaseResponse{} - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DumpDatabaseResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DumpDatabaseResponse) ProtoMessage() {} - -func (x *DumpDatabaseResponse) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DumpDatabaseResponse.ProtoReflect.Descriptor instead. -func (*DumpDatabaseResponse) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_proto_rawDescGZIP(), []int{10} -} - -func (x *DumpDatabaseResponse) GetDownloadUrl() string { - if x != nil { - return x.DownloadUrl - } - return "" -} - -func (x *DumpDatabaseResponse) GetExpiresAtUnix() int64 { - if x != nil { - return x.ExpiresAtUnix - } - return 0 -} - -func (x *DumpDatabaseResponse) GetTip() int64 { - if x != nil { - return x.Tip - } - return 0 -} - -var File_agentdb_livekit_agentdb_proto protoreflect.FileDescriptor - -const file_agentdb_livekit_agentdb_proto_rawDesc = "" + - "\n" + - "\x1dagentdb/livekit_agentdb.proto\x12\x0flivekit.agentdb\"y\n" + - "\x15CreateDatabaseRequest\x12\x16\n" + - "\x06region\x18\x01 \x01(\tR\x06region\x12'\n" + - "\x0fuser_attributes\x18\x02 \x01(\tR\x0euserAttributes\x12\x1f\n" + - "\vttl_seconds\x18\x03 \x01(\x03R\n" + - "ttlSeconds\"a\n" + - "\x16CreateDatabaseResponse\x12\x1f\n" + - "\vdatabase_id\x18\x01 \x01(\tR\n" + - "databaseId\x12&\n" + - "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\"5\n" + - "\x12GetDatabaseRequest\x12\x1f\n" + - "\vdatabase_id\x18\x01 \x01(\tR\n" + - "databaseId\"\xd9\x01\n" + - "\x13GetDatabaseResponse\x12\x1f\n" + - "\vdatabase_id\x18\x01 \x01(\tR\n" + - "databaseId\x12\x16\n" + - "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + - "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12&\n" + - "\x0fcreated_at_unix\x18\x04 \x01(\x03R\rcreatedAtUnix\x12&\n" + - "\x0fexpires_at_unix\x18\x05 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + - "\x03tip\x18\x06 \x01(\x03R\x03tip\"R\n" + - "\x14ListDatabasesRequest\x12\x1b\n" + - "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + - "\n" + - "page_token\x18\x02 \x01(\tR\tpageToken\"\x7f\n" + - "\x15ListDatabasesResponse\x12>\n" + - "\tdatabases\x18\x01 \x03(\v2 .livekit.agentdb.DatabaseSummaryR\tdatabases\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xc3\x01\n" + - "\x0fDatabaseSummary\x12\x1f\n" + - "\vdatabase_id\x18\x01 \x01(\tR\n" + - "databaseId\x12\x16\n" + - "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + - "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12&\n" + - "\x0fcreated_at_unix\x18\x04 \x01(\x03R\rcreatedAtUnix\x12&\n" + - "\x0fexpires_at_unix\x18\x05 \x01(\x03R\rexpiresAtUnix\"8\n" + - "\x15DeleteDatabaseRequest\x12\x1f\n" + - "\vdatabase_id\x18\x01 \x01(\tR\n" + - "databaseId\"\x18\n" + - "\x16DeleteDatabaseResponse\"6\n" + - "\x13DumpDatabaseRequest\x12\x1f\n" + - "\vdatabase_id\x18\x01 \x01(\tR\n" + - "databaseId\"s\n" + - "\x14DumpDatabaseResponse\x12!\n" + - "\fdownload_url\x18\x01 \x01(\tR\vdownloadUrl\x12&\n" + - "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + - "\x03tip\x18\x03 \x01(\x03R\x03tip2\xde\x03\n" + - "\aAgentDB\x12a\n" + - "\x0eCreateDatabase\x12&.livekit.agentdb.CreateDatabaseRequest\x1a'.livekit.agentdb.CreateDatabaseResponse\x12X\n" + - "\vGetDatabase\x12#.livekit.agentdb.GetDatabaseRequest\x1a$.livekit.agentdb.GetDatabaseResponse\x12^\n" + - "\rListDatabases\x12%.livekit.agentdb.ListDatabasesRequest\x1a&.livekit.agentdb.ListDatabasesResponse\x12a\n" + - "\x0eDeleteDatabase\x12&.livekit.agentdb.DeleteDatabaseRequest\x1a'.livekit.agentdb.DeleteDatabaseResponse\x12S\n" + - "\x04Dump\x12$.livekit.agentdb.DumpDatabaseRequest\x1a%.livekit.agentdb.DumpDatabaseResponseBNZ+github.com/livekit/protocol/livekit/agentdb\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" - -var ( - file_agentdb_livekit_agentdb_proto_rawDescOnce sync.Once - file_agentdb_livekit_agentdb_proto_rawDescData []byte -) - -func file_agentdb_livekit_agentdb_proto_rawDescGZIP() []byte { - file_agentdb_livekit_agentdb_proto_rawDescOnce.Do(func() { - file_agentdb_livekit_agentdb_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_agentdb_livekit_agentdb_proto_rawDesc), len(file_agentdb_livekit_agentdb_proto_rawDesc))) - }) - return file_agentdb_livekit_agentdb_proto_rawDescData -} - -var file_agentdb_livekit_agentdb_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_agentdb_livekit_agentdb_proto_goTypes = []any{ - (*CreateDatabaseRequest)(nil), // 0: livekit.agentdb.CreateDatabaseRequest - (*CreateDatabaseResponse)(nil), // 1: livekit.agentdb.CreateDatabaseResponse - (*GetDatabaseRequest)(nil), // 2: livekit.agentdb.GetDatabaseRequest - (*GetDatabaseResponse)(nil), // 3: livekit.agentdb.GetDatabaseResponse - (*ListDatabasesRequest)(nil), // 4: livekit.agentdb.ListDatabasesRequest - (*ListDatabasesResponse)(nil), // 5: livekit.agentdb.ListDatabasesResponse - (*DatabaseSummary)(nil), // 6: livekit.agentdb.DatabaseSummary - (*DeleteDatabaseRequest)(nil), // 7: livekit.agentdb.DeleteDatabaseRequest - (*DeleteDatabaseResponse)(nil), // 8: livekit.agentdb.DeleteDatabaseResponse - (*DumpDatabaseRequest)(nil), // 9: livekit.agentdb.DumpDatabaseRequest - (*DumpDatabaseResponse)(nil), // 10: livekit.agentdb.DumpDatabaseResponse -} -var file_agentdb_livekit_agentdb_proto_depIdxs = []int32{ - 6, // 0: livekit.agentdb.ListDatabasesResponse.databases:type_name -> livekit.agentdb.DatabaseSummary - 0, // 1: livekit.agentdb.AgentDB.CreateDatabase:input_type -> livekit.agentdb.CreateDatabaseRequest - 2, // 2: livekit.agentdb.AgentDB.GetDatabase:input_type -> livekit.agentdb.GetDatabaseRequest - 4, // 3: livekit.agentdb.AgentDB.ListDatabases:input_type -> livekit.agentdb.ListDatabasesRequest - 7, // 4: livekit.agentdb.AgentDB.DeleteDatabase:input_type -> livekit.agentdb.DeleteDatabaseRequest - 9, // 5: livekit.agentdb.AgentDB.Dump:input_type -> livekit.agentdb.DumpDatabaseRequest - 1, // 6: livekit.agentdb.AgentDB.CreateDatabase:output_type -> livekit.agentdb.CreateDatabaseResponse - 3, // 7: livekit.agentdb.AgentDB.GetDatabase:output_type -> livekit.agentdb.GetDatabaseResponse - 5, // 8: livekit.agentdb.AgentDB.ListDatabases:output_type -> livekit.agentdb.ListDatabasesResponse - 8, // 9: livekit.agentdb.AgentDB.DeleteDatabase:output_type -> livekit.agentdb.DeleteDatabaseResponse - 10, // 10: livekit.agentdb.AgentDB.Dump:output_type -> livekit.agentdb.DumpDatabaseResponse - 6, // [6:11] is the sub-list for method output_type - 1, // [1:6] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_agentdb_livekit_agentdb_proto_init() } -func file_agentdb_livekit_agentdb_proto_init() { - if File_agentdb_livekit_agentdb_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_agentdb_livekit_agentdb_proto_rawDesc), len(file_agentdb_livekit_agentdb_proto_rawDesc)), - NumEnums: 0, - NumMessages: 11, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_agentdb_livekit_agentdb_proto_goTypes, - DependencyIndexes: file_agentdb_livekit_agentdb_proto_depIdxs, - MessageInfos: file_agentdb_livekit_agentdb_proto_msgTypes, - }.Build() - File_agentdb_livekit_agentdb_proto = out.File - file_agentdb_livekit_agentdb_proto_goTypes = nil - file_agentdb_livekit_agentdb_proto_depIdxs = nil -} diff --git a/livekit/agentdb/livekit_agentdb.twirp.go b/livekit/agentdb/livekit_agentdb.twirp.go deleted file mode 100644 index f9059f163..000000000 --- a/livekit/agentdb/livekit_agentdb.twirp.go +++ /dev/null @@ -1,2250 +0,0 @@ -// Code generated by protoc-gen-twirp v8.1.3, DO NOT EDIT. -// source: agentdb/livekit_agentdb.proto - -package agentdb - -import context "context" -import fmt "fmt" -import http "net/http" -import io "io" -import json "encoding/json" -import strconv "strconv" -import strings "strings" - -import protojson "google.golang.org/protobuf/encoding/protojson" -import proto "google.golang.org/protobuf/proto" -import twirp "github.com/twitchtv/twirp" -import ctxsetters "github.com/twitchtv/twirp/ctxsetters" - -import bytes "bytes" -import errors "errors" -import path "path" -import url "net/url" - -// Version compatibility assertion. -// If the constant is not defined in the package, that likely means -// the package needs to be updated to work with this generated code. -// See https://twitchtv.github.io/twirp/docs/version_matrix.html -const _ = twirp.TwirpPackageMinVersion_8_1_0 - -// ================= -// AgentDB Interface -// ================= - -// AgentDB hands out SQLite databases: lifecycle and export. Querying goes -// through the data plane in livekit_agentdb_data.proto. The project comes from -// the access token, never from a request field. -type AgentDB interface { - CreateDatabase(context.Context, *CreateDatabaseRequest) (*CreateDatabaseResponse, error) - - GetDatabase(context.Context, *GetDatabaseRequest) (*GetDatabaseResponse, error) - - ListDatabases(context.Context, *ListDatabasesRequest) (*ListDatabasesResponse, error) - - // Deletes the stored data too, not just the metadata row. - DeleteDatabase(context.Context, *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) - - // Exports a consistent SQLite file, returning a time-limited download URL. - Dump(context.Context, *DumpDatabaseRequest) (*DumpDatabaseResponse, error) -} - -// ======================= -// AgentDB Protobuf Client -// ======================= - -type agentDBProtobufClient struct { - client HTTPClient - urls [5]string - interceptor twirp.Interceptor - opts twirp.ClientOptions -} - -// NewAgentDBProtobufClient creates a Protobuf client that implements the AgentDB interface. -// It communicates using Protobuf and can be configured with a custom HTTPClient. -func NewAgentDBProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) AgentDB { - if c, ok := client.(*http.Client); ok { - client = withoutRedirects(c) - } - - clientOpts := twirp.ClientOptions{} - for _, o := range opts { - o(&clientOpts) - } - - // Using ReadOpt allows backwards and forwards compatibility with new options in the future - literalURLs := false - _ = clientOpts.ReadOpt("literalURLs", &literalURLs) - var pathPrefix string - if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { - pathPrefix = "/twirp" // default prefix - } - - // Build method URLs: []/./ - serviceURL := sanitizeBaseURL(baseURL) - serviceURL += baseServicePath(pathPrefix, "livekit.agentdb", "AgentDB") - urls := [5]string{ - serviceURL + "CreateDatabase", - serviceURL + "GetDatabase", - serviceURL + "ListDatabases", - serviceURL + "DeleteDatabase", - serviceURL + "Dump", - } - - return &agentDBProtobufClient{ - client: client, - urls: urls, - interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...), - opts: clientOpts, - } -} - -func (c *agentDBProtobufClient) CreateDatabase(ctx context.Context, in *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") - ctx = ctxsetters.WithServiceName(ctx, "AgentDB") - ctx = ctxsetters.WithMethodName(ctx, "CreateDatabase") - caller := c.callCreateDatabase - if c.interceptor != nil { - caller = func(ctx context.Context, req *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*CreateDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*CreateDatabaseRequest) when calling interceptor") - } - return c.callCreateDatabase(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*CreateDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*CreateDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentDBProtobufClient) callCreateDatabase(ctx context.Context, in *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { - out := new(CreateDatabaseResponse) - ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentDBProtobufClient) GetDatabase(ctx context.Context, in *GetDatabaseRequest) (*GetDatabaseResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") - ctx = ctxsetters.WithServiceName(ctx, "AgentDB") - ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") - caller := c.callGetDatabase - if c.interceptor != nil { - caller = func(ctx context.Context, req *GetDatabaseRequest) (*GetDatabaseResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*GetDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*GetDatabaseRequest) when calling interceptor") - } - return c.callGetDatabase(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*GetDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*GetDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentDBProtobufClient) callGetDatabase(ctx context.Context, in *GetDatabaseRequest) (*GetDatabaseResponse, error) { - out := new(GetDatabaseResponse) - ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentDBProtobufClient) ListDatabases(ctx context.Context, in *ListDatabasesRequest) (*ListDatabasesResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") - ctx = ctxsetters.WithServiceName(ctx, "AgentDB") - ctx = ctxsetters.WithMethodName(ctx, "ListDatabases") - caller := c.callListDatabases - if c.interceptor != nil { - caller = func(ctx context.Context, req *ListDatabasesRequest) (*ListDatabasesResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListDatabasesRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListDatabasesRequest) when calling interceptor") - } - return c.callListDatabases(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*ListDatabasesResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListDatabasesResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentDBProtobufClient) callListDatabases(ctx context.Context, in *ListDatabasesRequest) (*ListDatabasesResponse, error) { - out := new(ListDatabasesResponse) - ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentDBProtobufClient) DeleteDatabase(ctx context.Context, in *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") - ctx = ctxsetters.WithServiceName(ctx, "AgentDB") - ctx = ctxsetters.WithMethodName(ctx, "DeleteDatabase") - caller := c.callDeleteDatabase - if c.interceptor != nil { - caller = func(ctx context.Context, req *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DeleteDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DeleteDatabaseRequest) when calling interceptor") - } - return c.callDeleteDatabase(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DeleteDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DeleteDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentDBProtobufClient) callDeleteDatabase(ctx context.Context, in *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { - out := new(DeleteDatabaseResponse) - ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentDBProtobufClient) Dump(ctx context.Context, in *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") - ctx = ctxsetters.WithServiceName(ctx, "AgentDB") - ctx = ctxsetters.WithMethodName(ctx, "Dump") - caller := c.callDump - if c.interceptor != nil { - caller = func(ctx context.Context, req *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DumpDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DumpDatabaseRequest) when calling interceptor") - } - return c.callDump(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DumpDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DumpDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentDBProtobufClient) callDump(ctx context.Context, in *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { - out := new(DumpDatabaseResponse) - ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -// =================== -// AgentDB JSON Client -// =================== - -type agentDBJSONClient struct { - client HTTPClient - urls [5]string - interceptor twirp.Interceptor - opts twirp.ClientOptions -} - -// NewAgentDBJSONClient creates a JSON client that implements the AgentDB interface. -// It communicates using JSON and can be configured with a custom HTTPClient. -func NewAgentDBJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) AgentDB { - if c, ok := client.(*http.Client); ok { - client = withoutRedirects(c) - } - - clientOpts := twirp.ClientOptions{} - for _, o := range opts { - o(&clientOpts) - } - - // Using ReadOpt allows backwards and forwards compatibility with new options in the future - literalURLs := false - _ = clientOpts.ReadOpt("literalURLs", &literalURLs) - var pathPrefix string - if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { - pathPrefix = "/twirp" // default prefix - } - - // Build method URLs: []/./ - serviceURL := sanitizeBaseURL(baseURL) - serviceURL += baseServicePath(pathPrefix, "livekit.agentdb", "AgentDB") - urls := [5]string{ - serviceURL + "CreateDatabase", - serviceURL + "GetDatabase", - serviceURL + "ListDatabases", - serviceURL + "DeleteDatabase", - serviceURL + "Dump", - } - - return &agentDBJSONClient{ - client: client, - urls: urls, - interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...), - opts: clientOpts, - } -} - -func (c *agentDBJSONClient) CreateDatabase(ctx context.Context, in *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") - ctx = ctxsetters.WithServiceName(ctx, "AgentDB") - ctx = ctxsetters.WithMethodName(ctx, "CreateDatabase") - caller := c.callCreateDatabase - if c.interceptor != nil { - caller = func(ctx context.Context, req *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*CreateDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*CreateDatabaseRequest) when calling interceptor") - } - return c.callCreateDatabase(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*CreateDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*CreateDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentDBJSONClient) callCreateDatabase(ctx context.Context, in *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { - out := new(CreateDatabaseResponse) - ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentDBJSONClient) GetDatabase(ctx context.Context, in *GetDatabaseRequest) (*GetDatabaseResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") - ctx = ctxsetters.WithServiceName(ctx, "AgentDB") - ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") - caller := c.callGetDatabase - if c.interceptor != nil { - caller = func(ctx context.Context, req *GetDatabaseRequest) (*GetDatabaseResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*GetDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*GetDatabaseRequest) when calling interceptor") - } - return c.callGetDatabase(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*GetDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*GetDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentDBJSONClient) callGetDatabase(ctx context.Context, in *GetDatabaseRequest) (*GetDatabaseResponse, error) { - out := new(GetDatabaseResponse) - ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentDBJSONClient) ListDatabases(ctx context.Context, in *ListDatabasesRequest) (*ListDatabasesResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") - ctx = ctxsetters.WithServiceName(ctx, "AgentDB") - ctx = ctxsetters.WithMethodName(ctx, "ListDatabases") - caller := c.callListDatabases - if c.interceptor != nil { - caller = func(ctx context.Context, req *ListDatabasesRequest) (*ListDatabasesResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListDatabasesRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListDatabasesRequest) when calling interceptor") - } - return c.callListDatabases(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*ListDatabasesResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListDatabasesResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentDBJSONClient) callListDatabases(ctx context.Context, in *ListDatabasesRequest) (*ListDatabasesResponse, error) { - out := new(ListDatabasesResponse) - ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentDBJSONClient) DeleteDatabase(ctx context.Context, in *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") - ctx = ctxsetters.WithServiceName(ctx, "AgentDB") - ctx = ctxsetters.WithMethodName(ctx, "DeleteDatabase") - caller := c.callDeleteDatabase - if c.interceptor != nil { - caller = func(ctx context.Context, req *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DeleteDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DeleteDatabaseRequest) when calling interceptor") - } - return c.callDeleteDatabase(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DeleteDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DeleteDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentDBJSONClient) callDeleteDatabase(ctx context.Context, in *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { - out := new(DeleteDatabaseResponse) - ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -func (c *agentDBJSONClient) Dump(ctx context.Context, in *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { - ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") - ctx = ctxsetters.WithServiceName(ctx, "AgentDB") - ctx = ctxsetters.WithMethodName(ctx, "Dump") - caller := c.callDump - if c.interceptor != nil { - caller = func(ctx context.Context, req *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { - resp, err := c.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DumpDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DumpDatabaseRequest) when calling interceptor") - } - return c.callDump(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DumpDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DumpDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - return caller(ctx, in) -} - -func (c *agentDBJSONClient) callDump(ctx context.Context, in *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { - out := new(DumpDatabaseResponse) - ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) - if err != nil { - twerr, ok := err.(twirp.Error) - if !ok { - twerr = twirp.InternalErrorWith(err) - } - callClientError(ctx, c.opts.Hooks, twerr) - return nil, err - } - - callClientResponseReceived(ctx, c.opts.Hooks) - - return out, nil -} - -// ====================== -// AgentDB Server Handler -// ====================== - -type agentDBServer struct { - AgentDB - interceptor twirp.Interceptor - hooks *twirp.ServerHooks - pathPrefix string // prefix for routing - jsonSkipDefaults bool // do not include unpopulated fields (default values) in the response - jsonCamelCase bool // JSON fields are serialized as lowerCamelCase rather than keeping the original proto names -} - -// NewAgentDBServer builds a TwirpServer that can be used as an http.Handler to handle -// HTTP requests that are routed to the right method in the provided svc implementation. -// The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks). -func NewAgentDBServer(svc AgentDB, opts ...interface{}) TwirpServer { - serverOpts := newServerOpts(opts) - - // Using ReadOpt allows backwards and forwards compatibility with new options in the future - jsonSkipDefaults := false - _ = serverOpts.ReadOpt("jsonSkipDefaults", &jsonSkipDefaults) - jsonCamelCase := false - _ = serverOpts.ReadOpt("jsonCamelCase", &jsonCamelCase) - var pathPrefix string - if ok := serverOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { - pathPrefix = "/twirp" // default prefix - } - - return &agentDBServer{ - AgentDB: svc, - hooks: serverOpts.Hooks, - interceptor: twirp.ChainInterceptors(serverOpts.Interceptors...), - pathPrefix: pathPrefix, - jsonSkipDefaults: jsonSkipDefaults, - jsonCamelCase: jsonCamelCase, - } -} - -// writeError writes an HTTP response with a valid Twirp error format, and triggers hooks. -// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err) -func (s *agentDBServer) writeError(ctx context.Context, resp http.ResponseWriter, err error) { - writeError(ctx, resp, err, s.hooks) -} - -// handleRequestBodyError is used to handle error when the twirp server cannot read request -func (s *agentDBServer) handleRequestBodyError(ctx context.Context, resp http.ResponseWriter, msg string, err error) { - if context.Canceled == ctx.Err() { - s.writeError(ctx, resp, twirp.NewError(twirp.Canceled, "failed to read request: context canceled")) - return - } - if context.DeadlineExceeded == ctx.Err() { - s.writeError(ctx, resp, twirp.NewError(twirp.DeadlineExceeded, "failed to read request: deadline exceeded")) - return - } - s.writeError(ctx, resp, twirp.WrapError(malformedRequestError(msg), err)) -} - -// AgentDBPathPrefix is a convenience constant that may identify URL paths. -// Should be used with caution, it only matches routes generated by Twirp Go clients, -// with the default "/twirp" prefix and default CamelCase service and method names. -// More info: https://twitchtv.github.io/twirp/docs/routing.html -const AgentDBPathPrefix = "/twirp/livekit.agentdb.AgentDB/" - -func (s *agentDBServer) ServeHTTP(resp http.ResponseWriter, req *http.Request) { - ctx := req.Context() - ctx = ctxsetters.WithPackageName(ctx, "livekit.agentdb") - ctx = ctxsetters.WithServiceName(ctx, "AgentDB") - ctx = ctxsetters.WithResponseWriter(ctx, resp) - - var err error - ctx, err = callRequestReceived(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - if req.Method != "POST" { - msg := fmt.Sprintf("unsupported method %q (only POST is allowed)", req.Method) - s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) - return - } - - // Verify path format: []/./ - prefix, pkgService, method := parseTwirpPath(req.URL.Path) - if pkgService != "livekit.agentdb.AgentDB" { - msg := fmt.Sprintf("no handler for path %q", req.URL.Path) - s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) - return - } - if prefix != s.pathPrefix { - msg := fmt.Sprintf("invalid path prefix %q, expected %q, on path %q", prefix, s.pathPrefix, req.URL.Path) - s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) - return - } - - switch method { - case "CreateDatabase": - s.serveCreateDatabase(ctx, resp, req) - return - case "GetDatabase": - s.serveGetDatabase(ctx, resp, req) - return - case "ListDatabases": - s.serveListDatabases(ctx, resp, req) - return - case "DeleteDatabase": - s.serveDeleteDatabase(ctx, resp, req) - return - case "Dump": - s.serveDump(ctx, resp, req) - return - default: - msg := fmt.Sprintf("no handler for path %q", req.URL.Path) - s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) - return - } -} - -func (s *agentDBServer) serveCreateDatabase(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - header := req.Header.Get("Content-Type") - i := strings.Index(header, ";") - if i == -1 { - i = len(header) - } - switch strings.TrimSpace(strings.ToLower(header[:i])) { - case "application/json": - s.serveCreateDatabaseJSON(ctx, resp, req) - case "application/protobuf": - s.serveCreateDatabaseProtobuf(ctx, resp, req) - default: - msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) - twerr := badRouteError(msg, req.Method, req.URL.Path) - s.writeError(ctx, resp, twerr) - } -} - -func (s *agentDBServer) serveCreateDatabaseJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "CreateDatabase") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - d := json.NewDecoder(req.Body) - rawReqBody := json.RawMessage{} - if err := d.Decode(&rawReqBody); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - reqContent := new(CreateDatabaseRequest) - unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} - if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - - handler := s.AgentDB.CreateDatabase - if s.interceptor != nil { - handler = func(ctx context.Context, req *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*CreateDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*CreateDatabaseRequest) when calling interceptor") - } - return s.AgentDB.CreateDatabase(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*CreateDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*CreateDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *CreateDatabaseResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *CreateDatabaseResponse and nil error while calling CreateDatabase. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} - respBytes, err := marshaler.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/json") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentDBServer) serveCreateDatabaseProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "CreateDatabase") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - buf, err := io.ReadAll(req.Body) - if err != nil { - s.handleRequestBodyError(ctx, resp, "failed to read request body", err) - return - } - reqContent := new(CreateDatabaseRequest) - if err = proto.Unmarshal(buf, reqContent); err != nil { - s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) - return - } - - handler := s.AgentDB.CreateDatabase - if s.interceptor != nil { - handler = func(ctx context.Context, req *CreateDatabaseRequest) (*CreateDatabaseResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*CreateDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*CreateDatabaseRequest) when calling interceptor") - } - return s.AgentDB.CreateDatabase(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*CreateDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*CreateDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *CreateDatabaseResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *CreateDatabaseResponse and nil error while calling CreateDatabase. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - respBytes, err := proto.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/protobuf") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentDBServer) serveGetDatabase(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - header := req.Header.Get("Content-Type") - i := strings.Index(header, ";") - if i == -1 { - i = len(header) - } - switch strings.TrimSpace(strings.ToLower(header[:i])) { - case "application/json": - s.serveGetDatabaseJSON(ctx, resp, req) - case "application/protobuf": - s.serveGetDatabaseProtobuf(ctx, resp, req) - default: - msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) - twerr := badRouteError(msg, req.Method, req.URL.Path) - s.writeError(ctx, resp, twerr) - } -} - -func (s *agentDBServer) serveGetDatabaseJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - d := json.NewDecoder(req.Body) - rawReqBody := json.RawMessage{} - if err := d.Decode(&rawReqBody); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - reqContent := new(GetDatabaseRequest) - unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} - if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - - handler := s.AgentDB.GetDatabase - if s.interceptor != nil { - handler = func(ctx context.Context, req *GetDatabaseRequest) (*GetDatabaseResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*GetDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*GetDatabaseRequest) when calling interceptor") - } - return s.AgentDB.GetDatabase(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*GetDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*GetDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *GetDatabaseResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *GetDatabaseResponse and nil error while calling GetDatabase. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} - respBytes, err := marshaler.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/json") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentDBServer) serveGetDatabaseProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - buf, err := io.ReadAll(req.Body) - if err != nil { - s.handleRequestBodyError(ctx, resp, "failed to read request body", err) - return - } - reqContent := new(GetDatabaseRequest) - if err = proto.Unmarshal(buf, reqContent); err != nil { - s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) - return - } - - handler := s.AgentDB.GetDatabase - if s.interceptor != nil { - handler = func(ctx context.Context, req *GetDatabaseRequest) (*GetDatabaseResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*GetDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*GetDatabaseRequest) when calling interceptor") - } - return s.AgentDB.GetDatabase(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*GetDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*GetDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *GetDatabaseResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *GetDatabaseResponse and nil error while calling GetDatabase. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - respBytes, err := proto.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/protobuf") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentDBServer) serveListDatabases(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - header := req.Header.Get("Content-Type") - i := strings.Index(header, ";") - if i == -1 { - i = len(header) - } - switch strings.TrimSpace(strings.ToLower(header[:i])) { - case "application/json": - s.serveListDatabasesJSON(ctx, resp, req) - case "application/protobuf": - s.serveListDatabasesProtobuf(ctx, resp, req) - default: - msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) - twerr := badRouteError(msg, req.Method, req.URL.Path) - s.writeError(ctx, resp, twerr) - } -} - -func (s *agentDBServer) serveListDatabasesJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "ListDatabases") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - d := json.NewDecoder(req.Body) - rawReqBody := json.RawMessage{} - if err := d.Decode(&rawReqBody); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - reqContent := new(ListDatabasesRequest) - unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} - if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - - handler := s.AgentDB.ListDatabases - if s.interceptor != nil { - handler = func(ctx context.Context, req *ListDatabasesRequest) (*ListDatabasesResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListDatabasesRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListDatabasesRequest) when calling interceptor") - } - return s.AgentDB.ListDatabases(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*ListDatabasesResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListDatabasesResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *ListDatabasesResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *ListDatabasesResponse and nil error while calling ListDatabases. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} - respBytes, err := marshaler.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/json") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentDBServer) serveListDatabasesProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "ListDatabases") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - buf, err := io.ReadAll(req.Body) - if err != nil { - s.handleRequestBodyError(ctx, resp, "failed to read request body", err) - return - } - reqContent := new(ListDatabasesRequest) - if err = proto.Unmarshal(buf, reqContent); err != nil { - s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) - return - } - - handler := s.AgentDB.ListDatabases - if s.interceptor != nil { - handler = func(ctx context.Context, req *ListDatabasesRequest) (*ListDatabasesResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListDatabasesRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListDatabasesRequest) when calling interceptor") - } - return s.AgentDB.ListDatabases(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*ListDatabasesResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListDatabasesResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *ListDatabasesResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *ListDatabasesResponse and nil error while calling ListDatabases. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - respBytes, err := proto.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/protobuf") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentDBServer) serveDeleteDatabase(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - header := req.Header.Get("Content-Type") - i := strings.Index(header, ";") - if i == -1 { - i = len(header) - } - switch strings.TrimSpace(strings.ToLower(header[:i])) { - case "application/json": - s.serveDeleteDatabaseJSON(ctx, resp, req) - case "application/protobuf": - s.serveDeleteDatabaseProtobuf(ctx, resp, req) - default: - msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) - twerr := badRouteError(msg, req.Method, req.URL.Path) - s.writeError(ctx, resp, twerr) - } -} - -func (s *agentDBServer) serveDeleteDatabaseJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "DeleteDatabase") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - d := json.NewDecoder(req.Body) - rawReqBody := json.RawMessage{} - if err := d.Decode(&rawReqBody); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - reqContent := new(DeleteDatabaseRequest) - unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} - if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - - handler := s.AgentDB.DeleteDatabase - if s.interceptor != nil { - handler = func(ctx context.Context, req *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DeleteDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DeleteDatabaseRequest) when calling interceptor") - } - return s.AgentDB.DeleteDatabase(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DeleteDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DeleteDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *DeleteDatabaseResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *DeleteDatabaseResponse and nil error while calling DeleteDatabase. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} - respBytes, err := marshaler.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/json") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentDBServer) serveDeleteDatabaseProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "DeleteDatabase") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - buf, err := io.ReadAll(req.Body) - if err != nil { - s.handleRequestBodyError(ctx, resp, "failed to read request body", err) - return - } - reqContent := new(DeleteDatabaseRequest) - if err = proto.Unmarshal(buf, reqContent); err != nil { - s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) - return - } - - handler := s.AgentDB.DeleteDatabase - if s.interceptor != nil { - handler = func(ctx context.Context, req *DeleteDatabaseRequest) (*DeleteDatabaseResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DeleteDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DeleteDatabaseRequest) when calling interceptor") - } - return s.AgentDB.DeleteDatabase(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DeleteDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DeleteDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *DeleteDatabaseResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *DeleteDatabaseResponse and nil error while calling DeleteDatabase. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - respBytes, err := proto.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/protobuf") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentDBServer) serveDump(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - header := req.Header.Get("Content-Type") - i := strings.Index(header, ";") - if i == -1 { - i = len(header) - } - switch strings.TrimSpace(strings.ToLower(header[:i])) { - case "application/json": - s.serveDumpJSON(ctx, resp, req) - case "application/protobuf": - s.serveDumpProtobuf(ctx, resp, req) - default: - msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) - twerr := badRouteError(msg, req.Method, req.URL.Path) - s.writeError(ctx, resp, twerr) - } -} - -func (s *agentDBServer) serveDumpJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "Dump") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - d := json.NewDecoder(req.Body) - rawReqBody := json.RawMessage{} - if err := d.Decode(&rawReqBody); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - reqContent := new(DumpDatabaseRequest) - unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} - if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { - s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) - return - } - - handler := s.AgentDB.Dump - if s.interceptor != nil { - handler = func(ctx context.Context, req *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DumpDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DumpDatabaseRequest) when calling interceptor") - } - return s.AgentDB.Dump(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DumpDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DumpDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *DumpDatabaseResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *DumpDatabaseResponse and nil error while calling Dump. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} - respBytes, err := marshaler.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/json") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentDBServer) serveDumpProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { - var err error - ctx = ctxsetters.WithMethodName(ctx, "Dump") - ctx, err = callRequestRouted(ctx, s.hooks) - if err != nil { - s.writeError(ctx, resp, err) - return - } - - buf, err := io.ReadAll(req.Body) - if err != nil { - s.handleRequestBodyError(ctx, resp, "failed to read request body", err) - return - } - reqContent := new(DumpDatabaseRequest) - if err = proto.Unmarshal(buf, reqContent); err != nil { - s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) - return - } - - handler := s.AgentDB.Dump - if s.interceptor != nil { - handler = func(ctx context.Context, req *DumpDatabaseRequest) (*DumpDatabaseResponse, error) { - resp, err := s.interceptor( - func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*DumpDatabaseRequest) - if !ok { - return nil, twirp.InternalError("failed type assertion req.(*DumpDatabaseRequest) when calling interceptor") - } - return s.AgentDB.Dump(ctx, typedReq) - }, - )(ctx, req) - if resp != nil { - typedResp, ok := resp.(*DumpDatabaseResponse) - if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*DumpDatabaseResponse) when calling interceptor") - } - return typedResp, err - } - return nil, err - } - } - - // Call service method - var respContent *DumpDatabaseResponse - func() { - defer ensurePanicResponses(ctx, resp, s.hooks) - respContent, err = handler(ctx, reqContent) - }() - - if err != nil { - s.writeError(ctx, resp, err) - return - } - if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *DumpDatabaseResponse and nil error while calling Dump. nil responses are not supported")) - return - } - - ctx = callResponsePrepared(ctx, s.hooks) - - respBytes, err := proto.Marshal(respContent) - if err != nil { - s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) - return - } - - ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) - resp.Header().Set("Content-Type", "application/protobuf") - resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) - resp.WriteHeader(http.StatusOK) - if n, err := resp.Write(respBytes); err != nil { - msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) - twerr := twirp.NewError(twirp.Unknown, msg) - ctx = callError(ctx, s.hooks, twerr) - } - callResponseSent(ctx, s.hooks) -} - -func (s *agentDBServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor0, 0 -} - -func (s *agentDBServer) ProtocGenTwirpVersion() string { - return "v8.1.3" -} - -// PathPrefix returns the base service path, in the form: "//./" -// that is everything in a Twirp route except for the . This can be used for routing, -// for example to identify the requests that are targeted to this service in a mux. -func (s *agentDBServer) PathPrefix() string { - return baseServicePath(s.pathPrefix, "livekit.agentdb", "AgentDB") -} - -// ===== -// Utils -// ===== - -// HTTPClient is the interface used by generated clients to send HTTP requests. -// It is fulfilled by *(net/http).Client, which is sufficient for most users. -// Users can provide their own implementation for special retry policies. -// -// HTTPClient implementations should not follow redirects. Redirects are -// automatically disabled if *(net/http).Client is passed to client -// constructors. See the withoutRedirects function in this file for more -// details. -type HTTPClient interface { - Do(req *http.Request) (*http.Response, error) -} - -// TwirpServer is the interface generated server structs will support: they're -// HTTP handlers with additional methods for accessing metadata about the -// service. Those accessors are a low-level API for building reflection tools. -// Most people can think of TwirpServers as just http.Handlers. -type TwirpServer interface { - http.Handler - - // ServiceDescriptor returns gzipped bytes describing the .proto file that - // this service was generated from. Once unzipped, the bytes can be - // unmarshalled as a - // google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto. - // - // The returned integer is the index of this particular service within that - // FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a - // low-level field, expected to be used for reflection. - ServiceDescriptor() ([]byte, int) - - // ProtocGenTwirpVersion is the semantic version string of the version of - // twirp used to generate this file. - ProtocGenTwirpVersion() string - - // PathPrefix returns the HTTP URL path prefix for all methods handled by this - // service. This can be used with an HTTP mux to route Twirp requests. - // The path prefix is in the form: "//./" - // that is, everything in a Twirp route except for the at the end. - PathPrefix() string -} - -func newServerOpts(opts []interface{}) *twirp.ServerOptions { - serverOpts := &twirp.ServerOptions{} - for _, opt := range opts { - switch o := opt.(type) { - case twirp.ServerOption: - o(serverOpts) - case *twirp.ServerHooks: // backwards compatibility, allow to specify hooks as an argument - twirp.WithServerHooks(o)(serverOpts) - case nil: // backwards compatibility, allow nil value for the argument - continue - default: - panic(fmt.Sprintf("Invalid option type %T, please use a twirp.ServerOption", o)) - } - } - return serverOpts -} - -// WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). -// Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. -// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err) -func WriteError(resp http.ResponseWriter, err error) { - writeError(context.Background(), resp, err, nil) -} - -// writeError writes Twirp errors in the response and triggers hooks. -func writeError(ctx context.Context, resp http.ResponseWriter, err error, hooks *twirp.ServerHooks) { - // Convert to a twirp.Error. Non-twirp errors are converted to internal errors. - var twerr twirp.Error - if !errors.As(err, &twerr) { - twerr = twirp.InternalErrorWith(err) - } - - statusCode := twirp.ServerHTTPStatusFromErrorCode(twerr.Code()) - ctx = ctxsetters.WithStatusCode(ctx, statusCode) - ctx = callError(ctx, hooks, twerr) - - respBody := marshalErrorToJSON(twerr) - - resp.Header().Set("Content-Type", "application/json") // Error responses are always JSON - resp.Header().Set("Content-Length", strconv.Itoa(len(respBody))) - resp.WriteHeader(statusCode) // set HTTP status code and send response - - _, writeErr := resp.Write(respBody) - if writeErr != nil { - // We have three options here. We could log the error, call the Error - // hook, or just silently ignore the error. - // - // Logging is unacceptable because we don't have a user-controlled - // logger; writing out to stderr without permission is too rude. - // - // Calling the Error hook would confuse users: it would mean the Error - // hook got called twice for one request, which is likely to lead to - // duplicated log messages and metrics, no matter how well we document - // the behavior. - // - // Silently ignoring the error is our least-bad option. It's highly - // likely that the connection is broken and the original 'err' says - // so anyway. - _ = writeErr - } - - callResponseSent(ctx, hooks) -} - -// sanitizeBaseURL parses the the baseURL, and adds the "http" scheme if needed. -// If the URL is unparsable, the baseURL is returned unchanged. -func sanitizeBaseURL(baseURL string) string { - u, err := url.Parse(baseURL) - if err != nil { - return baseURL // invalid URL will fail later when making requests - } - if u.Scheme == "" { - u.Scheme = "http" - } - return u.String() -} - -// baseServicePath composes the path prefix for the service (without ). -// e.g.: baseServicePath("/twirp", "my.pkg", "MyService") -// -// returns => "/twirp/my.pkg.MyService/" -// -// e.g.: baseServicePath("", "", "MyService") -// -// returns => "/MyService/" -func baseServicePath(prefix, pkg, service string) string { - fullServiceName := service - if pkg != "" { - fullServiceName = pkg + "." + service - } - return path.Join("/", prefix, fullServiceName) + "/" -} - -// parseTwirpPath extracts path components form a valid Twirp route. -// Expected format: "[]/./" -// e.g.: prefix, pkgService, method := parseTwirpPath("/twirp/pkg.Svc/MakeHat") -func parseTwirpPath(path string) (string, string, string) { - parts := strings.Split(path, "/") - if len(parts) < 2 { - return "", "", "" - } - method := parts[len(parts)-1] - pkgService := parts[len(parts)-2] - prefix := strings.Join(parts[0:len(parts)-2], "/") - return prefix, pkgService, method -} - -// getCustomHTTPReqHeaders retrieves a copy of any headers that are set in -// a context through the twirp.WithHTTPRequestHeaders function. -// If there are no headers set, or if they have the wrong type, nil is returned. -func getCustomHTTPReqHeaders(ctx context.Context) http.Header { - header, ok := twirp.HTTPRequestHeaders(ctx) - if !ok || header == nil { - return nil - } - copied := make(http.Header) - for k, vv := range header { - if vv == nil { - copied[k] = nil - continue - } - copied[k] = make([]string, len(vv)) - copy(copied[k], vv) - } - return copied -} - -// newRequest makes an http.Request from a client, adding common headers. -func newRequest(ctx context.Context, url string, reqBody io.Reader, contentType string) (*http.Request, error) { - req, err := http.NewRequest("POST", url, reqBody) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if customHeader := getCustomHTTPReqHeaders(ctx); customHeader != nil { - req.Header = customHeader - } - req.Header.Set("Accept", contentType) - req.Header.Set("Content-Type", contentType) - req.Header.Set("Twirp-Version", "v8.1.3") - return req, nil -} - -// JSON serialization for errors -type twerrJSON struct { - Code string `json:"code"` - Msg string `json:"msg"` - Meta map[string]string `json:"meta,omitempty"` -} - -// marshalErrorToJSON returns JSON from a twirp.Error, that can be used as HTTP error response body. -// If serialization fails, it will use a descriptive Internal error instead. -func marshalErrorToJSON(twerr twirp.Error) []byte { - // make sure that msg is not too large - msg := twerr.Msg() - if len(msg) > 1e6 { - msg = msg[:1e6] - } - - tj := twerrJSON{ - Code: string(twerr.Code()), - Msg: msg, - Meta: twerr.MetaMap(), - } - - buf, err := json.Marshal(&tj) - if err != nil { - buf = []byte("{\"type\": \"" + twirp.Internal + "\", \"msg\": \"There was an error but it could not be serialized into JSON\"}") // fallback - } - - return buf -} - -// errorFromResponse builds a twirp.Error from a non-200 HTTP response. -// If the response has a valid serialized Twirp error, then it's returned. -// If not, the response status code is used to generate a similar twirp -// error. See twirpErrorFromIntermediary for more info on intermediary errors. -func errorFromResponse(resp *http.Response) twirp.Error { - statusCode := resp.StatusCode - statusText := http.StatusText(statusCode) - - if isHTTPRedirect(statusCode) { - // Unexpected redirect: it must be an error from an intermediary. - // Twirp clients don't follow redirects automatically, Twirp only handles - // POST requests, redirects should only happen on GET and HEAD requests. - location := resp.Header.Get("Location") - msg := fmt.Sprintf("unexpected HTTP status code %d %q received, Location=%q", statusCode, statusText, location) - return twirpErrorFromIntermediary(statusCode, msg, location) - } - - respBodyBytes, err := io.ReadAll(resp.Body) - if err != nil { - return wrapInternal(err, "failed to read server error response body") - } - - var tj twerrJSON - dec := json.NewDecoder(bytes.NewReader(respBodyBytes)) - dec.DisallowUnknownFields() - if err := dec.Decode(&tj); err != nil || tj.Code == "" { - // Invalid JSON response; it must be an error from an intermediary. - msg := fmt.Sprintf("Error from intermediary with HTTP status code %d %q", statusCode, statusText) - return twirpErrorFromIntermediary(statusCode, msg, string(respBodyBytes)) - } - - errorCode := twirp.ErrorCode(tj.Code) - if !twirp.IsValidErrorCode(errorCode) { - msg := "invalid type returned from server error response: " + tj.Code - return twirp.InternalError(msg).WithMeta("body", string(respBodyBytes)) - } - - twerr := twirp.NewError(errorCode, tj.Msg) - for k, v := range tj.Meta { - twerr = twerr.WithMeta(k, v) - } - return twerr -} - -// twirpErrorFromIntermediary maps HTTP errors from non-twirp sources to twirp errors. -// The mapping is similar to gRPC: https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md. -// Returned twirp Errors have some additional metadata for inspection. -func twirpErrorFromIntermediary(status int, msg string, bodyOrLocation string) twirp.Error { - var code twirp.ErrorCode - if isHTTPRedirect(status) { // 3xx - code = twirp.Internal - } else { - switch status { - case 400: // Bad Request - code = twirp.Internal - case 401: // Unauthorized - code = twirp.Unauthenticated - case 403: // Forbidden - code = twirp.PermissionDenied - case 404: // Not Found - code = twirp.BadRoute - case 429: // Too Many Requests - code = twirp.ResourceExhausted - case 502, 503, 504: // Bad Gateway, Service Unavailable, Gateway Timeout - code = twirp.Unavailable - default: // All other codes - code = twirp.Unknown - } - } - - twerr := twirp.NewError(code, msg) - twerr = twerr.WithMeta("http_error_from_intermediary", "true") // to easily know if this error was from intermediary - twerr = twerr.WithMeta("status_code", strconv.Itoa(status)) - if isHTTPRedirect(status) { - twerr = twerr.WithMeta("location", bodyOrLocation) - } else { - twerr = twerr.WithMeta("body", bodyOrLocation) - } - return twerr -} - -func isHTTPRedirect(status int) bool { - return status >= 300 && status <= 399 -} - -// wrapInternal wraps an error with a prefix as an Internal error. -// The original error cause is accessible by github.com/pkg/errors.Cause. -func wrapInternal(err error, prefix string) twirp.Error { - return twirp.InternalErrorWith(&wrappedError{prefix: prefix, cause: err}) -} - -type wrappedError struct { - prefix string - cause error -} - -func (e *wrappedError) Error() string { return e.prefix + ": " + e.cause.Error() } -func (e *wrappedError) Unwrap() error { return e.cause } // for go1.13 + errors.Is/As -func (e *wrappedError) Cause() error { return e.cause } // for github.com/pkg/errors - -// ensurePanicResponses makes sure that rpc methods causing a panic still result in a Twirp Internal -// error response (status 500), and error hooks are properly called with the panic wrapped as an error. -// The panic is re-raised so it can be handled normally with middleware. -func ensurePanicResponses(ctx context.Context, resp http.ResponseWriter, hooks *twirp.ServerHooks) { - if r := recover(); r != nil { - // Wrap the panic as an error so it can be passed to error hooks. - // The original error is accessible from error hooks, but not visible in the response. - err := errFromPanic(r) - twerr := &internalWithCause{msg: "Internal service panic", cause: err} - // Actually write the error - writeError(ctx, resp, twerr, hooks) - // If possible, flush the error to the wire. - f, ok := resp.(http.Flusher) - if ok { - f.Flush() - } - - panic(r) - } -} - -// errFromPanic returns the typed error if the recovered panic is an error, otherwise formats as error. -func errFromPanic(p interface{}) error { - if err, ok := p.(error); ok { - return err - } - return fmt.Errorf("panic: %v", p) -} - -// internalWithCause is a Twirp Internal error wrapping an original error cause, -// but the original error message is not exposed on Msg(). The original error -// can be checked with go1.13+ errors.Is/As, and also by (github.com/pkg/errors).Unwrap -type internalWithCause struct { - msg string - cause error -} - -func (e *internalWithCause) Unwrap() error { return e.cause } // for go1.13 + errors.Is/As -func (e *internalWithCause) Cause() error { return e.cause } // for github.com/pkg/errors -func (e *internalWithCause) Error() string { return e.msg + ": " + e.cause.Error() } -func (e *internalWithCause) Code() twirp.ErrorCode { return twirp.Internal } -func (e *internalWithCause) Msg() string { return e.msg } -func (e *internalWithCause) Meta(key string) string { return "" } -func (e *internalWithCause) MetaMap() map[string]string { return nil } -func (e *internalWithCause) WithMeta(key string, val string) twirp.Error { return e } - -// malformedRequestError is used when the twirp server cannot unmarshal a request -func malformedRequestError(msg string) twirp.Error { - return twirp.NewError(twirp.Malformed, msg) -} - -// badRouteError is used when the twirp server cannot route a request -func badRouteError(msg string, method, url string) twirp.Error { - err := twirp.NewError(twirp.BadRoute, msg) - err = err.WithMeta("twirp_invalid_route", method+" "+url) - return err -} - -// withoutRedirects makes sure that the POST request can not be redirected. -// The standard library will, by default, redirect requests (including POSTs) if it gets a 302 or -// 303 response, and also 301s in go1.8. It redirects by making a second request, changing the -// method to GET and removing the body. This produces very confusing error messages, so instead we -// set a redirect policy that always errors. This stops Go from executing the redirect. -// -// We have to be a little careful in case the user-provided http.Client has its own CheckRedirect -// policy - if so, we'll run through that policy first. -// -// Because this requires modifying the http.Client, we make a new copy of the client and return it. -func withoutRedirects(in *http.Client) *http.Client { - copy := *in - copy.CheckRedirect = func(req *http.Request, via []*http.Request) error { - if in.CheckRedirect != nil { - // Run the input's redirect if it exists, in case it has side effects, but ignore any error it - // returns, since we want to use ErrUseLastResponse. - err := in.CheckRedirect(req, via) - _ = err // Silly, but this makes sure generated code passes errcheck -blank, which some people use. - } - return http.ErrUseLastResponse - } - return © -} - -// doProtobufRequest makes a Protobuf request to the remote Twirp service. -func doProtobufRequest(ctx context.Context, client HTTPClient, hooks *twirp.ClientHooks, url string, in, out proto.Message) (_ context.Context, err error) { - reqBodyBytes, err := proto.Marshal(in) - if err != nil { - return ctx, wrapInternal(err, "failed to marshal proto request") - } - reqBody := bytes.NewBuffer(reqBodyBytes) - if err = ctx.Err(); err != nil { - return ctx, wrapInternal(err, "aborted because context was done") - } - - req, err := newRequest(ctx, url, reqBody, "application/protobuf") - if err != nil { - return ctx, wrapInternal(err, "could not build request") - } - ctx, err = callClientRequestPrepared(ctx, hooks, req) - if err != nil { - return ctx, err - } - - req = req.WithContext(ctx) - resp, err := client.Do(req) - if err != nil { - return ctx, wrapInternal(err, "failed to do request") - } - defer func() { _ = resp.Body.Close() }() - - if err = ctx.Err(); err != nil { - return ctx, wrapInternal(err, "aborted because context was done") - } - - if resp.StatusCode != 200 { - return ctx, errorFromResponse(resp) - } - - respBodyBytes, err := io.ReadAll(resp.Body) - if err != nil { - return ctx, wrapInternal(err, "failed to read response body") - } - if err = ctx.Err(); err != nil { - return ctx, wrapInternal(err, "aborted because context was done") - } - - if err = proto.Unmarshal(respBodyBytes, out); err != nil { - return ctx, wrapInternal(err, "failed to unmarshal proto response") - } - return ctx, nil -} - -// doJSONRequest makes a JSON request to the remote Twirp service. -func doJSONRequest(ctx context.Context, client HTTPClient, hooks *twirp.ClientHooks, url string, in, out proto.Message) (_ context.Context, err error) { - marshaler := &protojson.MarshalOptions{UseProtoNames: true} - reqBytes, err := marshaler.Marshal(in) - if err != nil { - return ctx, wrapInternal(err, "failed to marshal json request") - } - if err = ctx.Err(); err != nil { - return ctx, wrapInternal(err, "aborted because context was done") - } - - req, err := newRequest(ctx, url, bytes.NewReader(reqBytes), "application/json") - if err != nil { - return ctx, wrapInternal(err, "could not build request") - } - ctx, err = callClientRequestPrepared(ctx, hooks, req) - if err != nil { - return ctx, err - } - - req = req.WithContext(ctx) - resp, err := client.Do(req) - if err != nil { - return ctx, wrapInternal(err, "failed to do request") - } - - defer func() { - cerr := resp.Body.Close() - if err == nil && cerr != nil { - err = wrapInternal(cerr, "failed to close response body") - } - }() - - if err = ctx.Err(); err != nil { - return ctx, wrapInternal(err, "aborted because context was done") - } - - if resp.StatusCode != 200 { - return ctx, errorFromResponse(resp) - } - - d := json.NewDecoder(resp.Body) - rawRespBody := json.RawMessage{} - if err := d.Decode(&rawRespBody); err != nil { - return ctx, wrapInternal(err, "failed to unmarshal json response") - } - unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} - if err = unmarshaler.Unmarshal(rawRespBody, out); err != nil { - return ctx, wrapInternal(err, "failed to unmarshal json response") - } - if err = ctx.Err(); err != nil { - return ctx, wrapInternal(err, "aborted because context was done") - } - return ctx, nil -} - -// Call twirp.ServerHooks.RequestReceived if the hook is available -func callRequestReceived(ctx context.Context, h *twirp.ServerHooks) (context.Context, error) { - if h == nil || h.RequestReceived == nil { - return ctx, nil - } - return h.RequestReceived(ctx) -} - -// Call twirp.ServerHooks.RequestRouted if the hook is available -func callRequestRouted(ctx context.Context, h *twirp.ServerHooks) (context.Context, error) { - if h == nil || h.RequestRouted == nil { - return ctx, nil - } - return h.RequestRouted(ctx) -} - -// Call twirp.ServerHooks.ResponsePrepared if the hook is available -func callResponsePrepared(ctx context.Context, h *twirp.ServerHooks) context.Context { - if h == nil || h.ResponsePrepared == nil { - return ctx - } - return h.ResponsePrepared(ctx) -} - -// Call twirp.ServerHooks.ResponseSent if the hook is available -func callResponseSent(ctx context.Context, h *twirp.ServerHooks) { - if h == nil || h.ResponseSent == nil { - return - } - h.ResponseSent(ctx) -} - -// Call twirp.ServerHooks.Error if the hook is available -func callError(ctx context.Context, h *twirp.ServerHooks, err twirp.Error) context.Context { - if h == nil || h.Error == nil { - return ctx - } - return h.Error(ctx, err) -} - -func callClientResponseReceived(ctx context.Context, h *twirp.ClientHooks) { - if h == nil || h.ResponseReceived == nil { - return - } - h.ResponseReceived(ctx) -} - -func callClientRequestPrepared(ctx context.Context, h *twirp.ClientHooks, req *http.Request) (context.Context, error) { - if h == nil || h.RequestPrepared == nil { - return ctx, nil - } - return h.RequestPrepared(ctx, req) -} - -func callClientError(ctx context.Context, h *twirp.ClientHooks, err twirp.Error) { - if h == nil || h.Error == nil { - return - } - h.Error(ctx, err) -} - -var twirpFileDescriptor0 = []byte{ - // 594 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0x61, 0x6b, 0xd3, 0x40, - 0x18, 0x26, 0xcd, 0x36, 0xed, 0x5b, 0xdb, 0xca, 0x6d, 0x2d, 0xa1, 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 0xc6, 0x65, 0xc8, 0x22, 0xe4, 0x0e, 0x15, 0x4e, 0xec, 0xb3, 0x65, 0xba, 0x09, 0xdd, - 0x6e, 0x4a, 0x78, 0x24, 0xce, 0x7c, 0xb6, 0x34, 0x9f, 0x02, 0x79, 0x85, 0xa2, 0x28, 0xad, 0xaa, - 0xbd, 0xf9, 0x43, 0x83, 0xed, 0x35, 0xde, 0x4d, 0xf7, 0x75, 0x6d, 0x5a, 0xad, 0xca, 0x34, 0x5d, - 0x69, 0xda, 0x00, 0xda, 0xb3, 0xd4, 0x13, 0x37, 0x17, 0xb6, 0xb1, 0x12, 0x26, 0xe1, 0x95, 0x30, - 0x95, 0x01, 0x9b, 0x0a, 0x03, 0xc8, 0x5d, 0xd0, 0x05, 0x0b, 0x8d, 0xad, 0xf4, 0x5d, 0xf2, 0x68, - 0xda, 0xb0, 0x73, 0xc2, 0x78, 0xae, 0x8d, 0x67, 0xa6, 0xdc, 0x83, 0x7a, 0x48, 0xe7, 0xe8, 0x70, - 0x76, 0x85, 0xa9, 0xb2, 0x4d, 0xfb, 0x76, 0x02, 0x4c, 0xd8, 0x15, 0x92, 0x5d, 0x80, 0xf4, 0xa5, - 0x08, 0xce, 0x31, 0xd3, 0x96, 0x96, 0xbf, 0x4b, 0x00, 0xf3, 0x2b, 0x74, 0x0a, 0x3d, 0xa5, 0x61, - 0x2f, 0xa0, 0x9e, 0xb9, 0xc3, 0x0d, 0xad, 0xaf, 0x0f, 0x1b, 0x87, 0x7d, 0xab, 0x10, 0x41, 0x2b, - 0xa3, 0x4d, 0xe2, 0xc5, 0x82, 0x46, 0x97, 0xf6, 0x35, 0x25, 0x91, 0xe9, 0xe3, 0x52, 0x38, 0xa5, - 0x8f, 0x37, 0x13, 0xf8, 0x34, 0xdf, 0xc0, 0x77, 0x0d, 0xda, 0x85, 0x36, 0xff, 0xdf, 0x61, 0x99, - 0xcf, 0xa1, 0x33, 0x46, 0x0f, 0xcb, 0xb3, 0x58, 0x19, 0x58, 0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, 0x4a, 0xa9, 0x4f, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x24, 0x1a, 0xfb, 0xf6, 0x06, - 0x00, 0x00, -} diff --git a/livekit/agentdb/livekit_agentdb_data.pb.go b/livekit/agentdb/livekit_agentdb_data.pb.go deleted file mode 100644 index 47cef38a8..000000000 --- a/livekit/agentdb/livekit_agentdb_data.pb.go +++ /dev/null @@ -1,1741 +0,0 @@ -// Copyright 2026 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.35.1 -// source: agentdb/livekit_agentdb_data.proto - -package agentdb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryLang selects the query language of a statement; both execute -// against the same database. -type QueryLang int32 - -const ( - QueryLang_QUERY_LANG_SQL QueryLang = 0 - QueryLang_QUERY_LANG_CYPHER QueryLang = 1 -) - -// Enum value maps for QueryLang. -var ( - QueryLang_name = map[int32]string{ - 0: "QUERY_LANG_SQL", - 1: "QUERY_LANG_CYPHER", - } - QueryLang_value = map[string]int32{ - "QUERY_LANG_SQL": 0, - "QUERY_LANG_CYPHER": 1, - } -) - -func (x QueryLang) Enum() *QueryLang { - p := new(QueryLang) - *p = x - return p -} - -func (x QueryLang) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (QueryLang) Descriptor() protoreflect.EnumDescriptor { - return file_agentdb_livekit_agentdb_data_proto_enumTypes[0].Descriptor() -} - -func (QueryLang) Type() protoreflect.EnumType { - return &file_agentdb_livekit_agentdb_data_proto_enumTypes[0] -} - -func (x QueryLang) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use QueryLang.Descriptor instead. -func (QueryLang) EnumDescriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{0} -} - -// ValueType tags one value's storage class within a Column. -type ValueType int32 - -const ( - ValueType_VALUE_TYPE_NULL ValueType = 0 - ValueType_VALUE_TYPE_INT ValueType = 1 - ValueType_VALUE_TYPE_DOUBLE ValueType = 2 - ValueType_VALUE_TYPE_TEXT ValueType = 3 - ValueType_VALUE_TYPE_BLOB ValueType = 4 -) - -// Enum value maps for ValueType. -var ( - ValueType_name = map[int32]string{ - 0: "VALUE_TYPE_NULL", - 1: "VALUE_TYPE_INT", - 2: "VALUE_TYPE_DOUBLE", - 3: "VALUE_TYPE_TEXT", - 4: "VALUE_TYPE_BLOB", - } - ValueType_value = map[string]int32{ - "VALUE_TYPE_NULL": 0, - "VALUE_TYPE_INT": 1, - "VALUE_TYPE_DOUBLE": 2, - "VALUE_TYPE_TEXT": 3, - "VALUE_TYPE_BLOB": 4, - } -) - -func (x ValueType) Enum() *ValueType { - p := new(ValueType) - *p = x - return p -} - -func (x ValueType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ValueType) Descriptor() protoreflect.EnumDescriptor { - return file_agentdb_livekit_agentdb_data_proto_enumTypes[1].Descriptor() -} - -func (ValueType) Type() protoreflect.EnumType { - return &file_agentdb_livekit_agentdb_data_proto_enumTypes[1] -} - -func (x ValueType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ValueType.Descriptor instead. -func (ValueType) EnumDescriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{1} -} - -type ClientMessage struct { - state protoimpl.MessageState `protogen:"open.v1"` - RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // Types that are valid to be assigned to Message: - // - // *ClientMessage_Hello - // *ClientMessage_Exec - // *ClientMessage_Query - // *ClientMessage_Batch - // *ClientMessage_Begin - // *ClientMessage_Commit - // *ClientMessage_Rollback - // *ClientMessage_Cancel - // *ClientMessage_Credit - // *ClientMessage_Ping - Message isClientMessage_Message `protobuf_oneof:"message"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClientMessage) Reset() { - *x = ClientMessage{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClientMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientMessage) ProtoMessage() {} - -func (x *ClientMessage) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientMessage.ProtoReflect.Descriptor instead. -func (*ClientMessage) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{0} -} - -func (x *ClientMessage) GetRequestId() uint32 { - if x != nil { - return x.RequestId - } - return 0 -} - -func (x *ClientMessage) GetMessage() isClientMessage_Message { - if x != nil { - return x.Message - } - return nil -} - -func (x *ClientMessage) GetHello() *Hello { - if x != nil { - if x, ok := x.Message.(*ClientMessage_Hello); ok { - return x.Hello - } - } - return nil -} - -func (x *ClientMessage) GetExec() *Statement { - if x != nil { - if x, ok := x.Message.(*ClientMessage_Exec); ok { - return x.Exec - } - } - return nil -} - -func (x *ClientMessage) GetQuery() *Statement { - if x != nil { - if x, ok := x.Message.(*ClientMessage_Query); ok { - return x.Query - } - } - return nil -} - -func (x *ClientMessage) GetBatch() *Batch { - if x != nil { - if x, ok := x.Message.(*ClientMessage_Batch); ok { - return x.Batch - } - } - return nil -} - -func (x *ClientMessage) GetBegin() *Begin { - if x != nil { - if x, ok := x.Message.(*ClientMessage_Begin); ok { - return x.Begin - } - } - return nil -} - -func (x *ClientMessage) GetCommit() *Commit { - if x != nil { - if x, ok := x.Message.(*ClientMessage_Commit); ok { - return x.Commit - } - } - return nil -} - -func (x *ClientMessage) GetRollback() *Rollback { - if x != nil { - if x, ok := x.Message.(*ClientMessage_Rollback); ok { - return x.Rollback - } - } - return nil -} - -func (x *ClientMessage) GetCancel() *Cancel { - if x != nil { - if x, ok := x.Message.(*ClientMessage_Cancel); ok { - return x.Cancel - } - } - return nil -} - -func (x *ClientMessage) GetCredit() *Credit { - if x != nil { - if x, ok := x.Message.(*ClientMessage_Credit); ok { - return x.Credit - } - } - return nil -} - -func (x *ClientMessage) GetPing() *Ping { - if x != nil { - if x, ok := x.Message.(*ClientMessage_Ping); ok { - return x.Ping - } - } - return nil -} - -type isClientMessage_Message interface { - isClientMessage_Message() -} - -type ClientMessage_Hello struct { - Hello *Hello `protobuf:"bytes,2,opt,name=hello,proto3,oneof"` // must be first on the socket -} - -type ClientMessage_Exec struct { - Exec *Statement `protobuf:"bytes,3,opt,name=exec,proto3,oneof"` // no result rows; answers ExecResult -} - -type ClientMessage_Query struct { - Query *Statement `protobuf:"bytes,4,opt,name=query,proto3,oneof"` // answers Columns + ColumnBatch* + Done -} - -type ClientMessage_Batch struct { - Batch *Batch `protobuf:"bytes,5,opt,name=batch,proto3,oneof"` // atomic multi-statement exec -} - -type ClientMessage_Begin struct { - Begin *Begin `protobuf:"bytes,6,opt,name=begin,proto3,oneof"` // interactive transaction (server enforces idle/duration timeouts) -} - -type ClientMessage_Commit struct { - Commit *Commit `protobuf:"bytes,7,opt,name=commit,proto3,oneof"` -} - -type ClientMessage_Rollback struct { - Rollback *Rollback `protobuf:"bytes,8,opt,name=rollback,proto3,oneof"` -} - -type ClientMessage_Cancel struct { - Cancel *Cancel `protobuf:"bytes,9,opt,name=cancel,proto3,oneof"` // stop a running query's stream/cursor -} - -type ClientMessage_Credit struct { - Credit *Credit `protobuf:"bytes,10,opt,name=credit,proto3,oneof"` // grant more batch credits for request_id -} - -type ClientMessage_Ping struct { - Ping *Ping `protobuf:"bytes,11,opt,name=ping,proto3,oneof"` -} - -func (*ClientMessage_Hello) isClientMessage_Message() {} - -func (*ClientMessage_Exec) isClientMessage_Message() {} - -func (*ClientMessage_Query) isClientMessage_Message() {} - -func (*ClientMessage_Batch) isClientMessage_Message() {} - -func (*ClientMessage_Begin) isClientMessage_Message() {} - -func (*ClientMessage_Commit) isClientMessage_Message() {} - -func (*ClientMessage_Rollback) isClientMessage_Message() {} - -func (*ClientMessage_Cancel) isClientMessage_Message() {} - -func (*ClientMessage_Credit) isClientMessage_Message() {} - -func (*ClientMessage_Ping) isClientMessage_Message() {} - -type ServerMessage struct { - state protoimpl.MessageState `protogen:"open.v1"` - RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // Types that are valid to be assigned to Message: - // - // *ServerMessage_HelloOk - // *ServerMessage_Columns - // *ServerMessage_ColumnBatch - // *ServerMessage_ExecResult - // *ServerMessage_Done - // *ServerMessage_Error - // *ServerMessage_Pong - Message isServerMessage_Message `protobuf_oneof:"message"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ServerMessage) Reset() { - *x = ServerMessage{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ServerMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerMessage) ProtoMessage() {} - -func (x *ServerMessage) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerMessage.ProtoReflect.Descriptor instead. -func (*ServerMessage) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{1} -} - -func (x *ServerMessage) GetRequestId() uint32 { - if x != nil { - return x.RequestId - } - return 0 -} - -func (x *ServerMessage) GetMessage() isServerMessage_Message { - if x != nil { - return x.Message - } - return nil -} - -func (x *ServerMessage) GetHelloOk() *HelloOk { - if x != nil { - if x, ok := x.Message.(*ServerMessage_HelloOk); ok { - return x.HelloOk - } - } - return nil -} - -func (x *ServerMessage) GetColumns() *Columns { - if x != nil { - if x, ok := x.Message.(*ServerMessage_Columns); ok { - return x.Columns - } - } - return nil -} - -func (x *ServerMessage) GetColumnBatch() *ColumnBatch { - if x != nil { - if x, ok := x.Message.(*ServerMessage_ColumnBatch); ok { - return x.ColumnBatch - } - } - return nil -} - -func (x *ServerMessage) GetExecResult() *ExecResult { - if x != nil { - if x, ok := x.Message.(*ServerMessage_ExecResult); ok { - return x.ExecResult - } - } - return nil -} - -func (x *ServerMessage) GetDone() *Done { - if x != nil { - if x, ok := x.Message.(*ServerMessage_Done); ok { - return x.Done - } - } - return nil -} - -func (x *ServerMessage) GetError() *Error { - if x != nil { - if x, ok := x.Message.(*ServerMessage_Error); ok { - return x.Error - } - } - return nil -} - -func (x *ServerMessage) GetPong() *Pong { - if x != nil { - if x, ok := x.Message.(*ServerMessage_Pong); ok { - return x.Pong - } - } - return nil -} - -type isServerMessage_Message interface { - isServerMessage_Message() -} - -type ServerMessage_HelloOk struct { - HelloOk *HelloOk `protobuf:"bytes,2,opt,name=hello_ok,json=helloOk,proto3,oneof"` -} - -type ServerMessage_Columns struct { - Columns *Columns `protobuf:"bytes,3,opt,name=columns,proto3,oneof"` -} - -type ServerMessage_ColumnBatch struct { - ColumnBatch *ColumnBatch `protobuf:"bytes,4,opt,name=column_batch,json=columnBatch,proto3,oneof"` -} - -type ServerMessage_ExecResult struct { - ExecResult *ExecResult `protobuf:"bytes,5,opt,name=exec_result,json=execResult,proto3,oneof"` -} - -type ServerMessage_Done struct { - Done *Done `protobuf:"bytes,6,opt,name=done,proto3,oneof"` -} - -type ServerMessage_Error struct { - Error *Error `protobuf:"bytes,7,opt,name=error,proto3,oneof"` -} - -type ServerMessage_Pong struct { - Pong *Pong `protobuf:"bytes,8,opt,name=pong,proto3,oneof"` -} - -func (*ServerMessage_HelloOk) isServerMessage_Message() {} - -func (*ServerMessage_Columns) isServerMessage_Message() {} - -func (*ServerMessage_ColumnBatch) isServerMessage_Message() {} - -func (*ServerMessage_ExecResult) isServerMessage_Message() {} - -func (*ServerMessage_Done) isServerMessage_Message() {} - -func (*ServerMessage_Error) isServerMessage_Message() {} - -func (*ServerMessage_Pong) isServerMessage_Message() {} - -// Value mirrors SQLite's five storage classes exactly. -type Value struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Value: - // - // *Value_NullValue - // *Value_IntValue - // *Value_DoubleValue - // *Value_TextValue - // *Value_BlobValue - Value isValue_Value `protobuf_oneof:"value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Value) Reset() { - *x = Value{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Value) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Value) ProtoMessage() {} - -func (x *Value) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Value.ProtoReflect.Descriptor instead. -func (*Value) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{2} -} - -func (x *Value) GetValue() isValue_Value { - if x != nil { - return x.Value - } - return nil -} - -func (x *Value) GetNullValue() bool { - if x != nil { - if x, ok := x.Value.(*Value_NullValue); ok { - return x.NullValue - } - } - return false -} - -func (x *Value) GetIntValue() int64 { - if x != nil { - if x, ok := x.Value.(*Value_IntValue); ok { - return x.IntValue - } - } - return 0 -} - -func (x *Value) GetDoubleValue() float64 { - if x != nil { - if x, ok := x.Value.(*Value_DoubleValue); ok { - return x.DoubleValue - } - } - return 0 -} - -func (x *Value) GetTextValue() string { - if x != nil { - if x, ok := x.Value.(*Value_TextValue); ok { - return x.TextValue - } - } - return "" -} - -func (x *Value) GetBlobValue() []byte { - if x != nil { - if x, ok := x.Value.(*Value_BlobValue); ok { - return x.BlobValue - } - } - return nil -} - -type isValue_Value interface { - isValue_Value() -} - -type Value_NullValue struct { - NullValue bool `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,oneof"` // always true when set -} - -type Value_IntValue struct { - IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` -} - -type Value_DoubleValue struct { - DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"` -} - -type Value_TextValue struct { - TextValue string `protobuf:"bytes,4,opt,name=text_value,json=textValue,proto3,oneof"` -} - -type Value_BlobValue struct { - BlobValue []byte `protobuf:"bytes,5,opt,name=blob_value,json=blobValue,proto3,oneof"` -} - -func (*Value_NullValue) isValue_Value() {} - -func (*Value_IntValue) isValue_Value() {} - -func (*Value_DoubleValue) isValue_Value() {} - -func (*Value_TextValue) isValue_Value() {} - -func (*Value_BlobValue) isValue_Value() {} - -type Statement struct { - state protoimpl.MessageState `protogen:"open.v1"` - Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` // statement text in the selected lang - Params []*Value `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` // positional bind parameters - Lang QueryLang `protobuf:"varint,3,opt,name=lang,proto3,enum=livekit.agentdb.QueryLang" json:"lang,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Statement) Reset() { - *x = Statement{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Statement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Statement) ProtoMessage() {} - -func (x *Statement) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Statement.ProtoReflect.Descriptor instead. -func (*Statement) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{3} -} - -func (x *Statement) GetSql() string { - if x != nil { - return x.Sql - } - return "" -} - -func (x *Statement) GetParams() []*Value { - if x != nil { - return x.Params - } - return nil -} - -func (x *Statement) GetLang() QueryLang { - if x != nil { - return x.Lang - } - return QueryLang_QUERY_LANG_SQL -} - -type Batch struct { - state protoimpl.MessageState `protogen:"open.v1"` - Statements []*Statement `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"` // applied atomically, in order - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Batch) Reset() { - *x = Batch{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Batch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Batch) ProtoMessage() {} - -func (x *Batch) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Batch.ProtoReflect.Descriptor instead. -func (*Batch) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{4} -} - -func (x *Batch) GetStatements() []*Statement { - if x != nil { - return x.Statements - } - return nil -} - -type Begin struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Begin) Reset() { - *x = Begin{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Begin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Begin) ProtoMessage() {} - -func (x *Begin) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Begin.ProtoReflect.Descriptor instead. -func (*Begin) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{5} -} - -type Commit struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Commit) Reset() { - *x = Commit{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Commit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Commit) ProtoMessage() {} - -func (x *Commit) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Commit.ProtoReflect.Descriptor instead. -func (*Commit) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{6} -} - -type Rollback struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Rollback) Reset() { - *x = Rollback{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Rollback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Rollback) ProtoMessage() {} - -func (x *Rollback) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Rollback.ProtoReflect.Descriptor instead. -func (*Rollback) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{7} -} - -type Cancel struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Cancel) Reset() { - *x = Cancel{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Cancel) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cancel) ProtoMessage() {} - -func (x *Cancel) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cancel.ProtoReflect.Descriptor instead. -func (*Cancel) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{8} -} - -type Credit struct { - state protoimpl.MessageState `protogen:"open.v1"` - Batches uint32 `protobuf:"varint,1,opt,name=batches,proto3" json:"batches,omitempty"` // additional batch frames the client can absorb - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Credit) Reset() { - *x = Credit{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Credit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Credit) ProtoMessage() {} - -func (x *Credit) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Credit.ProtoReflect.Descriptor instead. -func (*Credit) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{9} -} - -func (x *Credit) GetBatches() uint32 { - if x != nil { - return x.Batches - } - return 0 -} - -type Ping struct { - state protoimpl.MessageState `protogen:"open.v1"` - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Ping) Reset() { - *x = Ping{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Ping) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Ping) ProtoMessage() {} - -func (x *Ping) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Ping.ProtoReflect.Descriptor instead. -func (*Ping) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{10} -} - -func (x *Ping) GetTimestamp() int64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -type Pong struct { - state protoimpl.MessageState `protogen:"open.v1"` - LastPingTimestamp int64 `protobuf:"varint,1,opt,name=last_ping_timestamp,json=lastPingTimestamp,proto3" json:"last_ping_timestamp,omitempty"` - Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Pong) Reset() { - *x = Pong{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Pong) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Pong) ProtoMessage() {} - -func (x *Pong) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Pong.ProtoReflect.Descriptor instead. -func (*Pong) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{11} -} - -func (x *Pong) GetLastPingTimestamp() int64 { - if x != nil { - return x.LastPingTimestamp - } - return 0 -} - -func (x *Pong) GetTimestamp() int64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -type Hello struct { - state protoimpl.MessageState `protogen:"open.v1"` - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // access token; authorization is checked here - DatabaseId string `protobuf:"bytes,2,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Hello) Reset() { - *x = Hello{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Hello) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Hello) ProtoMessage() {} - -func (x *Hello) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Hello.ProtoReflect.Descriptor instead. -func (*Hello) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{12} -} - -func (x *Hello) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *Hello) GetDatabaseId() string { - if x != nil { - return x.DatabaseId - } - return "" -} - -type HelloOk struct { - state protoimpl.MessageState `protogen:"open.v1"` - Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence - PingIntervalMs uint32 `protobuf:"varint,2,opt,name=ping_interval_ms,json=pingIntervalMs,proto3" json:"ping_interval_ms,omitempty"` // server-advertised keepalive cadence - PingTimeoutMs uint32 `protobuf:"varint,3,opt,name=ping_timeout_ms,json=pingTimeoutMs,proto3" json:"ping_timeout_ms,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *HelloOk) Reset() { - *x = HelloOk{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *HelloOk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HelloOk) ProtoMessage() {} - -func (x *HelloOk) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HelloOk.ProtoReflect.Descriptor instead. -func (*HelloOk) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{13} -} - -func (x *HelloOk) GetTip() int64 { - if x != nil { - return x.Tip - } - return 0 -} - -func (x *HelloOk) GetPingIntervalMs() uint32 { - if x != nil { - return x.PingIntervalMs - } - return 0 -} - -func (x *HelloOk) GetPingTimeoutMs() uint32 { - if x != nil { - return x.PingTimeoutMs - } - return 0 -} - -type Columns struct { - state protoimpl.MessageState `protogen:"open.v1"` - Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Columns) Reset() { - *x = Columns{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Columns) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Columns) ProtoMessage() {} - -func (x *Columns) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Columns.ProtoReflect.Descriptor instead. -func (*Columns) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{14} -} - -func (x *Columns) GetNames() []string { - if x != nil { - return x.Names - } - return nil -} - -// Column is one column of a batch. Values are typed individually, as -// SQLite types them, so a column may mix classes: walk `types` and take the next -// entry from the matching array. A NULL occupies a tag only. -type Column struct { - state protoimpl.MessageState `protogen:"open.v1"` - Types []byte `protobuf:"bytes,1,opt,name=types,proto3" json:"types,omitempty"` // one ValueType per row - Ints []int64 `protobuf:"zigzag64,2,rep,packed,name=ints,proto3" json:"ints,omitempty"` - Doubles []float64 `protobuf:"fixed64,3,rep,packed,name=doubles,proto3" json:"doubles,omitempty"` - // Values concatenated, one exclusive end offset each: value i is - // data[ends[i-1]:ends[i]], with 0 implied before the first. - TextData []byte `protobuf:"bytes,4,opt,name=text_data,json=textData,proto3" json:"text_data,omitempty"` - TextEnds []uint32 `protobuf:"varint,5,rep,packed,name=text_ends,json=textEnds,proto3" json:"text_ends,omitempty"` - BlobData []byte `protobuf:"bytes,6,opt,name=blob_data,json=blobData,proto3" json:"blob_data,omitempty"` - BlobEnds []uint32 `protobuf:"varint,7,rep,packed,name=blob_ends,json=blobEnds,proto3" json:"blob_ends,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Column) Reset() { - *x = Column{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Column) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Column) ProtoMessage() {} - -func (x *Column) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Column.ProtoReflect.Descriptor instead. -func (*Column) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{15} -} - -func (x *Column) GetTypes() []byte { - if x != nil { - return x.Types - } - return nil -} - -func (x *Column) GetInts() []int64 { - if x != nil { - return x.Ints - } - return nil -} - -func (x *Column) GetDoubles() []float64 { - if x != nil { - return x.Doubles - } - return nil -} - -func (x *Column) GetTextData() []byte { - if x != nil { - return x.TextData - } - return nil -} - -func (x *Column) GetTextEnds() []uint32 { - if x != nil { - return x.TextEnds - } - return nil -} - -func (x *Column) GetBlobData() []byte { - if x != nil { - return x.BlobData - } - return nil -} - -func (x *Column) GetBlobEnds() []uint32 { - if x != nil { - return x.BlobEnds - } - return nil -} - -type ColumnBatch struct { - state protoimpl.MessageState `protogen:"open.v1"` - Columns []*Column `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` // one per column of Columns - Rows uint32 `protobuf:"varint,2,opt,name=rows,proto3" json:"rows,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ColumnBatch) Reset() { - *x = ColumnBatch{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ColumnBatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ColumnBatch) ProtoMessage() {} - -func (x *ColumnBatch) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[16] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ColumnBatch.ProtoReflect.Descriptor instead. -func (*ColumnBatch) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{16} -} - -func (x *ColumnBatch) GetColumns() []*Column { - if x != nil { - return x.Columns - } - return nil -} - -func (x *ColumnBatch) GetRows() uint32 { - if x != nil { - return x.Rows - } - return 0 -} - -type ExecResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - RowsAffected int64 `protobuf:"varint,1,opt,name=rows_affected,json=rowsAffected,proto3" json:"rows_affected,omitempty"` - LastInsertId int64 `protobuf:"varint,2,opt,name=last_insert_id,json=lastInsertId,proto3" json:"last_insert_id,omitempty"` - Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // durable commit sequence after this exec - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ExecResult) Reset() { - *x = ExecResult{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ExecResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExecResult) ProtoMessage() {} - -func (x *ExecResult) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[17] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExecResult.ProtoReflect.Descriptor instead. -func (*ExecResult) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{17} -} - -func (x *ExecResult) GetRowsAffected() int64 { - if x != nil { - return x.RowsAffected - } - return 0 -} - -func (x *ExecResult) GetLastInsertId() int64 { - if x != nil { - return x.LastInsertId - } - return 0 -} - -func (x *ExecResult) GetTip() int64 { - if x != nil { - return x.Tip - } - return 0 -} - -type Done struct { - state protoimpl.MessageState `protogen:"open.v1"` - Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // snapshot the query ran at - TotalRows uint64 `protobuf:"varint,2,opt,name=total_rows,json=totalRows,proto3" json:"total_rows,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Done) Reset() { - *x = Done{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Done) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Done) ProtoMessage() {} - -func (x *Done) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[18] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Done.ProtoReflect.Descriptor instead. -func (*Done) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{18} -} - -func (x *Done) GetTip() int64 { - if x != nil { - return x.Tip - } - return 0 -} - -func (x *Done) GetTotalRows() uint64 { - if x != nil { - return x.TotalRows - } - return 0 -} - -type Error struct { - state protoimpl.MessageState `protogen:"open.v1"` - Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // stable machine-readable code - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Error) Reset() { - *x = Error{} - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Error) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Error) ProtoMessage() {} - -func (x *Error) ProtoReflect() protoreflect.Message { - mi := &file_agentdb_livekit_agentdb_data_proto_msgTypes[19] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Error.ProtoReflect.Descriptor instead. -func (*Error) Descriptor() ([]byte, []int) { - return file_agentdb_livekit_agentdb_data_proto_rawDescGZIP(), []int{19} -} - -func (x *Error) GetCode() string { - if x != nil { - return x.Code - } - return "" -} - -func (x *Error) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -var File_agentdb_livekit_agentdb_data_proto protoreflect.FileDescriptor - -const file_agentdb_livekit_agentdb_data_proto_rawDesc = "" + - "\n" + - "\"agentdb/livekit_agentdb_data.proto\x12\x0flivekit.agentdb\"\xae\x04\n" + - "\rClientMessage\x12\x1d\n" + - "\n" + - "request_id\x18\x01 \x01(\rR\trequestId\x12.\n" + - "\x05hello\x18\x02 \x01(\v2\x16.livekit.agentdb.HelloH\x00R\x05hello\x120\n" + - "\x04exec\x18\x03 \x01(\v2\x1a.livekit.agentdb.StatementH\x00R\x04exec\x122\n" + - "\x05query\x18\x04 \x01(\v2\x1a.livekit.agentdb.StatementH\x00R\x05query\x12.\n" + - "\x05batch\x18\x05 \x01(\v2\x16.livekit.agentdb.BatchH\x00R\x05batch\x12.\n" + - "\x05begin\x18\x06 \x01(\v2\x16.livekit.agentdb.BeginH\x00R\x05begin\x121\n" + - "\x06commit\x18\a \x01(\v2\x17.livekit.agentdb.CommitH\x00R\x06commit\x127\n" + - "\brollback\x18\b \x01(\v2\x19.livekit.agentdb.RollbackH\x00R\brollback\x121\n" + - "\x06cancel\x18\t \x01(\v2\x17.livekit.agentdb.CancelH\x00R\x06cancel\x121\n" + - "\x06credit\x18\n" + - " \x01(\v2\x17.livekit.agentdb.CreditH\x00R\x06credit\x12+\n" + - "\x04ping\x18\v \x01(\v2\x15.livekit.agentdb.PingH\x00R\x04pingB\t\n" + - "\amessage\"\xb3\x03\n" + - "\rServerMessage\x12\x1d\n" + - "\n" + - "request_id\x18\x01 \x01(\rR\trequestId\x125\n" + - "\bhello_ok\x18\x02 \x01(\v2\x18.livekit.agentdb.HelloOkH\x00R\ahelloOk\x124\n" + - "\acolumns\x18\x03 \x01(\v2\x18.livekit.agentdb.ColumnsH\x00R\acolumns\x12A\n" + - "\fcolumn_batch\x18\x04 \x01(\v2\x1c.livekit.agentdb.ColumnBatchH\x00R\vcolumnBatch\x12>\n" + - "\vexec_result\x18\x05 \x01(\v2\x1b.livekit.agentdb.ExecResultH\x00R\n" + - "execResult\x12+\n" + - "\x04done\x18\x06 \x01(\v2\x15.livekit.agentdb.DoneH\x00R\x04done\x12.\n" + - "\x05error\x18\a \x01(\v2\x16.livekit.agentdb.ErrorH\x00R\x05error\x12+\n" + - "\x04pong\x18\b \x01(\v2\x15.livekit.agentdb.PongH\x00R\x04pongB\t\n" + - "\amessage\"\xb7\x01\n" + - "\x05Value\x12\x1f\n" + - "\n" + - "null_value\x18\x01 \x01(\bH\x00R\tnullValue\x12\x1d\n" + - "\tint_value\x18\x02 \x01(\x03H\x00R\bintValue\x12#\n" + - "\fdouble_value\x18\x03 \x01(\x01H\x00R\vdoubleValue\x12\x1f\n" + - "\n" + - "text_value\x18\x04 \x01(\tH\x00R\ttextValue\x12\x1f\n" + - "\n" + - "blob_value\x18\x05 \x01(\fH\x00R\tblobValueB\a\n" + - "\x05value\"}\n" + - "\tStatement\x12\x10\n" + - "\x03sql\x18\x01 \x01(\tR\x03sql\x12.\n" + - "\x06params\x18\x02 \x03(\v2\x16.livekit.agentdb.ValueR\x06params\x12.\n" + - "\x04lang\x18\x03 \x01(\x0e2\x1a.livekit.agentdb.QueryLangR\x04lang\"C\n" + - "\x05Batch\x12:\n" + - "\n" + - "statements\x18\x01 \x03(\v2\x1a.livekit.agentdb.StatementR\n" + - "statements\"\a\n" + - "\x05Begin\"\b\n" + - "\x06Commit\"\n" + - "\n" + - "\bRollback\"\b\n" + - "\x06Cancel\"\"\n" + - "\x06Credit\x12\x18\n" + - "\abatches\x18\x01 \x01(\rR\abatches\"$\n" + - "\x04Ping\x12\x1c\n" + - "\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\"T\n" + - "\x04Pong\x12.\n" + - "\x13last_ping_timestamp\x18\x01 \x01(\x03R\x11lastPingTimestamp\x12\x1c\n" + - "\ttimestamp\x18\x02 \x01(\x03R\ttimestamp\">\n" + - "\x05Hello\x12\x14\n" + - "\x05token\x18\x01 \x01(\tR\x05token\x12\x1f\n" + - "\vdatabase_id\x18\x02 \x01(\tR\n" + - "databaseId\"m\n" + - "\aHelloOk\x12\x10\n" + - "\x03tip\x18\x01 \x01(\x03R\x03tip\x12(\n" + - "\x10ping_interval_ms\x18\x02 \x01(\rR\x0epingIntervalMs\x12&\n" + - "\x0fping_timeout_ms\x18\x03 \x01(\rR\rpingTimeoutMs\"\x1f\n" + - "\aColumns\x12\x14\n" + - "\x05names\x18\x01 \x03(\tR\x05names\"\xc0\x01\n" + - "\x06Column\x12\x14\n" + - "\x05types\x18\x01 \x01(\fR\x05types\x12\x12\n" + - "\x04ints\x18\x02 \x03(\x12R\x04ints\x12\x18\n" + - "\adoubles\x18\x03 \x03(\x01R\adoubles\x12\x1b\n" + - "\ttext_data\x18\x04 \x01(\fR\btextData\x12\x1b\n" + - "\ttext_ends\x18\x05 \x03(\rR\btextEnds\x12\x1b\n" + - "\tblob_data\x18\x06 \x01(\fR\bblobData\x12\x1b\n" + - "\tblob_ends\x18\a \x03(\rR\bblobEnds\"T\n" + - "\vColumnBatch\x121\n" + - "\acolumns\x18\x01 \x03(\v2\x17.livekit.agentdb.ColumnR\acolumns\x12\x12\n" + - "\x04rows\x18\x02 \x01(\rR\x04rows\"i\n" + - "\n" + - "ExecResult\x12#\n" + - "\rrows_affected\x18\x01 \x01(\x03R\frowsAffected\x12$\n" + - "\x0elast_insert_id\x18\x02 \x01(\x03R\flastInsertId\x12\x10\n" + - "\x03tip\x18\x03 \x01(\x03R\x03tip\"7\n" + - "\x04Done\x12\x10\n" + - "\x03tip\x18\x01 \x01(\x03R\x03tip\x12\x1d\n" + - "\n" + - "total_rows\x18\x02 \x01(\x04R\ttotalRows\"5\n" + - "\x05Error\x12\x12\n" + - "\x04code\x18\x01 \x01(\tR\x04code\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage*6\n" + - "\tQueryLang\x12\x12\n" + - "\x0eQUERY_LANG_SQL\x10\x00\x12\x15\n" + - "\x11QUERY_LANG_CYPHER\x10\x01*u\n" + - "\tValueType\x12\x13\n" + - "\x0fVALUE_TYPE_NULL\x10\x00\x12\x12\n" + - "\x0eVALUE_TYPE_INT\x10\x01\x12\x15\n" + - "\x11VALUE_TYPE_DOUBLE\x10\x02\x12\x13\n" + - "\x0fVALUE_TYPE_TEXT\x10\x03\x12\x13\n" + - "\x0fVALUE_TYPE_BLOB\x10\x04BNZ+github.com/livekit/protocol/livekit/agentdb\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" - -var ( - file_agentdb_livekit_agentdb_data_proto_rawDescOnce sync.Once - file_agentdb_livekit_agentdb_data_proto_rawDescData []byte -) - -func file_agentdb_livekit_agentdb_data_proto_rawDescGZIP() []byte { - file_agentdb_livekit_agentdb_data_proto_rawDescOnce.Do(func() { - file_agentdb_livekit_agentdb_data_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_agentdb_livekit_agentdb_data_proto_rawDesc), len(file_agentdb_livekit_agentdb_data_proto_rawDesc))) - }) - return file_agentdb_livekit_agentdb_data_proto_rawDescData -} - -var file_agentdb_livekit_agentdb_data_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_agentdb_livekit_agentdb_data_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_agentdb_livekit_agentdb_data_proto_goTypes = []any{ - (QueryLang)(0), // 0: livekit.agentdb.QueryLang - (ValueType)(0), // 1: livekit.agentdb.ValueType - (*ClientMessage)(nil), // 2: livekit.agentdb.ClientMessage - (*ServerMessage)(nil), // 3: livekit.agentdb.ServerMessage - (*Value)(nil), // 4: livekit.agentdb.Value - (*Statement)(nil), // 5: livekit.agentdb.Statement - (*Batch)(nil), // 6: livekit.agentdb.Batch - (*Begin)(nil), // 7: livekit.agentdb.Begin - (*Commit)(nil), // 8: livekit.agentdb.Commit - (*Rollback)(nil), // 9: livekit.agentdb.Rollback - (*Cancel)(nil), // 10: livekit.agentdb.Cancel - (*Credit)(nil), // 11: livekit.agentdb.Credit - (*Ping)(nil), // 12: livekit.agentdb.Ping - (*Pong)(nil), // 13: livekit.agentdb.Pong - (*Hello)(nil), // 14: livekit.agentdb.Hello - (*HelloOk)(nil), // 15: livekit.agentdb.HelloOk - (*Columns)(nil), // 16: livekit.agentdb.Columns - (*Column)(nil), // 17: livekit.agentdb.Column - (*ColumnBatch)(nil), // 18: livekit.agentdb.ColumnBatch - (*ExecResult)(nil), // 19: livekit.agentdb.ExecResult - (*Done)(nil), // 20: livekit.agentdb.Done - (*Error)(nil), // 21: livekit.agentdb.Error -} -var file_agentdb_livekit_agentdb_data_proto_depIdxs = []int32{ - 14, // 0: livekit.agentdb.ClientMessage.hello:type_name -> livekit.agentdb.Hello - 5, // 1: livekit.agentdb.ClientMessage.exec:type_name -> livekit.agentdb.Statement - 5, // 2: livekit.agentdb.ClientMessage.query:type_name -> livekit.agentdb.Statement - 6, // 3: livekit.agentdb.ClientMessage.batch:type_name -> livekit.agentdb.Batch - 7, // 4: livekit.agentdb.ClientMessage.begin:type_name -> livekit.agentdb.Begin - 8, // 5: livekit.agentdb.ClientMessage.commit:type_name -> livekit.agentdb.Commit - 9, // 6: livekit.agentdb.ClientMessage.rollback:type_name -> livekit.agentdb.Rollback - 10, // 7: livekit.agentdb.ClientMessage.cancel:type_name -> livekit.agentdb.Cancel - 11, // 8: livekit.agentdb.ClientMessage.credit:type_name -> livekit.agentdb.Credit - 12, // 9: livekit.agentdb.ClientMessage.ping:type_name -> livekit.agentdb.Ping - 15, // 10: livekit.agentdb.ServerMessage.hello_ok:type_name -> livekit.agentdb.HelloOk - 16, // 11: livekit.agentdb.ServerMessage.columns:type_name -> livekit.agentdb.Columns - 18, // 12: livekit.agentdb.ServerMessage.column_batch:type_name -> livekit.agentdb.ColumnBatch - 19, // 13: livekit.agentdb.ServerMessage.exec_result:type_name -> livekit.agentdb.ExecResult - 20, // 14: livekit.agentdb.ServerMessage.done:type_name -> livekit.agentdb.Done - 21, // 15: livekit.agentdb.ServerMessage.error:type_name -> livekit.agentdb.Error - 13, // 16: livekit.agentdb.ServerMessage.pong:type_name -> livekit.agentdb.Pong - 4, // 17: livekit.agentdb.Statement.params:type_name -> livekit.agentdb.Value - 0, // 18: livekit.agentdb.Statement.lang:type_name -> livekit.agentdb.QueryLang - 5, // 19: livekit.agentdb.Batch.statements:type_name -> livekit.agentdb.Statement - 17, // 20: livekit.agentdb.ColumnBatch.columns:type_name -> livekit.agentdb.Column - 21, // [21:21] is the sub-list for method output_type - 21, // [21:21] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name -} - -func init() { file_agentdb_livekit_agentdb_data_proto_init() } -func file_agentdb_livekit_agentdb_data_proto_init() { - if File_agentdb_livekit_agentdb_data_proto != nil { - return - } - file_agentdb_livekit_agentdb_data_proto_msgTypes[0].OneofWrappers = []any{ - (*ClientMessage_Hello)(nil), - (*ClientMessage_Exec)(nil), - (*ClientMessage_Query)(nil), - (*ClientMessage_Batch)(nil), - (*ClientMessage_Begin)(nil), - (*ClientMessage_Commit)(nil), - (*ClientMessage_Rollback)(nil), - (*ClientMessage_Cancel)(nil), - (*ClientMessage_Credit)(nil), - (*ClientMessage_Ping)(nil), - } - file_agentdb_livekit_agentdb_data_proto_msgTypes[1].OneofWrappers = []any{ - (*ServerMessage_HelloOk)(nil), - (*ServerMessage_Columns)(nil), - (*ServerMessage_ColumnBatch)(nil), - (*ServerMessage_ExecResult)(nil), - (*ServerMessage_Done)(nil), - (*ServerMessage_Error)(nil), - (*ServerMessage_Pong)(nil), - } - file_agentdb_livekit_agentdb_data_proto_msgTypes[2].OneofWrappers = []any{ - (*Value_NullValue)(nil), - (*Value_IntValue)(nil), - (*Value_DoubleValue)(nil), - (*Value_TextValue)(nil), - (*Value_BlobValue)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_agentdb_livekit_agentdb_data_proto_rawDesc), len(file_agentdb_livekit_agentdb_data_proto_rawDesc)), - NumEnums: 2, - NumMessages: 20, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_agentdb_livekit_agentdb_data_proto_goTypes, - DependencyIndexes: file_agentdb_livekit_agentdb_data_proto_depIdxs, - EnumInfos: file_agentdb_livekit_agentdb_data_proto_enumTypes, - MessageInfos: file_agentdb_livekit_agentdb_data_proto_msgTypes, - }.Build() - File_agentdb_livekit_agentdb_data_proto = out.File - file_agentdb_livekit_agentdb_data_proto_goTypes = nil - file_agentdb_livekit_agentdb_data_proto_depIdxs = nil -} diff --git a/livekit/livekit_agent_simulation.twirp.go b/livekit/livekit_agent_simulation.twirp.go index b2d752787..79ee02cf0 100644 --- a/livekit/livekit_agent_simulation.twirp.go +++ b/livekit/livekit_agent_simulation.twirp.go @@ -1897,7 +1897,7 @@ func (s *agentSimulationServer) serveCreateScenarioFromSessionProtobuf(ctx conte } func (s *agentSimulationServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor9, 0 + return twirpFileDescriptor10, 0 } func (s *agentSimulationServer) ProtocGenTwirpVersion() string { @@ -1911,7 +1911,7 @@ func (s *agentSimulationServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "AgentSimulation") } -var twirpFileDescriptor9 = []byte{ +var twirpFileDescriptor10 = []byte{ // 3365 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0x49, 0x76, 0x37, 0x3f, 0x45, 0x3e, 0x8a, 0x1f, 0x2a, 0xc9, 0x32, 0xdd, 0xb3, 0x9e, 0x91, 0x3d, 0x33, diff --git a/livekit/livekit_agentdb.pb.go b/livekit/livekit_agentdb.pb.go new file mode 100644 index 000000000..252819264 --- /dev/null +++ b/livekit/livekit_agentdb.pb.go @@ -0,0 +1,2462 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v7.34.1 +// source: livekit_agentdb.proto + +package livekit + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// QueryLang selects the query language of a statement; both execute +// against the same database. +type AgentDB_QueryLang int32 + +const ( + AgentDB_QUERY_LANG_SQL AgentDB_QueryLang = 0 + AgentDB_QUERY_LANG_CYPHER AgentDB_QueryLang = 1 +) + +// Enum value maps for AgentDB_QueryLang. +var ( + AgentDB_QueryLang_name = map[int32]string{ + 0: "QUERY_LANG_SQL", + 1: "QUERY_LANG_CYPHER", + } + AgentDB_QueryLang_value = map[string]int32{ + "QUERY_LANG_SQL": 0, + "QUERY_LANG_CYPHER": 1, + } +) + +func (x AgentDB_QueryLang) Enum() *AgentDB_QueryLang { + p := new(AgentDB_QueryLang) + *p = x + return p +} + +func (x AgentDB_QueryLang) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AgentDB_QueryLang) Descriptor() protoreflect.EnumDescriptor { + return file_livekit_agentdb_proto_enumTypes[0].Descriptor() +} + +func (AgentDB_QueryLang) Type() protoreflect.EnumType { + return &file_livekit_agentdb_proto_enumTypes[0] +} + +func (x AgentDB_QueryLang) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AgentDB_QueryLang.Descriptor instead. +func (AgentDB_QueryLang) EnumDescriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 0} +} + +// ValueType tags one value's storage class within a Column. +type AgentDB_ValueType int32 + +const ( + AgentDB_VALUE_TYPE_NULL AgentDB_ValueType = 0 + AgentDB_VALUE_TYPE_INT AgentDB_ValueType = 1 + AgentDB_VALUE_TYPE_DOUBLE AgentDB_ValueType = 2 + AgentDB_VALUE_TYPE_TEXT AgentDB_ValueType = 3 + AgentDB_VALUE_TYPE_BLOB AgentDB_ValueType = 4 +) + +// Enum value maps for AgentDB_ValueType. +var ( + AgentDB_ValueType_name = map[int32]string{ + 0: "VALUE_TYPE_NULL", + 1: "VALUE_TYPE_INT", + 2: "VALUE_TYPE_DOUBLE", + 3: "VALUE_TYPE_TEXT", + 4: "VALUE_TYPE_BLOB", + } + AgentDB_ValueType_value = map[string]int32{ + "VALUE_TYPE_NULL": 0, + "VALUE_TYPE_INT": 1, + "VALUE_TYPE_DOUBLE": 2, + "VALUE_TYPE_TEXT": 3, + "VALUE_TYPE_BLOB": 4, + } +) + +func (x AgentDB_ValueType) Enum() *AgentDB_ValueType { + p := new(AgentDB_ValueType) + *p = x + return p +} + +func (x AgentDB_ValueType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AgentDB_ValueType) Descriptor() protoreflect.EnumDescriptor { + return file_livekit_agentdb_proto_enumTypes[1].Descriptor() +} + +func (AgentDB_ValueType) Type() protoreflect.EnumType { + return &file_livekit_agentdb_proto_enumTypes[1] +} + +func (x AgentDB_ValueType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AgentDB_ValueType.Descriptor instead. +func (AgentDB_ValueType) EnumDescriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 1} +} + +// AgentDB nests every message this service and its data plane use, so names +// like Value and Ping do not have to be unique across the whole livekit +// package (the DataStream container does the same). +type AgentDB struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB) Reset() { + *x = AgentDB{} + mi := &file_livekit_agentdb_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB) ProtoMessage() {} + +func (x *AgentDB) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB.ProtoReflect.Descriptor instead. +func (*AgentDB) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0} +} + +type AgentDB_CreateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` + UserAttributes string `protobuf:"bytes,2,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` // opaque JSON metadata for the caller + TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` // unset: never expires. Otherwise clamped to the server cap, and never extended + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_CreateRequest) Reset() { + *x = AgentDB_CreateRequest{} + mi := &file_livekit_agentdb_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_CreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_CreateRequest) ProtoMessage() {} + +func (x *AgentDB_CreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_CreateRequest.ProtoReflect.Descriptor instead. +func (*AgentDB_CreateRequest) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *AgentDB_CreateRequest) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *AgentDB_CreateRequest) GetUserAttributes() string { + if x != nil { + return x.UserAttributes + } + return "" +} + +func (x *AgentDB_CreateRequest) GetTtlSeconds() int64 { + if x != nil { + return x.TtlSeconds + } + return 0 +} + +type AgentDB_CreateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` // "DB_..." + ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_CreateResponse) Reset() { + *x = AgentDB_CreateResponse{} + mi := &file_livekit_agentdb_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_CreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_CreateResponse) ProtoMessage() {} + +func (x *AgentDB_CreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_CreateResponse.ProtoReflect.Descriptor instead. +func (*AgentDB_CreateResponse) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *AgentDB_CreateResponse) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +func (x *AgentDB_CreateResponse) GetExpiresAtUnix() int64 { + if x != nil { + return x.ExpiresAtUnix + } + return 0 +} + +type AgentDB_GetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_GetRequest) Reset() { + *x = AgentDB_GetRequest{} + mi := &file_livekit_agentdb_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_GetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_GetRequest) ProtoMessage() {} + +func (x *AgentDB_GetRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_GetRequest.ProtoReflect.Descriptor instead. +func (*AgentDB_GetRequest) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *AgentDB_GetRequest) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +type AgentDB_GetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` + CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` + ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires + Tip int64 `protobuf:"varint,6,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_GetResponse) Reset() { + *x = AgentDB_GetResponse{} + mi := &file_livekit_agentdb_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_GetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_GetResponse) ProtoMessage() {} + +func (x *AgentDB_GetResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_GetResponse.ProtoReflect.Descriptor instead. +func (*AgentDB_GetResponse) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 3} +} + +func (x *AgentDB_GetResponse) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +func (x *AgentDB_GetResponse) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *AgentDB_GetResponse) GetUserAttributes() string { + if x != nil { + return x.UserAttributes + } + return "" +} + +func (x *AgentDB_GetResponse) GetCreatedAtUnix() int64 { + if x != nil { + return x.CreatedAtUnix + } + return 0 +} + +func (x *AgentDB_GetResponse) GetExpiresAtUnix() int64 { + if x != nil { + return x.ExpiresAtUnix + } + return 0 +} + +func (x *AgentDB_GetResponse) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +type AgentDB_ListRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // server-clamped + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // opaque cursor from a previous response + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_ListRequest) Reset() { + *x = AgentDB_ListRequest{} + mi := &file_livekit_agentdb_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_ListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_ListRequest) ProtoMessage() {} + +func (x *AgentDB_ListRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_ListRequest.ProtoReflect.Descriptor instead. +func (*AgentDB_ListRequest) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 4} +} + +func (x *AgentDB_ListRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *AgentDB_ListRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type AgentDB_ListResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Databases []*AgentDB_Summary `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // empty when exhausted + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_ListResponse) Reset() { + *x = AgentDB_ListResponse{} + mi := &file_livekit_agentdb_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_ListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_ListResponse) ProtoMessage() {} + +func (x *AgentDB_ListResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_ListResponse.ProtoReflect.Descriptor instead. +func (*AgentDB_ListResponse) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 5} +} + +func (x *AgentDB_ListResponse) GetDatabases() []*AgentDB_Summary { + if x != nil { + return x.Databases + } + return nil +} + +func (x *AgentDB_ListResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Summary is a database's immutable fields. No tip: it changes on every +// commit, so call GetDatabase for it. +type AgentDB_Summary struct { + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` + CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` + ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Summary) Reset() { + *x = AgentDB_Summary{} + mi := &file_livekit_agentdb_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Summary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Summary) ProtoMessage() {} + +func (x *AgentDB_Summary) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Summary.ProtoReflect.Descriptor instead. +func (*AgentDB_Summary) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 6} +} + +func (x *AgentDB_Summary) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +func (x *AgentDB_Summary) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *AgentDB_Summary) GetUserAttributes() string { + if x != nil { + return x.UserAttributes + } + return "" +} + +func (x *AgentDB_Summary) GetCreatedAtUnix() int64 { + if x != nil { + return x.CreatedAtUnix + } + return 0 +} + +func (x *AgentDB_Summary) GetExpiresAtUnix() int64 { + if x != nil { + return x.ExpiresAtUnix + } + return 0 +} + +type AgentDB_DeleteRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_DeleteRequest) Reset() { + *x = AgentDB_DeleteRequest{} + mi := &file_livekit_agentdb_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_DeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_DeleteRequest) ProtoMessage() {} + +func (x *AgentDB_DeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_DeleteRequest.ProtoReflect.Descriptor instead. +func (*AgentDB_DeleteRequest) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 7} +} + +func (x *AgentDB_DeleteRequest) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +type AgentDB_DeleteResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_DeleteResponse) Reset() { + *x = AgentDB_DeleteResponse{} + mi := &file_livekit_agentdb_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_DeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_DeleteResponse) ProtoMessage() {} + +func (x *AgentDB_DeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_DeleteResponse.ProtoReflect.Descriptor instead. +func (*AgentDB_DeleteResponse) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 8} +} + +type AgentDB_DumpRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_DumpRequest) Reset() { + *x = AgentDB_DumpRequest{} + mi := &file_livekit_agentdb_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_DumpRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_DumpRequest) ProtoMessage() {} + +func (x *AgentDB_DumpRequest) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_DumpRequest.ProtoReflect.Descriptor instead. +func (*AgentDB_DumpRequest) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 9} +} + +func (x *AgentDB_DumpRequest) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +type AgentDB_DumpResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + DownloadUrl string `protobuf:"bytes,1,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"` // pre-authenticated object-storage URL + ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // URL expiry + Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // commit sequence the dump is consistent at + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_DumpResponse) Reset() { + *x = AgentDB_DumpResponse{} + mi := &file_livekit_agentdb_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_DumpResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_DumpResponse) ProtoMessage() {} + +func (x *AgentDB_DumpResponse) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_DumpResponse.ProtoReflect.Descriptor instead. +func (*AgentDB_DumpResponse) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10} +} + +func (x *AgentDB_DumpResponse) GetDownloadUrl() string { + if x != nil { + return x.DownloadUrl + } + return "" +} + +func (x *AgentDB_DumpResponse) GetExpiresAtUnix() int64 { + if x != nil { + return x.ExpiresAtUnix + } + return 0 +} + +func (x *AgentDB_DumpResponse) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +type AgentDB_ClientMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Types that are valid to be assigned to Message: + // + // *AgentDB_ClientMessage_Hello + // *AgentDB_ClientMessage_Exec + // *AgentDB_ClientMessage_Query + // *AgentDB_ClientMessage_Batch + // *AgentDB_ClientMessage_Begin + // *AgentDB_ClientMessage_Commit + // *AgentDB_ClientMessage_Rollback + // *AgentDB_ClientMessage_Cancel + // *AgentDB_ClientMessage_Credit + // *AgentDB_ClientMessage_Ping + Message isAgentDB_ClientMessage_Message `protobuf_oneof:"message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_ClientMessage) Reset() { + *x = AgentDB_ClientMessage{} + mi := &file_livekit_agentdb_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_ClientMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_ClientMessage) ProtoMessage() {} + +func (x *AgentDB_ClientMessage) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_ClientMessage.ProtoReflect.Descriptor instead. +func (*AgentDB_ClientMessage) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11} +} + +func (x *AgentDB_ClientMessage) GetRequestId() uint32 { + if x != nil { + return x.RequestId + } + return 0 +} + +func (x *AgentDB_ClientMessage) GetMessage() isAgentDB_ClientMessage_Message { + if x != nil { + return x.Message + } + return nil +} + +func (x *AgentDB_ClientMessage) GetHello() *AgentDB_Hello { + if x != nil { + if x, ok := x.Message.(*AgentDB_ClientMessage_Hello); ok { + return x.Hello + } + } + return nil +} + +func (x *AgentDB_ClientMessage) GetExec() *AgentDB_Statement { + if x != nil { + if x, ok := x.Message.(*AgentDB_ClientMessage_Exec); ok { + return x.Exec + } + } + return nil +} + +func (x *AgentDB_ClientMessage) GetQuery() *AgentDB_Statement { + if x != nil { + if x, ok := x.Message.(*AgentDB_ClientMessage_Query); ok { + return x.Query + } + } + return nil +} + +func (x *AgentDB_ClientMessage) GetBatch() *AgentDB_Batch { + if x != nil { + if x, ok := x.Message.(*AgentDB_ClientMessage_Batch); ok { + return x.Batch + } + } + return nil +} + +func (x *AgentDB_ClientMessage) GetBegin() *AgentDB_Begin { + if x != nil { + if x, ok := x.Message.(*AgentDB_ClientMessage_Begin); ok { + return x.Begin + } + } + return nil +} + +func (x *AgentDB_ClientMessage) GetCommit() *AgentDB_Commit { + if x != nil { + if x, ok := x.Message.(*AgentDB_ClientMessage_Commit); ok { + return x.Commit + } + } + return nil +} + +func (x *AgentDB_ClientMessage) GetRollback() *AgentDB_Rollback { + if x != nil { + if x, ok := x.Message.(*AgentDB_ClientMessage_Rollback); ok { + return x.Rollback + } + } + return nil +} + +func (x *AgentDB_ClientMessage) GetCancel() *AgentDB_Cancel { + if x != nil { + if x, ok := x.Message.(*AgentDB_ClientMessage_Cancel); ok { + return x.Cancel + } + } + return nil +} + +func (x *AgentDB_ClientMessage) GetCredit() *AgentDB_Credit { + if x != nil { + if x, ok := x.Message.(*AgentDB_ClientMessage_Credit); ok { + return x.Credit + } + } + return nil +} + +func (x *AgentDB_ClientMessage) GetPing() *AgentDB_Ping { + if x != nil { + if x, ok := x.Message.(*AgentDB_ClientMessage_Ping); ok { + return x.Ping + } + } + return nil +} + +type isAgentDB_ClientMessage_Message interface { + isAgentDB_ClientMessage_Message() +} + +type AgentDB_ClientMessage_Hello struct { + Hello *AgentDB_Hello `protobuf:"bytes,2,opt,name=hello,proto3,oneof"` // must be first on the socket +} + +type AgentDB_ClientMessage_Exec struct { + Exec *AgentDB_Statement `protobuf:"bytes,3,opt,name=exec,proto3,oneof"` // no result rows; answers ExecResult +} + +type AgentDB_ClientMessage_Query struct { + Query *AgentDB_Statement `protobuf:"bytes,4,opt,name=query,proto3,oneof"` // answers Columns + ColumnBatch* + Done +} + +type AgentDB_ClientMessage_Batch struct { + Batch *AgentDB_Batch `protobuf:"bytes,5,opt,name=batch,proto3,oneof"` // atomic multi-statement exec +} + +type AgentDB_ClientMessage_Begin struct { + Begin *AgentDB_Begin `protobuf:"bytes,6,opt,name=begin,proto3,oneof"` // interactive transaction (server enforces idle/duration timeouts) +} + +type AgentDB_ClientMessage_Commit struct { + Commit *AgentDB_Commit `protobuf:"bytes,7,opt,name=commit,proto3,oneof"` +} + +type AgentDB_ClientMessage_Rollback struct { + Rollback *AgentDB_Rollback `protobuf:"bytes,8,opt,name=rollback,proto3,oneof"` +} + +type AgentDB_ClientMessage_Cancel struct { + Cancel *AgentDB_Cancel `protobuf:"bytes,9,opt,name=cancel,proto3,oneof"` // stop a running query's stream/cursor +} + +type AgentDB_ClientMessage_Credit struct { + Credit *AgentDB_Credit `protobuf:"bytes,10,opt,name=credit,proto3,oneof"` // grant more batch credits for request_id +} + +type AgentDB_ClientMessage_Ping struct { + Ping *AgentDB_Ping `protobuf:"bytes,11,opt,name=ping,proto3,oneof"` +} + +func (*AgentDB_ClientMessage_Hello) isAgentDB_ClientMessage_Message() {} + +func (*AgentDB_ClientMessage_Exec) isAgentDB_ClientMessage_Message() {} + +func (*AgentDB_ClientMessage_Query) isAgentDB_ClientMessage_Message() {} + +func (*AgentDB_ClientMessage_Batch) isAgentDB_ClientMessage_Message() {} + +func (*AgentDB_ClientMessage_Begin) isAgentDB_ClientMessage_Message() {} + +func (*AgentDB_ClientMessage_Commit) isAgentDB_ClientMessage_Message() {} + +func (*AgentDB_ClientMessage_Rollback) isAgentDB_ClientMessage_Message() {} + +func (*AgentDB_ClientMessage_Cancel) isAgentDB_ClientMessage_Message() {} + +func (*AgentDB_ClientMessage_Credit) isAgentDB_ClientMessage_Message() {} + +func (*AgentDB_ClientMessage_Ping) isAgentDB_ClientMessage_Message() {} + +type AgentDB_ServerMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Types that are valid to be assigned to Message: + // + // *AgentDB_ServerMessage_HelloOk + // *AgentDB_ServerMessage_Columns + // *AgentDB_ServerMessage_ColumnBatch + // *AgentDB_ServerMessage_ExecResult + // *AgentDB_ServerMessage_Done + // *AgentDB_ServerMessage_Error + // *AgentDB_ServerMessage_Pong + Message isAgentDB_ServerMessage_Message `protobuf_oneof:"message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_ServerMessage) Reset() { + *x = AgentDB_ServerMessage{} + mi := &file_livekit_agentdb_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_ServerMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_ServerMessage) ProtoMessage() {} + +func (x *AgentDB_ServerMessage) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_ServerMessage.ProtoReflect.Descriptor instead. +func (*AgentDB_ServerMessage) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 12} +} + +func (x *AgentDB_ServerMessage) GetRequestId() uint32 { + if x != nil { + return x.RequestId + } + return 0 +} + +func (x *AgentDB_ServerMessage) GetMessage() isAgentDB_ServerMessage_Message { + if x != nil { + return x.Message + } + return nil +} + +func (x *AgentDB_ServerMessage) GetHelloOk() *AgentDB_HelloOk { + if x != nil { + if x, ok := x.Message.(*AgentDB_ServerMessage_HelloOk); ok { + return x.HelloOk + } + } + return nil +} + +func (x *AgentDB_ServerMessage) GetColumns() *AgentDB_Columns { + if x != nil { + if x, ok := x.Message.(*AgentDB_ServerMessage_Columns); ok { + return x.Columns + } + } + return nil +} + +func (x *AgentDB_ServerMessage) GetColumnBatch() *AgentDB_ColumnBatch { + if x != nil { + if x, ok := x.Message.(*AgentDB_ServerMessage_ColumnBatch); ok { + return x.ColumnBatch + } + } + return nil +} + +func (x *AgentDB_ServerMessage) GetExecResult() *AgentDB_ExecResult { + if x != nil { + if x, ok := x.Message.(*AgentDB_ServerMessage_ExecResult); ok { + return x.ExecResult + } + } + return nil +} + +func (x *AgentDB_ServerMessage) GetDone() *AgentDB_Done { + if x != nil { + if x, ok := x.Message.(*AgentDB_ServerMessage_Done); ok { + return x.Done + } + } + return nil +} + +func (x *AgentDB_ServerMessage) GetError() *AgentDB_Error { + if x != nil { + if x, ok := x.Message.(*AgentDB_ServerMessage_Error); ok { + return x.Error + } + } + return nil +} + +func (x *AgentDB_ServerMessage) GetPong() *AgentDB_Pong { + if x != nil { + if x, ok := x.Message.(*AgentDB_ServerMessage_Pong); ok { + return x.Pong + } + } + return nil +} + +type isAgentDB_ServerMessage_Message interface { + isAgentDB_ServerMessage_Message() +} + +type AgentDB_ServerMessage_HelloOk struct { + HelloOk *AgentDB_HelloOk `protobuf:"bytes,2,opt,name=hello_ok,json=helloOk,proto3,oneof"` +} + +type AgentDB_ServerMessage_Columns struct { + Columns *AgentDB_Columns `protobuf:"bytes,3,opt,name=columns,proto3,oneof"` +} + +type AgentDB_ServerMessage_ColumnBatch struct { + ColumnBatch *AgentDB_ColumnBatch `protobuf:"bytes,4,opt,name=column_batch,json=columnBatch,proto3,oneof"` +} + +type AgentDB_ServerMessage_ExecResult struct { + ExecResult *AgentDB_ExecResult `protobuf:"bytes,5,opt,name=exec_result,json=execResult,proto3,oneof"` +} + +type AgentDB_ServerMessage_Done struct { + Done *AgentDB_Done `protobuf:"bytes,6,opt,name=done,proto3,oneof"` +} + +type AgentDB_ServerMessage_Error struct { + Error *AgentDB_Error `protobuf:"bytes,7,opt,name=error,proto3,oneof"` +} + +type AgentDB_ServerMessage_Pong struct { + Pong *AgentDB_Pong `protobuf:"bytes,8,opt,name=pong,proto3,oneof"` +} + +func (*AgentDB_ServerMessage_HelloOk) isAgentDB_ServerMessage_Message() {} + +func (*AgentDB_ServerMessage_Columns) isAgentDB_ServerMessage_Message() {} + +func (*AgentDB_ServerMessage_ColumnBatch) isAgentDB_ServerMessage_Message() {} + +func (*AgentDB_ServerMessage_ExecResult) isAgentDB_ServerMessage_Message() {} + +func (*AgentDB_ServerMessage_Done) isAgentDB_ServerMessage_Message() {} + +func (*AgentDB_ServerMessage_Error) isAgentDB_ServerMessage_Message() {} + +func (*AgentDB_ServerMessage_Pong) isAgentDB_ServerMessage_Message() {} + +// Value mirrors SQLite's five storage classes exactly. +type AgentDB_Value struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Value: + // + // *AgentDB_Value_NullValue + // *AgentDB_Value_IntValue + // *AgentDB_Value_DoubleValue + // *AgentDB_Value_TextValue + // *AgentDB_Value_BlobValue + Value isAgentDB_Value_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Value) Reset() { + *x = AgentDB_Value{} + mi := &file_livekit_agentdb_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Value) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Value) ProtoMessage() {} + +func (x *AgentDB_Value) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Value.ProtoReflect.Descriptor instead. +func (*AgentDB_Value) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 13} +} + +func (x *AgentDB_Value) GetValue() isAgentDB_Value_Value { + if x != nil { + return x.Value + } + return nil +} + +func (x *AgentDB_Value) GetNullValue() bool { + if x != nil { + if x, ok := x.Value.(*AgentDB_Value_NullValue); ok { + return x.NullValue + } + } + return false +} + +func (x *AgentDB_Value) GetIntValue() int64 { + if x != nil { + if x, ok := x.Value.(*AgentDB_Value_IntValue); ok { + return x.IntValue + } + } + return 0 +} + +func (x *AgentDB_Value) GetDoubleValue() float64 { + if x != nil { + if x, ok := x.Value.(*AgentDB_Value_DoubleValue); ok { + return x.DoubleValue + } + } + return 0 +} + +func (x *AgentDB_Value) GetTextValue() string { + if x != nil { + if x, ok := x.Value.(*AgentDB_Value_TextValue); ok { + return x.TextValue + } + } + return "" +} + +func (x *AgentDB_Value) GetBlobValue() []byte { + if x != nil { + if x, ok := x.Value.(*AgentDB_Value_BlobValue); ok { + return x.BlobValue + } + } + return nil +} + +type isAgentDB_Value_Value interface { + isAgentDB_Value_Value() +} + +type AgentDB_Value_NullValue struct { + NullValue bool `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,oneof"` // always true when set +} + +type AgentDB_Value_IntValue struct { + IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` +} + +type AgentDB_Value_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"` +} + +type AgentDB_Value_TextValue struct { + TextValue string `protobuf:"bytes,4,opt,name=text_value,json=textValue,proto3,oneof"` +} + +type AgentDB_Value_BlobValue struct { + BlobValue []byte `protobuf:"bytes,5,opt,name=blob_value,json=blobValue,proto3,oneof"` +} + +func (*AgentDB_Value_NullValue) isAgentDB_Value_Value() {} + +func (*AgentDB_Value_IntValue) isAgentDB_Value_Value() {} + +func (*AgentDB_Value_DoubleValue) isAgentDB_Value_Value() {} + +func (*AgentDB_Value_TextValue) isAgentDB_Value_Value() {} + +func (*AgentDB_Value_BlobValue) isAgentDB_Value_Value() {} + +type AgentDB_Statement struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` // statement text in the selected lang + Params []*AgentDB_Value `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` // positional bind parameters + Lang AgentDB_QueryLang `protobuf:"varint,3,opt,name=lang,proto3,enum=livekit.AgentDB_QueryLang" json:"lang,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Statement) Reset() { + *x = AgentDB_Statement{} + mi := &file_livekit_agentdb_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Statement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Statement) ProtoMessage() {} + +func (x *AgentDB_Statement) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Statement.ProtoReflect.Descriptor instead. +func (*AgentDB_Statement) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 14} +} + +func (x *AgentDB_Statement) GetSql() string { + if x != nil { + return x.Sql + } + return "" +} + +func (x *AgentDB_Statement) GetParams() []*AgentDB_Value { + if x != nil { + return x.Params + } + return nil +} + +func (x *AgentDB_Statement) GetLang() AgentDB_QueryLang { + if x != nil { + return x.Lang + } + return AgentDB_QUERY_LANG_SQL +} + +type AgentDB_Batch struct { + state protoimpl.MessageState `protogen:"open.v1"` + Statements []*AgentDB_Statement `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"` // applied atomically, in order + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Batch) Reset() { + *x = AgentDB_Batch{} + mi := &file_livekit_agentdb_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Batch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Batch) ProtoMessage() {} + +func (x *AgentDB_Batch) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Batch.ProtoReflect.Descriptor instead. +func (*AgentDB_Batch) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 15} +} + +func (x *AgentDB_Batch) GetStatements() []*AgentDB_Statement { + if x != nil { + return x.Statements + } + return nil +} + +type AgentDB_Begin struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Begin) Reset() { + *x = AgentDB_Begin{} + mi := &file_livekit_agentdb_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Begin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Begin) ProtoMessage() {} + +func (x *AgentDB_Begin) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Begin.ProtoReflect.Descriptor instead. +func (*AgentDB_Begin) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 16} +} + +type AgentDB_Commit struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Commit) Reset() { + *x = AgentDB_Commit{} + mi := &file_livekit_agentdb_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Commit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Commit) ProtoMessage() {} + +func (x *AgentDB_Commit) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Commit.ProtoReflect.Descriptor instead. +func (*AgentDB_Commit) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 17} +} + +type AgentDB_Rollback struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Rollback) Reset() { + *x = AgentDB_Rollback{} + mi := &file_livekit_agentdb_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Rollback) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Rollback) ProtoMessage() {} + +func (x *AgentDB_Rollback) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Rollback.ProtoReflect.Descriptor instead. +func (*AgentDB_Rollback) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 18} +} + +type AgentDB_Cancel struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Cancel) Reset() { + *x = AgentDB_Cancel{} + mi := &file_livekit_agentdb_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Cancel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Cancel) ProtoMessage() {} + +func (x *AgentDB_Cancel) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Cancel.ProtoReflect.Descriptor instead. +func (*AgentDB_Cancel) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 19} +} + +type AgentDB_Credit struct { + state protoimpl.MessageState `protogen:"open.v1"` + Batches uint32 `protobuf:"varint,1,opt,name=batches,proto3" json:"batches,omitempty"` // additional batch frames the client can absorb + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Credit) Reset() { + *x = AgentDB_Credit{} + mi := &file_livekit_agentdb_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Credit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Credit) ProtoMessage() {} + +func (x *AgentDB_Credit) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Credit.ProtoReflect.Descriptor instead. +func (*AgentDB_Credit) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 20} +} + +func (x *AgentDB_Credit) GetBatches() uint32 { + if x != nil { + return x.Batches + } + return 0 +} + +type AgentDB_Ping struct { + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Ping) Reset() { + *x = AgentDB_Ping{} + mi := &file_livekit_agentdb_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Ping) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Ping) ProtoMessage() {} + +func (x *AgentDB_Ping) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Ping.ProtoReflect.Descriptor instead. +func (*AgentDB_Ping) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 21} +} + +func (x *AgentDB_Ping) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type AgentDB_Pong struct { + state protoimpl.MessageState `protogen:"open.v1"` + LastPingTimestamp int64 `protobuf:"varint,1,opt,name=last_ping_timestamp,json=lastPingTimestamp,proto3" json:"last_ping_timestamp,omitempty"` + Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Pong) Reset() { + *x = AgentDB_Pong{} + mi := &file_livekit_agentdb_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Pong) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Pong) ProtoMessage() {} + +func (x *AgentDB_Pong) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Pong.ProtoReflect.Descriptor instead. +func (*AgentDB_Pong) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 22} +} + +func (x *AgentDB_Pong) GetLastPingTimestamp() int64 { + if x != nil { + return x.LastPingTimestamp + } + return 0 +} + +func (x *AgentDB_Pong) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type AgentDB_Hello struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // access token; authorization is checked here + DatabaseId string `protobuf:"bytes,2,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Hello) Reset() { + *x = AgentDB_Hello{} + mi := &file_livekit_agentdb_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Hello) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Hello) ProtoMessage() {} + +func (x *AgentDB_Hello) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Hello.ProtoReflect.Descriptor instead. +func (*AgentDB_Hello) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 23} +} + +func (x *AgentDB_Hello) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *AgentDB_Hello) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +type AgentDB_HelloOk struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence + PingIntervalMs uint32 `protobuf:"varint,2,opt,name=ping_interval_ms,json=pingIntervalMs,proto3" json:"ping_interval_ms,omitempty"` // server-advertised keepalive cadence + PingTimeoutMs uint32 `protobuf:"varint,3,opt,name=ping_timeout_ms,json=pingTimeoutMs,proto3" json:"ping_timeout_ms,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_HelloOk) Reset() { + *x = AgentDB_HelloOk{} + mi := &file_livekit_agentdb_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_HelloOk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_HelloOk) ProtoMessage() {} + +func (x *AgentDB_HelloOk) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_HelloOk.ProtoReflect.Descriptor instead. +func (*AgentDB_HelloOk) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 24} +} + +func (x *AgentDB_HelloOk) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +func (x *AgentDB_HelloOk) GetPingIntervalMs() uint32 { + if x != nil { + return x.PingIntervalMs + } + return 0 +} + +func (x *AgentDB_HelloOk) GetPingTimeoutMs() uint32 { + if x != nil { + return x.PingTimeoutMs + } + return 0 +} + +type AgentDB_Columns struct { + state protoimpl.MessageState `protogen:"open.v1"` + Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Columns) Reset() { + *x = AgentDB_Columns{} + mi := &file_livekit_agentdb_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Columns) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Columns) ProtoMessage() {} + +func (x *AgentDB_Columns) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Columns.ProtoReflect.Descriptor instead. +func (*AgentDB_Columns) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 25} +} + +func (x *AgentDB_Columns) GetNames() []string { + if x != nil { + return x.Names + } + return nil +} + +// Column is one column of a batch. Values are typed individually, as +// SQLite types them, so a column may mix classes: walk `types` and take the next +// entry from the matching array. A NULL occupies a tag only. +type AgentDB_Column struct { + state protoimpl.MessageState `protogen:"open.v1"` + Types []byte `protobuf:"bytes,1,opt,name=types,proto3" json:"types,omitempty"` // one ValueType per row + Ints []int64 `protobuf:"zigzag64,2,rep,packed,name=ints,proto3" json:"ints,omitempty"` + Doubles []float64 `protobuf:"fixed64,3,rep,packed,name=doubles,proto3" json:"doubles,omitempty"` + // Values concatenated, one exclusive end offset each: value i is + // data[ends[i-1]:ends[i]], with 0 implied before the first. + TextData []byte `protobuf:"bytes,4,opt,name=text_data,json=textData,proto3" json:"text_data,omitempty"` + TextEnds []uint32 `protobuf:"varint,5,rep,packed,name=text_ends,json=textEnds,proto3" json:"text_ends,omitempty"` + BlobData []byte `protobuf:"bytes,6,opt,name=blob_data,json=blobData,proto3" json:"blob_data,omitempty"` + BlobEnds []uint32 `protobuf:"varint,7,rep,packed,name=blob_ends,json=blobEnds,proto3" json:"blob_ends,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Column) Reset() { + *x = AgentDB_Column{} + mi := &file_livekit_agentdb_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Column) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Column) ProtoMessage() {} + +func (x *AgentDB_Column) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Column.ProtoReflect.Descriptor instead. +func (*AgentDB_Column) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 26} +} + +func (x *AgentDB_Column) GetTypes() []byte { + if x != nil { + return x.Types + } + return nil +} + +func (x *AgentDB_Column) GetInts() []int64 { + if x != nil { + return x.Ints + } + return nil +} + +func (x *AgentDB_Column) GetDoubles() []float64 { + if x != nil { + return x.Doubles + } + return nil +} + +func (x *AgentDB_Column) GetTextData() []byte { + if x != nil { + return x.TextData + } + return nil +} + +func (x *AgentDB_Column) GetTextEnds() []uint32 { + if x != nil { + return x.TextEnds + } + return nil +} + +func (x *AgentDB_Column) GetBlobData() []byte { + if x != nil { + return x.BlobData + } + return nil +} + +func (x *AgentDB_Column) GetBlobEnds() []uint32 { + if x != nil { + return x.BlobEnds + } + return nil +} + +type AgentDB_ColumnBatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + Columns []*AgentDB_Column `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` // one per column of Columns + Rows uint32 `protobuf:"varint,2,opt,name=rows,proto3" json:"rows,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_ColumnBatch) Reset() { + *x = AgentDB_ColumnBatch{} + mi := &file_livekit_agentdb_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_ColumnBatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_ColumnBatch) ProtoMessage() {} + +func (x *AgentDB_ColumnBatch) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_ColumnBatch.ProtoReflect.Descriptor instead. +func (*AgentDB_ColumnBatch) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 27} +} + +func (x *AgentDB_ColumnBatch) GetColumns() []*AgentDB_Column { + if x != nil { + return x.Columns + } + return nil +} + +func (x *AgentDB_ColumnBatch) GetRows() uint32 { + if x != nil { + return x.Rows + } + return 0 +} + +type AgentDB_ExecResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + RowsAffected int64 `protobuf:"varint,1,opt,name=rows_affected,json=rowsAffected,proto3" json:"rows_affected,omitempty"` + LastInsertId int64 `protobuf:"varint,2,opt,name=last_insert_id,json=lastInsertId,proto3" json:"last_insert_id,omitempty"` + Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // durable commit sequence after this exec + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_ExecResult) Reset() { + *x = AgentDB_ExecResult{} + mi := &file_livekit_agentdb_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_ExecResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_ExecResult) ProtoMessage() {} + +func (x *AgentDB_ExecResult) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_ExecResult.ProtoReflect.Descriptor instead. +func (*AgentDB_ExecResult) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 28} +} + +func (x *AgentDB_ExecResult) GetRowsAffected() int64 { + if x != nil { + return x.RowsAffected + } + return 0 +} + +func (x *AgentDB_ExecResult) GetLastInsertId() int64 { + if x != nil { + return x.LastInsertId + } + return 0 +} + +func (x *AgentDB_ExecResult) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +type AgentDB_Done struct { + state protoimpl.MessageState `protogen:"open.v1"` + Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // snapshot the query ran at + TotalRows uint64 `protobuf:"varint,2,opt,name=total_rows,json=totalRows,proto3" json:"total_rows,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Done) Reset() { + *x = AgentDB_Done{} + mi := &file_livekit_agentdb_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Done) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Done) ProtoMessage() {} + +func (x *AgentDB_Done) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Done.ProtoReflect.Descriptor instead. +func (*AgentDB_Done) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 29} +} + +func (x *AgentDB_Done) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + +func (x *AgentDB_Done) GetTotalRows() uint64 { + if x != nil { + return x.TotalRows + } + return 0 +} + +type AgentDB_Error struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // stable machine-readable code + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Error) Reset() { + *x = AgentDB_Error{} + mi := &file_livekit_agentdb_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Error) ProtoMessage() {} + +func (x *AgentDB_Error) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Error.ProtoReflect.Descriptor instead. +func (*AgentDB_Error) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 30} +} + +func (x *AgentDB_Error) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *AgentDB_Error) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_livekit_agentdb_proto protoreflect.FileDescriptor + +const file_livekit_agentdb_proto_rawDesc = "" + + "\n" + + "\x15livekit_agentdb.proto\x12\alivekit\"\xd5\x1b\n" + + "\aAgentDB\x1aq\n" + + "\rCreateRequest\x12\x16\n" + + "\x06region\x18\x01 \x01(\tR\x06region\x12'\n" + + "\x0fuser_attributes\x18\x02 \x01(\tR\x0euserAttributes\x12\x1f\n" + + "\vttl_seconds\x18\x03 \x01(\x03R\n" + + "ttlSeconds\x1aY\n" + + "\x0eCreateResponse\x12\x1f\n" + + "\vdatabase_id\x18\x01 \x01(\tR\n" + + "databaseId\x12&\n" + + "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\x1a-\n" + + "\n" + + "GetRequest\x12\x1f\n" + + "\vdatabase_id\x18\x01 \x01(\tR\n" + + "databaseId\x1a\xd1\x01\n" + + "\vGetResponse\x12\x1f\n" + + "\vdatabase_id\x18\x01 \x01(\tR\n" + + "databaseId\x12\x16\n" + + "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + + "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12&\n" + + "\x0fcreated_at_unix\x18\x04 \x01(\x03R\rcreatedAtUnix\x12&\n" + + "\x0fexpires_at_unix\x18\x05 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + + "\x03tip\x18\x06 \x01(\x03R\x03tip\x1aI\n" + + "\vListRequest\x12\x1b\n" + + "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x02 \x01(\tR\tpageToken\x1an\n" + + "\fListResponse\x126\n" + + "\tdatabases\x18\x01 \x03(\v2\x18.livekit.AgentDB.SummaryR\tdatabases\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x1a\xbb\x01\n" + + "\aSummary\x12\x1f\n" + + "\vdatabase_id\x18\x01 \x01(\tR\n" + + "databaseId\x12\x16\n" + + "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + + "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12&\n" + + "\x0fcreated_at_unix\x18\x04 \x01(\x03R\rcreatedAtUnix\x12&\n" + + "\x0fexpires_at_unix\x18\x05 \x01(\x03R\rexpiresAtUnix\x1a0\n" + + "\rDeleteRequest\x12\x1f\n" + + "\vdatabase_id\x18\x01 \x01(\tR\n" + + "databaseId\x1a\x10\n" + + "\x0eDeleteResponse\x1a.\n" + + "\vDumpRequest\x12\x1f\n" + + "\vdatabase_id\x18\x01 \x01(\tR\n" + + "databaseId\x1ak\n" + + "\fDumpResponse\x12!\n" + + "\fdownload_url\x18\x01 \x01(\tR\vdownloadUrl\x12&\n" + + "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + + "\x03tip\x18\x03 \x01(\x03R\x03tip\x1a\xae\x04\n" + + "\rClientMessage\x12\x1d\n" + + "\n" + + "request_id\x18\x01 \x01(\rR\trequestId\x12.\n" + + "\x05hello\x18\x02 \x01(\v2\x16.livekit.AgentDB.HelloH\x00R\x05hello\x120\n" + + "\x04exec\x18\x03 \x01(\v2\x1a.livekit.AgentDB.StatementH\x00R\x04exec\x122\n" + + "\x05query\x18\x04 \x01(\v2\x1a.livekit.AgentDB.StatementH\x00R\x05query\x12.\n" + + "\x05batch\x18\x05 \x01(\v2\x16.livekit.AgentDB.BatchH\x00R\x05batch\x12.\n" + + "\x05begin\x18\x06 \x01(\v2\x16.livekit.AgentDB.BeginH\x00R\x05begin\x121\n" + + "\x06commit\x18\a \x01(\v2\x17.livekit.AgentDB.CommitH\x00R\x06commit\x127\n" + + "\brollback\x18\b \x01(\v2\x19.livekit.AgentDB.RollbackH\x00R\brollback\x121\n" + + "\x06cancel\x18\t \x01(\v2\x17.livekit.AgentDB.CancelH\x00R\x06cancel\x121\n" + + "\x06credit\x18\n" + + " \x01(\v2\x17.livekit.AgentDB.CreditH\x00R\x06credit\x12+\n" + + "\x04ping\x18\v \x01(\v2\x15.livekit.AgentDB.PingH\x00R\x04pingB\t\n" + + "\amessage\x1a\xb3\x03\n" + + "\rServerMessage\x12\x1d\n" + + "\n" + + "request_id\x18\x01 \x01(\rR\trequestId\x125\n" + + "\bhello_ok\x18\x02 \x01(\v2\x18.livekit.AgentDB.HelloOkH\x00R\ahelloOk\x124\n" + + "\acolumns\x18\x03 \x01(\v2\x18.livekit.AgentDB.ColumnsH\x00R\acolumns\x12A\n" + + "\fcolumn_batch\x18\x04 \x01(\v2\x1c.livekit.AgentDB.ColumnBatchH\x00R\vcolumnBatch\x12>\n" + + "\vexec_result\x18\x05 \x01(\v2\x1b.livekit.AgentDB.ExecResultH\x00R\n" + + "execResult\x12+\n" + + "\x04done\x18\x06 \x01(\v2\x15.livekit.AgentDB.DoneH\x00R\x04done\x12.\n" + + "\x05error\x18\a \x01(\v2\x16.livekit.AgentDB.ErrorH\x00R\x05error\x12+\n" + + "\x04pong\x18\b \x01(\v2\x15.livekit.AgentDB.PongH\x00R\x04pongB\t\n" + + "\amessage\x1a\xb7\x01\n" + + "\x05Value\x12\x1f\n" + + "\n" + + "null_value\x18\x01 \x01(\bH\x00R\tnullValue\x12\x1d\n" + + "\tint_value\x18\x02 \x01(\x03H\x00R\bintValue\x12#\n" + + "\fdouble_value\x18\x03 \x01(\x01H\x00R\vdoubleValue\x12\x1f\n" + + "\n" + + "text_value\x18\x04 \x01(\tH\x00R\ttextValue\x12\x1f\n" + + "\n" + + "blob_value\x18\x05 \x01(\fH\x00R\tblobValueB\a\n" + + "\x05value\x1a}\n" + + "\tStatement\x12\x10\n" + + "\x03sql\x18\x01 \x01(\tR\x03sql\x12.\n" + + "\x06params\x18\x02 \x03(\v2\x16.livekit.AgentDB.ValueR\x06params\x12.\n" + + "\x04lang\x18\x03 \x01(\x0e2\x1a.livekit.AgentDB.QueryLangR\x04lang\x1aC\n" + + "\x05Batch\x12:\n" + + "\n" + + "statements\x18\x01 \x03(\v2\x1a.livekit.AgentDB.StatementR\n" + + "statements\x1a\a\n" + + "\x05Begin\x1a\b\n" + + "\x06Commit\x1a\n" + + "\n" + + "\bRollback\x1a\b\n" + + "\x06Cancel\x1a\"\n" + + "\x06Credit\x12\x18\n" + + "\abatches\x18\x01 \x01(\rR\abatches\x1a$\n" + + "\x04Ping\x12\x1c\n" + + "\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\x1aT\n" + + "\x04Pong\x12.\n" + + "\x13last_ping_timestamp\x18\x01 \x01(\x03R\x11lastPingTimestamp\x12\x1c\n" + + "\ttimestamp\x18\x02 \x01(\x03R\ttimestamp\x1a>\n" + + "\x05Hello\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\x12\x1f\n" + + "\vdatabase_id\x18\x02 \x01(\tR\n" + + "databaseId\x1am\n" + + "\aHelloOk\x12\x10\n" + + "\x03tip\x18\x01 \x01(\x03R\x03tip\x12(\n" + + "\x10ping_interval_ms\x18\x02 \x01(\rR\x0epingIntervalMs\x12&\n" + + "\x0fping_timeout_ms\x18\x03 \x01(\rR\rpingTimeoutMs\x1a\x1f\n" + + "\aColumns\x12\x14\n" + + "\x05names\x18\x01 \x03(\tR\x05names\x1a\xc0\x01\n" + + "\x06Column\x12\x14\n" + + "\x05types\x18\x01 \x01(\fR\x05types\x12\x12\n" + + "\x04ints\x18\x02 \x03(\x12R\x04ints\x12\x18\n" + + "\adoubles\x18\x03 \x03(\x01R\adoubles\x12\x1b\n" + + "\ttext_data\x18\x04 \x01(\fR\btextData\x12\x1b\n" + + "\ttext_ends\x18\x05 \x03(\rR\btextEnds\x12\x1b\n" + + "\tblob_data\x18\x06 \x01(\fR\bblobData\x12\x1b\n" + + "\tblob_ends\x18\a \x03(\rR\bblobEnds\x1aT\n" + + "\vColumnBatch\x121\n" + + "\acolumns\x18\x01 \x03(\v2\x17.livekit.AgentDB.ColumnR\acolumns\x12\x12\n" + + "\x04rows\x18\x02 \x01(\rR\x04rows\x1ai\n" + + "\n" + + "ExecResult\x12#\n" + + "\rrows_affected\x18\x01 \x01(\x03R\frowsAffected\x12$\n" + + "\x0elast_insert_id\x18\x02 \x01(\x03R\flastInsertId\x12\x10\n" + + "\x03tip\x18\x03 \x01(\x03R\x03tip\x1a7\n" + + "\x04Done\x12\x10\n" + + "\x03tip\x18\x01 \x01(\x03R\x03tip\x12\x1d\n" + + "\n" + + "total_rows\x18\x02 \x01(\x04R\ttotalRows\x1a5\n" + + "\x05Error\x12\x12\n" + + "\x04code\x18\x01 \x01(\tR\x04code\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"6\n" + + "\tQueryLang\x12\x12\n" + + "\x0eQUERY_LANG_SQL\x10\x00\x12\x15\n" + + "\x11QUERY_LANG_CYPHER\x10\x01\"u\n" + + "\tValueType\x12\x13\n" + + "\x0fVALUE_TYPE_NULL\x10\x00\x12\x12\n" + + "\x0eVALUE_TYPE_INT\x10\x01\x12\x15\n" + + "\x11VALUE_TYPE_DOUBLE\x10\x02\x12\x13\n" + + "\x0fVALUE_TYPE_TEXT\x10\x03\x12\x13\n" + + "\x0fVALUE_TYPE_BLOB\x10\x042\x93\x03\n" + + "\x0eAgentDBService\x12Q\n" + + "\x0eCreateDatabase\x12\x1e.livekit.AgentDB.CreateRequest\x1a\x1f.livekit.AgentDB.CreateResponse\x12H\n" + + "\vGetDatabase\x12\x1b.livekit.AgentDB.GetRequest\x1a\x1c.livekit.AgentDB.GetResponse\x12L\n" + + "\rListDatabases\x12\x1c.livekit.AgentDB.ListRequest\x1a\x1d.livekit.AgentDB.ListResponse\x12Q\n" + + "\x0eDeleteDatabase\x12\x1e.livekit.AgentDB.DeleteRequest\x1a\x1f.livekit.AgentDB.DeleteResponse\x12C\n" + + "\x04Dump\x12\x1c.livekit.AgentDB.DumpRequest\x1a\x1d.livekit.AgentDB.DumpResponseBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" + +var ( + file_livekit_agentdb_proto_rawDescOnce sync.Once + file_livekit_agentdb_proto_rawDescData []byte +) + +func file_livekit_agentdb_proto_rawDescGZIP() []byte { + file_livekit_agentdb_proto_rawDescOnce.Do(func() { + file_livekit_agentdb_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_livekit_agentdb_proto_rawDesc), len(file_livekit_agentdb_proto_rawDesc))) + }) + return file_livekit_agentdb_proto_rawDescData +} + +var file_livekit_agentdb_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_livekit_agentdb_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_livekit_agentdb_proto_goTypes = []any{ + (AgentDB_QueryLang)(0), // 0: livekit.AgentDB.QueryLang + (AgentDB_ValueType)(0), // 1: livekit.AgentDB.ValueType + (*AgentDB)(nil), // 2: livekit.AgentDB + (*AgentDB_CreateRequest)(nil), // 3: livekit.AgentDB.CreateRequest + (*AgentDB_CreateResponse)(nil), // 4: livekit.AgentDB.CreateResponse + (*AgentDB_GetRequest)(nil), // 5: livekit.AgentDB.GetRequest + (*AgentDB_GetResponse)(nil), // 6: livekit.AgentDB.GetResponse + (*AgentDB_ListRequest)(nil), // 7: livekit.AgentDB.ListRequest + (*AgentDB_ListResponse)(nil), // 8: livekit.AgentDB.ListResponse + (*AgentDB_Summary)(nil), // 9: livekit.AgentDB.Summary + (*AgentDB_DeleteRequest)(nil), // 10: livekit.AgentDB.DeleteRequest + (*AgentDB_DeleteResponse)(nil), // 11: livekit.AgentDB.DeleteResponse + (*AgentDB_DumpRequest)(nil), // 12: livekit.AgentDB.DumpRequest + (*AgentDB_DumpResponse)(nil), // 13: livekit.AgentDB.DumpResponse + (*AgentDB_ClientMessage)(nil), // 14: livekit.AgentDB.ClientMessage + (*AgentDB_ServerMessage)(nil), // 15: livekit.AgentDB.ServerMessage + (*AgentDB_Value)(nil), // 16: livekit.AgentDB.Value + (*AgentDB_Statement)(nil), // 17: livekit.AgentDB.Statement + (*AgentDB_Batch)(nil), // 18: livekit.AgentDB.Batch + (*AgentDB_Begin)(nil), // 19: livekit.AgentDB.Begin + (*AgentDB_Commit)(nil), // 20: livekit.AgentDB.Commit + (*AgentDB_Rollback)(nil), // 21: livekit.AgentDB.Rollback + (*AgentDB_Cancel)(nil), // 22: livekit.AgentDB.Cancel + (*AgentDB_Credit)(nil), // 23: livekit.AgentDB.Credit + (*AgentDB_Ping)(nil), // 24: livekit.AgentDB.Ping + (*AgentDB_Pong)(nil), // 25: livekit.AgentDB.Pong + (*AgentDB_Hello)(nil), // 26: livekit.AgentDB.Hello + (*AgentDB_HelloOk)(nil), // 27: livekit.AgentDB.HelloOk + (*AgentDB_Columns)(nil), // 28: livekit.AgentDB.Columns + (*AgentDB_Column)(nil), // 29: livekit.AgentDB.Column + (*AgentDB_ColumnBatch)(nil), // 30: livekit.AgentDB.ColumnBatch + (*AgentDB_ExecResult)(nil), // 31: livekit.AgentDB.ExecResult + (*AgentDB_Done)(nil), // 32: livekit.AgentDB.Done + (*AgentDB_Error)(nil), // 33: livekit.AgentDB.Error +} +var file_livekit_agentdb_proto_depIdxs = []int32{ + 9, // 0: livekit.AgentDB.ListResponse.databases:type_name -> livekit.AgentDB.Summary + 26, // 1: livekit.AgentDB.ClientMessage.hello:type_name -> livekit.AgentDB.Hello + 17, // 2: livekit.AgentDB.ClientMessage.exec:type_name -> livekit.AgentDB.Statement + 17, // 3: livekit.AgentDB.ClientMessage.query:type_name -> livekit.AgentDB.Statement + 18, // 4: livekit.AgentDB.ClientMessage.batch:type_name -> livekit.AgentDB.Batch + 19, // 5: livekit.AgentDB.ClientMessage.begin:type_name -> livekit.AgentDB.Begin + 20, // 6: livekit.AgentDB.ClientMessage.commit:type_name -> livekit.AgentDB.Commit + 21, // 7: livekit.AgentDB.ClientMessage.rollback:type_name -> livekit.AgentDB.Rollback + 22, // 8: livekit.AgentDB.ClientMessage.cancel:type_name -> livekit.AgentDB.Cancel + 23, // 9: livekit.AgentDB.ClientMessage.credit:type_name -> livekit.AgentDB.Credit + 24, // 10: livekit.AgentDB.ClientMessage.ping:type_name -> livekit.AgentDB.Ping + 27, // 11: livekit.AgentDB.ServerMessage.hello_ok:type_name -> livekit.AgentDB.HelloOk + 28, // 12: livekit.AgentDB.ServerMessage.columns:type_name -> livekit.AgentDB.Columns + 30, // 13: livekit.AgentDB.ServerMessage.column_batch:type_name -> livekit.AgentDB.ColumnBatch + 31, // 14: livekit.AgentDB.ServerMessage.exec_result:type_name -> livekit.AgentDB.ExecResult + 32, // 15: livekit.AgentDB.ServerMessage.done:type_name -> livekit.AgentDB.Done + 33, // 16: livekit.AgentDB.ServerMessage.error:type_name -> livekit.AgentDB.Error + 25, // 17: livekit.AgentDB.ServerMessage.pong:type_name -> livekit.AgentDB.Pong + 16, // 18: livekit.AgentDB.Statement.params:type_name -> livekit.AgentDB.Value + 0, // 19: livekit.AgentDB.Statement.lang:type_name -> livekit.AgentDB.QueryLang + 17, // 20: livekit.AgentDB.Batch.statements:type_name -> livekit.AgentDB.Statement + 29, // 21: livekit.AgentDB.ColumnBatch.columns:type_name -> livekit.AgentDB.Column + 3, // 22: livekit.AgentDBService.CreateDatabase:input_type -> livekit.AgentDB.CreateRequest + 5, // 23: livekit.AgentDBService.GetDatabase:input_type -> livekit.AgentDB.GetRequest + 7, // 24: livekit.AgentDBService.ListDatabases:input_type -> livekit.AgentDB.ListRequest + 10, // 25: livekit.AgentDBService.DeleteDatabase:input_type -> livekit.AgentDB.DeleteRequest + 12, // 26: livekit.AgentDBService.Dump:input_type -> livekit.AgentDB.DumpRequest + 4, // 27: livekit.AgentDBService.CreateDatabase:output_type -> livekit.AgentDB.CreateResponse + 6, // 28: livekit.AgentDBService.GetDatabase:output_type -> livekit.AgentDB.GetResponse + 8, // 29: livekit.AgentDBService.ListDatabases:output_type -> livekit.AgentDB.ListResponse + 11, // 30: livekit.AgentDBService.DeleteDatabase:output_type -> livekit.AgentDB.DeleteResponse + 13, // 31: livekit.AgentDBService.Dump:output_type -> livekit.AgentDB.DumpResponse + 27, // [27:32] is the sub-list for method output_type + 22, // [22:27] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_livekit_agentdb_proto_init() } +func file_livekit_agentdb_proto_init() { + if File_livekit_agentdb_proto != nil { + return + } + file_livekit_agentdb_proto_msgTypes[12].OneofWrappers = []any{ + (*AgentDB_ClientMessage_Hello)(nil), + (*AgentDB_ClientMessage_Exec)(nil), + (*AgentDB_ClientMessage_Query)(nil), + (*AgentDB_ClientMessage_Batch)(nil), + (*AgentDB_ClientMessage_Begin)(nil), + (*AgentDB_ClientMessage_Commit)(nil), + (*AgentDB_ClientMessage_Rollback)(nil), + (*AgentDB_ClientMessage_Cancel)(nil), + (*AgentDB_ClientMessage_Credit)(nil), + (*AgentDB_ClientMessage_Ping)(nil), + } + file_livekit_agentdb_proto_msgTypes[13].OneofWrappers = []any{ + (*AgentDB_ServerMessage_HelloOk)(nil), + (*AgentDB_ServerMessage_Columns)(nil), + (*AgentDB_ServerMessage_ColumnBatch)(nil), + (*AgentDB_ServerMessage_ExecResult)(nil), + (*AgentDB_ServerMessage_Done)(nil), + (*AgentDB_ServerMessage_Error)(nil), + (*AgentDB_ServerMessage_Pong)(nil), + } + file_livekit_agentdb_proto_msgTypes[14].OneofWrappers = []any{ + (*AgentDB_Value_NullValue)(nil), + (*AgentDB_Value_IntValue)(nil), + (*AgentDB_Value_DoubleValue)(nil), + (*AgentDB_Value_TextValue)(nil), + (*AgentDB_Value_BlobValue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_agentdb_proto_rawDesc), len(file_livekit_agentdb_proto_rawDesc)), + NumEnums: 2, + NumMessages: 32, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_livekit_agentdb_proto_goTypes, + DependencyIndexes: file_livekit_agentdb_proto_depIdxs, + EnumInfos: file_livekit_agentdb_proto_enumTypes, + MessageInfos: file_livekit_agentdb_proto_msgTypes, + }.Build() + File_livekit_agentdb_proto = out.File + file_livekit_agentdb_proto_goTypes = nil + file_livekit_agentdb_proto_depIdxs = nil +} diff --git a/livekit/livekit_agentdb.twirp.go b/livekit/livekit_agentdb.twirp.go new file mode 100644 index 000000000..06c17a861 --- /dev/null +++ b/livekit/livekit_agentdb.twirp.go @@ -0,0 +1,1742 @@ +// Code generated by protoc-gen-twirp v8.1.3, DO NOT EDIT. +// source: livekit_agentdb.proto + +package livekit + +import context "context" +import fmt "fmt" +import http "net/http" +import io "io" +import json "encoding/json" +import strconv "strconv" +import strings "strings" + +import protojson "google.golang.org/protobuf/encoding/protojson" +import proto "google.golang.org/protobuf/proto" +import twirp "github.com/twitchtv/twirp" +import ctxsetters "github.com/twitchtv/twirp/ctxsetters" + +// Version compatibility assertion. +// If the constant is not defined in the package, that likely means +// the package needs to be updated to work with this generated code. +// See https://twitchtv.github.io/twirp/docs/version_matrix.html +const _ = twirp.TwirpPackageMinVersion_8_1_0 + +// ======================== +// AgentDBService Interface +// ======================== + +// AgentDBService hands out SQLite databases: lifecycle and export. Querying +// goes through the data plane, whose frames are AgentDB.ClientMessage and +// AgentDB.ServerMessage. The project comes from the access token, never from a +// request field. +type AgentDBService interface { + CreateDatabase(context.Context, *AgentDB_CreateRequest) (*AgentDB_CreateResponse, error) + + GetDatabase(context.Context, *AgentDB_GetRequest) (*AgentDB_GetResponse, error) + + ListDatabases(context.Context, *AgentDB_ListRequest) (*AgentDB_ListResponse, error) + + // Deletes the stored data too, not just the metadata row. + DeleteDatabase(context.Context, *AgentDB_DeleteRequest) (*AgentDB_DeleteResponse, error) + + // Exports a consistent SQLite file, returning a time-limited download URL. + Dump(context.Context, *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) +} + +// ============================== +// AgentDBService Protobuf Client +// ============================== + +type agentDBServiceProtobufClient struct { + client HTTPClient + urls [5]string + interceptor twirp.Interceptor + opts twirp.ClientOptions +} + +// NewAgentDBServiceProtobufClient creates a Protobuf client that implements the AgentDBService interface. +// It communicates using Protobuf and can be configured with a custom HTTPClient. +func NewAgentDBServiceProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) AgentDBService { + if c, ok := client.(*http.Client); ok { + client = withoutRedirects(c) + } + + clientOpts := twirp.ClientOptions{} + for _, o := range opts { + o(&clientOpts) + } + + // Using ReadOpt allows backwards and forwards compatibility with new options in the future + literalURLs := false + _ = clientOpts.ReadOpt("literalURLs", &literalURLs) + var pathPrefix string + if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { + pathPrefix = "/twirp" // default prefix + } + + // Build method URLs: []/./ + serviceURL := sanitizeBaseURL(baseURL) + serviceURL += baseServicePath(pathPrefix, "livekit", "AgentDBService") + urls := [5]string{ + serviceURL + "CreateDatabase", + serviceURL + "GetDatabase", + serviceURL + "ListDatabases", + serviceURL + "DeleteDatabase", + serviceURL + "Dump", + } + + return &agentDBServiceProtobufClient{ + client: client, + urls: urls, + interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...), + opts: clientOpts, + } +} + +func (c *agentDBServiceProtobufClient) CreateDatabase(ctx context.Context, in *AgentDB_CreateRequest) (*AgentDB_CreateResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") + ctx = ctxsetters.WithMethodName(ctx, "CreateDatabase") + caller := c.callCreateDatabase + if c.interceptor != nil { + caller = func(ctx context.Context, req *AgentDB_CreateRequest) (*AgentDB_CreateResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_CreateRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_CreateRequest) when calling interceptor") + } + return c.callCreateDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_CreateResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_CreateResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBServiceProtobufClient) callCreateDatabase(ctx context.Context, in *AgentDB_CreateRequest) (*AgentDB_CreateResponse, error) { + out := new(AgentDB_CreateResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBServiceProtobufClient) GetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") + ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") + caller := c.callGetDatabase + if c.interceptor != nil { + caller = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_GetRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_GetRequest) when calling interceptor") + } + return c.callGetDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_GetResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_GetResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBServiceProtobufClient) callGetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { + out := new(AgentDB_GetResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBServiceProtobufClient) ListDatabases(ctx context.Context, in *AgentDB_ListRequest) (*AgentDB_ListResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") + ctx = ctxsetters.WithMethodName(ctx, "ListDatabases") + caller := c.callListDatabases + if c.interceptor != nil { + caller = func(ctx context.Context, req *AgentDB_ListRequest) (*AgentDB_ListResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_ListRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_ListRequest) when calling interceptor") + } + return c.callListDatabases(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_ListResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_ListResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBServiceProtobufClient) callListDatabases(ctx context.Context, in *AgentDB_ListRequest) (*AgentDB_ListResponse, error) { + out := new(AgentDB_ListResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBServiceProtobufClient) DeleteDatabase(ctx context.Context, in *AgentDB_DeleteRequest) (*AgentDB_DeleteResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") + ctx = ctxsetters.WithMethodName(ctx, "DeleteDatabase") + caller := c.callDeleteDatabase + if c.interceptor != nil { + caller = func(ctx context.Context, req *AgentDB_DeleteRequest) (*AgentDB_DeleteResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_DeleteRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_DeleteRequest) when calling interceptor") + } + return c.callDeleteDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_DeleteResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_DeleteResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBServiceProtobufClient) callDeleteDatabase(ctx context.Context, in *AgentDB_DeleteRequest) (*AgentDB_DeleteResponse, error) { + out := new(AgentDB_DeleteResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBServiceProtobufClient) Dump(ctx context.Context, in *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") + ctx = ctxsetters.WithMethodName(ctx, "Dump") + caller := c.callDump + if c.interceptor != nil { + caller = func(ctx context.Context, req *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_DumpRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_DumpRequest) when calling interceptor") + } + return c.callDump(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_DumpResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_DumpResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBServiceProtobufClient) callDump(ctx context.Context, in *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { + out := new(AgentDB_DumpResponse) + ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +// ========================== +// AgentDBService JSON Client +// ========================== + +type agentDBServiceJSONClient struct { + client HTTPClient + urls [5]string + interceptor twirp.Interceptor + opts twirp.ClientOptions +} + +// NewAgentDBServiceJSONClient creates a JSON client that implements the AgentDBService interface. +// It communicates using JSON and can be configured with a custom HTTPClient. +func NewAgentDBServiceJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) AgentDBService { + if c, ok := client.(*http.Client); ok { + client = withoutRedirects(c) + } + + clientOpts := twirp.ClientOptions{} + for _, o := range opts { + o(&clientOpts) + } + + // Using ReadOpt allows backwards and forwards compatibility with new options in the future + literalURLs := false + _ = clientOpts.ReadOpt("literalURLs", &literalURLs) + var pathPrefix string + if ok := clientOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { + pathPrefix = "/twirp" // default prefix + } + + // Build method URLs: []/./ + serviceURL := sanitizeBaseURL(baseURL) + serviceURL += baseServicePath(pathPrefix, "livekit", "AgentDBService") + urls := [5]string{ + serviceURL + "CreateDatabase", + serviceURL + "GetDatabase", + serviceURL + "ListDatabases", + serviceURL + "DeleteDatabase", + serviceURL + "Dump", + } + + return &agentDBServiceJSONClient{ + client: client, + urls: urls, + interceptor: twirp.ChainInterceptors(clientOpts.Interceptors...), + opts: clientOpts, + } +} + +func (c *agentDBServiceJSONClient) CreateDatabase(ctx context.Context, in *AgentDB_CreateRequest) (*AgentDB_CreateResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") + ctx = ctxsetters.WithMethodName(ctx, "CreateDatabase") + caller := c.callCreateDatabase + if c.interceptor != nil { + caller = func(ctx context.Context, req *AgentDB_CreateRequest) (*AgentDB_CreateResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_CreateRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_CreateRequest) when calling interceptor") + } + return c.callCreateDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_CreateResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_CreateResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBServiceJSONClient) callCreateDatabase(ctx context.Context, in *AgentDB_CreateRequest) (*AgentDB_CreateResponse, error) { + out := new(AgentDB_CreateResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBServiceJSONClient) GetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") + ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") + caller := c.callGetDatabase + if c.interceptor != nil { + caller = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_GetRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_GetRequest) when calling interceptor") + } + return c.callGetDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_GetResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_GetResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBServiceJSONClient) callGetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { + out := new(AgentDB_GetResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBServiceJSONClient) ListDatabases(ctx context.Context, in *AgentDB_ListRequest) (*AgentDB_ListResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") + ctx = ctxsetters.WithMethodName(ctx, "ListDatabases") + caller := c.callListDatabases + if c.interceptor != nil { + caller = func(ctx context.Context, req *AgentDB_ListRequest) (*AgentDB_ListResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_ListRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_ListRequest) when calling interceptor") + } + return c.callListDatabases(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_ListResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_ListResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBServiceJSONClient) callListDatabases(ctx context.Context, in *AgentDB_ListRequest) (*AgentDB_ListResponse, error) { + out := new(AgentDB_ListResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBServiceJSONClient) DeleteDatabase(ctx context.Context, in *AgentDB_DeleteRequest) (*AgentDB_DeleteResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") + ctx = ctxsetters.WithMethodName(ctx, "DeleteDatabase") + caller := c.callDeleteDatabase + if c.interceptor != nil { + caller = func(ctx context.Context, req *AgentDB_DeleteRequest) (*AgentDB_DeleteResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_DeleteRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_DeleteRequest) when calling interceptor") + } + return c.callDeleteDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_DeleteResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_DeleteResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBServiceJSONClient) callDeleteDatabase(ctx context.Context, in *AgentDB_DeleteRequest) (*AgentDB_DeleteResponse, error) { + out := new(AgentDB_DeleteResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +func (c *agentDBServiceJSONClient) Dump(ctx context.Context, in *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") + ctx = ctxsetters.WithMethodName(ctx, "Dump") + caller := c.callDump + if c.interceptor != nil { + caller = func(ctx context.Context, req *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { + resp, err := c.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_DumpRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_DumpRequest) when calling interceptor") + } + return c.callDump(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_DumpResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_DumpResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + return caller(ctx, in) +} + +func (c *agentDBServiceJSONClient) callDump(ctx context.Context, in *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { + out := new(AgentDB_DumpResponse) + ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) + if err != nil { + twerr, ok := err.(twirp.Error) + if !ok { + twerr = twirp.InternalErrorWith(err) + } + callClientError(ctx, c.opts.Hooks, twerr) + return nil, err + } + + callClientResponseReceived(ctx, c.opts.Hooks) + + return out, nil +} + +// ============================= +// AgentDBService Server Handler +// ============================= + +type agentDBServiceServer struct { + AgentDBService + interceptor twirp.Interceptor + hooks *twirp.ServerHooks + pathPrefix string // prefix for routing + jsonSkipDefaults bool // do not include unpopulated fields (default values) in the response + jsonCamelCase bool // JSON fields are serialized as lowerCamelCase rather than keeping the original proto names +} + +// NewAgentDBServiceServer builds a TwirpServer that can be used as an http.Handler to handle +// HTTP requests that are routed to the right method in the provided svc implementation. +// The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks). +func NewAgentDBServiceServer(svc AgentDBService, opts ...interface{}) TwirpServer { + serverOpts := newServerOpts(opts) + + // Using ReadOpt allows backwards and forwards compatibility with new options in the future + jsonSkipDefaults := false + _ = serverOpts.ReadOpt("jsonSkipDefaults", &jsonSkipDefaults) + jsonCamelCase := false + _ = serverOpts.ReadOpt("jsonCamelCase", &jsonCamelCase) + var pathPrefix string + if ok := serverOpts.ReadOpt("pathPrefix", &pathPrefix); !ok { + pathPrefix = "/twirp" // default prefix + } + + return &agentDBServiceServer{ + AgentDBService: svc, + hooks: serverOpts.Hooks, + interceptor: twirp.ChainInterceptors(serverOpts.Interceptors...), + pathPrefix: pathPrefix, + jsonSkipDefaults: jsonSkipDefaults, + jsonCamelCase: jsonCamelCase, + } +} + +// writeError writes an HTTP response with a valid Twirp error format, and triggers hooks. +// If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err) +func (s *agentDBServiceServer) writeError(ctx context.Context, resp http.ResponseWriter, err error) { + writeError(ctx, resp, err, s.hooks) +} + +// handleRequestBodyError is used to handle error when the twirp server cannot read request +func (s *agentDBServiceServer) handleRequestBodyError(ctx context.Context, resp http.ResponseWriter, msg string, err error) { + if context.Canceled == ctx.Err() { + s.writeError(ctx, resp, twirp.NewError(twirp.Canceled, "failed to read request: context canceled")) + return + } + if context.DeadlineExceeded == ctx.Err() { + s.writeError(ctx, resp, twirp.NewError(twirp.DeadlineExceeded, "failed to read request: deadline exceeded")) + return + } + s.writeError(ctx, resp, twirp.WrapError(malformedRequestError(msg), err)) +} + +// AgentDBServicePathPrefix is a convenience constant that may identify URL paths. +// Should be used with caution, it only matches routes generated by Twirp Go clients, +// with the default "/twirp" prefix and default CamelCase service and method names. +// More info: https://twitchtv.github.io/twirp/docs/routing.html +const AgentDBServicePathPrefix = "/twirp/livekit.AgentDBService/" + +func (s *agentDBServiceServer) ServeHTTP(resp http.ResponseWriter, req *http.Request) { + ctx := req.Context() + ctx = ctxsetters.WithPackageName(ctx, "livekit") + ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") + ctx = ctxsetters.WithResponseWriter(ctx, resp) + + var err error + ctx, err = callRequestReceived(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + if req.Method != "POST" { + msg := fmt.Sprintf("unsupported method %q (only POST is allowed)", req.Method) + s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) + return + } + + // Verify path format: []/./ + prefix, pkgService, method := parseTwirpPath(req.URL.Path) + if pkgService != "livekit.AgentDBService" { + msg := fmt.Sprintf("no handler for path %q", req.URL.Path) + s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) + return + } + if prefix != s.pathPrefix { + msg := fmt.Sprintf("invalid path prefix %q, expected %q, on path %q", prefix, s.pathPrefix, req.URL.Path) + s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) + return + } + + switch method { + case "CreateDatabase": + s.serveCreateDatabase(ctx, resp, req) + return + case "GetDatabase": + s.serveGetDatabase(ctx, resp, req) + return + case "ListDatabases": + s.serveListDatabases(ctx, resp, req) + return + case "DeleteDatabase": + s.serveDeleteDatabase(ctx, resp, req) + return + case "Dump": + s.serveDump(ctx, resp, req) + return + default: + msg := fmt.Sprintf("no handler for path %q", req.URL.Path) + s.writeError(ctx, resp, badRouteError(msg, req.Method, req.URL.Path)) + return + } +} + +func (s *agentDBServiceServer) serveCreateDatabase(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveCreateDatabaseJSON(ctx, resp, req) + case "application/protobuf": + s.serveCreateDatabaseProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentDBServiceServer) serveCreateDatabaseJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "CreateDatabase") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(AgentDB_CreateRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentDBService.CreateDatabase + if s.interceptor != nil { + handler = func(ctx context.Context, req *AgentDB_CreateRequest) (*AgentDB_CreateResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_CreateRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_CreateRequest) when calling interceptor") + } + return s.AgentDBService.CreateDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_CreateResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_CreateResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *AgentDB_CreateResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_CreateResponse and nil error while calling CreateDatabase. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServiceServer) serveCreateDatabaseProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "CreateDatabase") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(AgentDB_CreateRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentDBService.CreateDatabase + if s.interceptor != nil { + handler = func(ctx context.Context, req *AgentDB_CreateRequest) (*AgentDB_CreateResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_CreateRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_CreateRequest) when calling interceptor") + } + return s.AgentDBService.CreateDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_CreateResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_CreateResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *AgentDB_CreateResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_CreateResponse and nil error while calling CreateDatabase. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServiceServer) serveGetDatabase(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveGetDatabaseJSON(ctx, resp, req) + case "application/protobuf": + s.serveGetDatabaseProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentDBServiceServer) serveGetDatabaseJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(AgentDB_GetRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentDBService.GetDatabase + if s.interceptor != nil { + handler = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_GetRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_GetRequest) when calling interceptor") + } + return s.AgentDBService.GetDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_GetResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_GetResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *AgentDB_GetResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_GetResponse and nil error while calling GetDatabase. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServiceServer) serveGetDatabaseProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(AgentDB_GetRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentDBService.GetDatabase + if s.interceptor != nil { + handler = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_GetRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_GetRequest) when calling interceptor") + } + return s.AgentDBService.GetDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_GetResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_GetResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *AgentDB_GetResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_GetResponse and nil error while calling GetDatabase. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServiceServer) serveListDatabases(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveListDatabasesJSON(ctx, resp, req) + case "application/protobuf": + s.serveListDatabasesProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentDBServiceServer) serveListDatabasesJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "ListDatabases") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(AgentDB_ListRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentDBService.ListDatabases + if s.interceptor != nil { + handler = func(ctx context.Context, req *AgentDB_ListRequest) (*AgentDB_ListResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_ListRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_ListRequest) when calling interceptor") + } + return s.AgentDBService.ListDatabases(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_ListResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_ListResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *AgentDB_ListResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_ListResponse and nil error while calling ListDatabases. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServiceServer) serveListDatabasesProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "ListDatabases") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(AgentDB_ListRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentDBService.ListDatabases + if s.interceptor != nil { + handler = func(ctx context.Context, req *AgentDB_ListRequest) (*AgentDB_ListResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_ListRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_ListRequest) when calling interceptor") + } + return s.AgentDBService.ListDatabases(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_ListResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_ListResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *AgentDB_ListResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_ListResponse and nil error while calling ListDatabases. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServiceServer) serveDeleteDatabase(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveDeleteDatabaseJSON(ctx, resp, req) + case "application/protobuf": + s.serveDeleteDatabaseProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentDBServiceServer) serveDeleteDatabaseJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "DeleteDatabase") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(AgentDB_DeleteRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentDBService.DeleteDatabase + if s.interceptor != nil { + handler = func(ctx context.Context, req *AgentDB_DeleteRequest) (*AgentDB_DeleteResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_DeleteRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_DeleteRequest) when calling interceptor") + } + return s.AgentDBService.DeleteDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_DeleteResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_DeleteResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *AgentDB_DeleteResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_DeleteResponse and nil error while calling DeleteDatabase. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServiceServer) serveDeleteDatabaseProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "DeleteDatabase") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(AgentDB_DeleteRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentDBService.DeleteDatabase + if s.interceptor != nil { + handler = func(ctx context.Context, req *AgentDB_DeleteRequest) (*AgentDB_DeleteResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_DeleteRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_DeleteRequest) when calling interceptor") + } + return s.AgentDBService.DeleteDatabase(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_DeleteResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_DeleteResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *AgentDB_DeleteResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_DeleteResponse and nil error while calling DeleteDatabase. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServiceServer) serveDump(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + header := req.Header.Get("Content-Type") + i := strings.Index(header, ";") + if i == -1 { + i = len(header) + } + switch strings.TrimSpace(strings.ToLower(header[:i])) { + case "application/json": + s.serveDumpJSON(ctx, resp, req) + case "application/protobuf": + s.serveDumpProtobuf(ctx, resp, req) + default: + msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) + twerr := badRouteError(msg, req.Method, req.URL.Path) + s.writeError(ctx, resp, twerr) + } +} + +func (s *agentDBServiceServer) serveDumpJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "Dump") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + d := json.NewDecoder(req.Body) + rawReqBody := json.RawMessage{} + if err := d.Decode(&rawReqBody); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + reqContent := new(AgentDB_DumpRequest) + unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} + if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { + s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) + return + } + + handler := s.AgentDBService.Dump + if s.interceptor != nil { + handler = func(ctx context.Context, req *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_DumpRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_DumpRequest) when calling interceptor") + } + return s.AgentDBService.Dump(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_DumpResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_DumpResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *AgentDB_DumpResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_DumpResponse and nil error while calling Dump. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + marshaler := &protojson.MarshalOptions{UseProtoNames: !s.jsonCamelCase, EmitUnpopulated: !s.jsonSkipDefaults} + respBytes, err := marshaler.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal json response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/json") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServiceServer) serveDumpProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { + var err error + ctx = ctxsetters.WithMethodName(ctx, "Dump") + ctx, err = callRequestRouted(ctx, s.hooks) + if err != nil { + s.writeError(ctx, resp, err) + return + } + + buf, err := io.ReadAll(req.Body) + if err != nil { + s.handleRequestBodyError(ctx, resp, "failed to read request body", err) + return + } + reqContent := new(AgentDB_DumpRequest) + if err = proto.Unmarshal(buf, reqContent); err != nil { + s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) + return + } + + handler := s.AgentDBService.Dump + if s.interceptor != nil { + handler = func(ctx context.Context, req *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { + resp, err := s.interceptor( + func(ctx context.Context, req interface{}) (interface{}, error) { + typedReq, ok := req.(*AgentDB_DumpRequest) + if !ok { + return nil, twirp.InternalError("failed type assertion req.(*AgentDB_DumpRequest) when calling interceptor") + } + return s.AgentDBService.Dump(ctx, typedReq) + }, + )(ctx, req) + if resp != nil { + typedResp, ok := resp.(*AgentDB_DumpResponse) + if !ok { + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_DumpResponse) when calling interceptor") + } + return typedResp, err + } + return nil, err + } + } + + // Call service method + var respContent *AgentDB_DumpResponse + func() { + defer ensurePanicResponses(ctx, resp, s.hooks) + respContent, err = handler(ctx, reqContent) + }() + + if err != nil { + s.writeError(ctx, resp, err) + return + } + if respContent == nil { + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_DumpResponse and nil error while calling Dump. nil responses are not supported")) + return + } + + ctx = callResponsePrepared(ctx, s.hooks) + + respBytes, err := proto.Marshal(respContent) + if err != nil { + s.writeError(ctx, resp, wrapInternal(err, "failed to marshal proto response")) + return + } + + ctx = ctxsetters.WithStatusCode(ctx, http.StatusOK) + resp.Header().Set("Content-Type", "application/protobuf") + resp.Header().Set("Content-Length", strconv.Itoa(len(respBytes))) + resp.WriteHeader(http.StatusOK) + if n, err := resp.Write(respBytes); err != nil { + msg := fmt.Sprintf("failed to write response, %d of %d bytes written: %s", n, len(respBytes), err.Error()) + twerr := twirp.NewError(twirp.Unknown, msg) + ctx = callError(ctx, s.hooks, twerr) + } + callResponseSent(ctx, s.hooks) +} + +func (s *agentDBServiceServer) ServiceDescriptor() ([]byte, int) { + return twirpFileDescriptor2, 0 +} + +func (s *agentDBServiceServer) ProtocGenTwirpVersion() string { + return "v8.1.3" +} + +// PathPrefix returns the base service path, in the form: "//./" +// that is everything in a Twirp route except for the . This can be used for routing, +// for example to identify the requests that are targeted to this service in a mux. +func (s *agentDBServiceServer) PathPrefix() string { + return baseServicePath(s.pathPrefix, "livekit", "AgentDBService") +} + +var twirpFileDescriptor2 = []byte{ + // 1578 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcd,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46, 0x7c, 0x31, 0x76, 0x3c, 0x3a, 0x64, 0xa9, 0x7c, 0xb4, 0x12, 0x1f, 0x1b, 0xec, 0x39, 0xe4, + 0x87, 0xfe, 0x64, 0xe2, 0xc8, 0x46, 0x81, 0x1c, 0xee, 0x2d, 0x38, 0x6c, 0x93, 0xb9, 0xbb, 0xc4, + 0x35, 0x91, 0xbd, 0x82, 0x62, 0xe0, 0xbb, 0xee, 0xc0, 0x1e, 0x1e, 0x37, 0x8a, 0xe4, 0xf4, 0xd7, + 0x05, 0x27, 0xae, 0x09, 0xdd, 0x25, 0x9e, 0x90, 0x69, 0x2e, 0xdb, 0x1b, 0x0a, 0xb7, 0x51, 0xba, + 0x6a, 0x2e, 0x32, 0xd3, 0x5c, 0xd4, 0x22, 0x97, 0x40, 0x8c, 0x1c, 0xd9, 0x80, 0xab, 0x5c, 0xc8, + 0x4c, 0x2e, 0xd4, 0x62, 0xff, 0x84, 0xec, 0xd4, 0xf1, 0xc6, 0x8d, 0x32, 0x39, 0xdc, 0x59, 0x70, + 0xd8, 0x75, 0xbc, 0x31, 0xa6, 0x04, 0x49, 0xad, 0x12, 0x14, 0x26, 0x4a, 0x1e, 0xe6, 0x8f, 0x06, + 0x54, 0xf7, 0x45, 0x70, 0x2a, 0x82, 0x1b, 0x0a, 0xe6, 0x05, 0x14, 0x49, 0x09, 0x96, 0x7f, 0xac, + 0x35, 0xd3, 0x48, 0xd7, 0xcc, 0x07, 0x0c, 0x43, 0xe1, 0x48, 0x35, 0xd9, 0x7f, 0xa0, 0x30, 0xf4, + 0xdd, 0x68, 0xe2, 0x85, 0x5a, 0x3a, 0x8d, 0x94, 0x90, 0x93, 0x1d, 0xbd, 0x34, 0x95, 0x6d, 0x41, + 0x45, 0x35, 0x2d, 0x25, 0x07, 0x25, 0xa1, 0x07, 0x57, 0xb8, 0xc6, 0xa2, 0x28, 0x0f, 0x67, 0x5d, + 0xf6, 0x06, 0xca, 0x28, 0x43, 0x2b, 0x10, 0x61, 0xe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0xf3, 0x21, 0x14, 0x74, 0x8d, 0xc0, 0x05, 0x7b, 0xf6, + 0x44, 0x3f, 0x71, 0x4a, 0x5c, 0x75, 0xcc, 0x5f, 0x32, 0x98, 0x10, 0x64, 0xd0, 0x8e, 0xce, 0xa7, + 0x3a, 0xdc, 0x15, 0xae, 0x3a, 0x8c, 0x41, 0xd6, 0xc1, 0x7c, 0xa3, 0xb8, 0x18, 0xa7, 0x36, 0xa6, + 0x46, 0x69, 0x1d, 0x67, 0x35, 0x36, 0x32, 0x3c, 0xee, 0xe2, 0xbb, 0x8c, 0x64, 0x8f, 0x3b, 0x26, + 0xd5, 0x57, 0x78, 0x11, 0x81, 0xb6, 0x2d, 0xed, 0xc4, 0x28, 0xf0, 0x01, 0x9d, 0x5b, 0x33, 0x36, + 0xaa, 0xca, 0xd8, 0xf1, 0x46, 0xe4, 0x49, 0xe7, 0x81, 0x3c, 0xf3, 0xca, 0x13, 0x81, 0xd8, 0x93, + 0x8c, 0xe4, 0x59, 0x50, 0x9e, 0x08, 0xa0, 0xa7, 0xd9, 0x87, 0xf2, 0x5c, 0x31, 0x63, 0xcf, 0x67, + 0x65, 0x53, 0x69, 0xf4, 0xde, 0x15, 0xb5, 0x6f, 0x56, 0x33, 0x19, 0x64, 0x03, 0xff, 0x73, 0x1c, + 0x6b, 0x6a, 0x9b, 0x0e, 0xc0, 0xac, 0xc0, 0xb1, 0x47, 0x50, 0x45, 0xd4, 0xb2, 0x3f, 0x7d, 0x12, + 0x43, 0x29, 0x46, 0x3a, 0x6b, 0x15, 0x04, 0xb7, 0x34, 0xc6, 0x1e, 0x43, 0x8d, 0x94, 0xe6, 0x78, + 0xa1, 0x08, 0x64, 0x9c, 0x7f, 0x83, 0x57, 0x10, 0xdd, 0x21, 0x70, 0x67, 0x94, 0xf2, 0x02, 0x79, + 0x05, 0x59, 0x2c, 0x89, 0x29, 0x82, 0x58, 0x05, 0x90, 0xbe, 0xb4, 0x5d, 0x2b, 0x59, 0x5e, 0x96, +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xe9, 0x73, 0x5f, 0x19, 0x73, 0xf5, 0x0a, 0xab, 0x1e, 0x6d, 0x2f, 0x7e, + 0x4d, 0x7f, 0x65, 0xab, 0x17, 0x1e, 0xe8, 0x29, 0x5b, 0xbd, 0xf8, 0x1c, 0x67, 0xdb, 0x90, 0xc5, + 0xe7, 0x75, 0xca, 0xba, 0xe6, 0x5e, 0xe9, 0x29, 0xeb, 0x9a, 0x7f, 0x93, 0xb7, 0xfe, 0xfb, 0xcd, + 0xa3, 0xb1, 0x23, 0x8f, 0xa2, 0x41, 0x73, 0xe8, 0x4f, 0x9e, 0x6a, 0xea, 0x53, 0xfa, 0x92, 0x0f, + 0x7d, 0x37, 0x06, 0xbe, 0x5f, 0xae, 0xf6, 0x9c, 0x53, 0xf1, 0x3f, 0x47, 0x36, 0x77, 0xd1, 0xf4, + 0xfb, 0x72, 0x4d, 0xf7, 0x5f, 0xbf, 0x26, 0x60, 0x90, 0x27, 0x97, 0x7f, 0xff, 0x11, 0x00, 0x00, + 0xff, 0xff, 0xf2, 0xa1, 0xab, 0xe4, 0xde, 0x0f, 0x00, 0x00, +} diff --git a/livekit/livekit_cloud_agent.twirp.go b/livekit/livekit_cloud_agent.twirp.go index 27ce9a912..689ae25bc 100644 --- a/livekit/livekit_cloud_agent.twirp.go +++ b/livekit/livekit_cloud_agent.twirp.go @@ -5245,7 +5245,7 @@ func (s *cloudAgentServer) serveGetPrivateLinkStatusProtobuf(ctx context.Context } func (s *cloudAgentServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor6, 0 + return twirpFileDescriptor7, 0 } func (s *cloudAgentServer) ProtocGenTwirpVersion() string { @@ -5259,7 +5259,7 @@ func (s *cloudAgentServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "CloudAgent") } -var twirpFileDescriptor6 = []byte{ +var twirpFileDescriptor7 = []byte{ // 2600 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x6f, 0x1b, 0x4b, 0xf9, 0xcf, 0xfa, 0x2d, 0xf6, 0xe3, 0xb8, 0x71, 0x26, 0x69, 0xea, 0x38, 0x49, 0x9b, 0x6c, 0xdb, diff --git a/livekit/livekit_connector.twirp.go b/livekit/livekit_connector.twirp.go index d88f01c00..472bc090a 100644 --- a/livekit/livekit_connector.twirp.go +++ b/livekit/livekit_connector.twirp.go @@ -1618,7 +1618,7 @@ func (s *connectorServer) serveConnectTwilioCallProtobuf(ctx context.Context, re } func (s *connectorServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor8, 0 + return twirpFileDescriptor9, 0 } func (s *connectorServer) ProtocGenTwirpVersion() string { @@ -1632,7 +1632,7 @@ func (s *connectorServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "Connector") } -var twirpFileDescriptor8 = []byte{ +var twirpFileDescriptor9 = []byte{ // 313 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x4b, 0xf3, 0x30, 0x1c, 0xc6, 0xdf, 0xb7, 0xc2, 0xd4, 0xbf, 0x4e, 0x6b, 0x04, 0x85, 0x1e, 0x64, 0x5b, 0x45, 0xc1, diff --git a/livekit/livekit_egress.twirp.go b/livekit/livekit_egress.twirp.go index df5542a5a..86cf46b7c 100644 --- a/livekit/livekit_egress.twirp.go +++ b/livekit/livekit_egress.twirp.go @@ -3019,7 +3019,7 @@ func (s *egressServer) serveStartTrackEgressProtobuf(ctx context.Context, resp h } func (s *egressServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor2, 0 + return twirpFileDescriptor3, 0 } func (s *egressServer) ProtocGenTwirpVersion() string { @@ -3033,7 +3033,7 @@ func (s *egressServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "Egress") } -var twirpFileDescriptor2 = []byte{ +var twirpFileDescriptor3 = []byte{ // 4257 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3b, 0x4b, 0x70, 0x1c, 0x59, 0x52, 0xaa, 0xea, 0x7f, 0xf6, 0xaf, 0xf4, 0x24, 0x6b, 0xda, 0xf2, 0x7a, 0xec, 0x6d, 0xef, 0x8c, diff --git a/livekit/livekit_ingress.twirp.go b/livekit/livekit_ingress.twirp.go index fa7244522..acb4d95a2 100644 --- a/livekit/livekit_ingress.twirp.go +++ b/livekit/livekit_ingress.twirp.go @@ -1341,7 +1341,7 @@ func (s *ingressServer) serveDeleteIngressProtobuf(ctx context.Context, resp htt } func (s *ingressServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor3, 0 + return twirpFileDescriptor4, 0 } func (s *ingressServer) ProtocGenTwirpVersion() string { @@ -1355,7 +1355,7 @@ func (s *ingressServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "Ingress") } -var twirpFileDescriptor3 = []byte{ +var twirpFileDescriptor4 = []byte{ // 1620 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x6f, 0xdb, 0xcc, 0x11, 0x36, 0xf5, 0xad, 0x91, 0x25, 0x2b, 0x6b, 0xf9, 0x7d, 0x15, 0x7f, 0xb4, 0x82, 0x92, 0x22, diff --git a/livekit/livekit_phone_number.twirp.go b/livekit/livekit_phone_number.twirp.go index 21c6c897f..9b78d0f35 100644 --- a/livekit/livekit_phone_number.twirp.go +++ b/livekit/livekit_phone_number.twirp.go @@ -1904,7 +1904,7 @@ func (s *phoneNumberServiceServer) serveReleasePhoneNumbersProtobuf(ctx context. } func (s *phoneNumberServiceServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor7, 0 + return twirpFileDescriptor8, 0 } func (s *phoneNumberServiceServer) ProtocGenTwirpVersion() string { @@ -1918,7 +1918,7 @@ func (s *phoneNumberServiceServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "PhoneNumberService") } -var twirpFileDescriptor7 = []byte{ +var twirpFileDescriptor8 = []byte{ // 1241 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0x51, 0x6e, 0xdb, 0x46, 0x13, 0xd6, 0x52, 0xb6, 0x63, 0x8d, 0x64, 0x5b, 0xd9, 0x38, 0x09, 0x4d, 0x27, 0xb1, 0x42, 0xff, diff --git a/livekit/livekit_room.twirp.go b/livekit/livekit_room.twirp.go index eae205ebf..122269f8a 100644 --- a/livekit/livekit_room.twirp.go +++ b/livekit/livekit_room.twirp.go @@ -4152,7 +4152,7 @@ func (s *roomServiceServer) servePerformRpcProtobuf(ctx context.Context, resp ht } func (s *roomServiceServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor4, 0 + return twirpFileDescriptor5, 0 } func (s *roomServiceServer) ProtocGenTwirpVersion() string { @@ -4166,7 +4166,7 @@ func (s *roomServiceServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "RoomService") } -var twirpFileDescriptor4 = []byte{ +var twirpFileDescriptor5 = []byte{ // 1612 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x5b, 0x6f, 0x13, 0xd7, 0x16, 0x3e, 0x4e, 0x6c, 0xc7, 0x5e, 0xce, 0xcd, 0x3b, 0x01, 0x26, 0x13, 0x2e, 0x66, 0xc2, 0x39, diff --git a/livekit/livekit_sip.twirp.go b/livekit/livekit_sip.twirp.go index 3677e1398..3150829ac 100644 --- a/livekit/livekit_sip.twirp.go +++ b/livekit/livekit_sip.twirp.go @@ -4689,7 +4689,7 @@ func (s *sIPServer) serveTransferSIPParticipantProtobuf(ctx context.Context, res } func (s *sIPServer) ServiceDescriptor() ([]byte, int) { - return twirpFileDescriptor5, 0 + return twirpFileDescriptor6, 0 } func (s *sIPServer) ProtocGenTwirpVersion() string { @@ -4703,7 +4703,7 @@ func (s *sIPServer) PathPrefix() string { return baseServicePath(s.pathPrefix, "livekit", "SIP") } -var twirpFileDescriptor5 = []byte{ +var twirpFileDescriptor6 = []byte{ // 5797 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x7c, 0x69, 0x8c, 0x1b, 0xc9, 0x75, 0xb0, 0xc8, 0xe6, 0xcc, 0x70, 0x1e, 0xe7, 0xe8, 0xa9, 0x19, 0x8d, 0xa8, 0xd1, 0x35, 0x4b, diff --git a/magefile.go b/magefile.go index 7fd8b2854..9a5783d47 100644 --- a/magefile.go +++ b/magefile.go @@ -45,6 +45,7 @@ func Proto() error { twirpProtoFiles := []string{ "cloud_replay.proto", "livekit_agent_dispatch.proto", + "livekit_agentdb.proto", "livekit_egress.proto", "livekit_ingress.proto", "livekit_room.proto", @@ -170,28 +171,6 @@ func Proto() error { } } - // Own go_package, so its own invocation: protoc-gen-twirp refuses to mix - // packages in one run. - fmt.Println("generating protobuf (livekit/agentdb)") - { - args := []string{ - "--go_out", target, - "--twirp_out", target, - "--go_opt=paths=source_relative", - "--twirp_opt=paths=source_relative", - "--plugin=go=" + protocGoPath, - "--plugin=twirp=" + twirpPath, - "-I=./protobufs", - "agentdb/livekit_agentdb.proto", - "agentdb/livekit_agentdb_data.proto", - } - cmd := exec.Command(protoc, args...) - connectStd(cmd) - if err := cmd.Run(); err != nil { - return err - } - } - fmt.Println("generating protobuf (livekit/roomrpc)") for _, protoName := range roomrpcTypeNames { pkgName := "roomrpc/" + protoName + "rpc" diff --git a/protobufs/agentdb/livekit_agentdb.proto b/protobufs/agentdb/livekit_agentdb.proto deleted file mode 100644 index a8bdd347d..000000000 --- a/protobufs/agentdb/livekit_agentdb.proto +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2026 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package livekit.agentdb; - -option go_package = "github.com/livekit/protocol/livekit/agentdb"; -option csharp_namespace = "LiveKit.Proto"; -option ruby_package = "LiveKit::Proto"; - -// AgentDB hands out SQLite databases: lifecycle and export. Querying goes -// through the data plane in livekit_agentdb_data.proto. The project comes from -// the access token, never from a request field. -service AgentDB { - rpc CreateDatabase(CreateDatabaseRequest) returns (CreateDatabaseResponse); - rpc GetDatabase(GetDatabaseRequest) returns (GetDatabaseResponse); - rpc ListDatabases(ListDatabasesRequest) returns (ListDatabasesResponse); - - // Deletes the stored data too, not just the metadata row. - rpc DeleteDatabase(DeleteDatabaseRequest) returns (DeleteDatabaseResponse); - - // Exports a consistent SQLite file, returning a time-limited download URL. - rpc Dump(DumpDatabaseRequest) returns (DumpDatabaseResponse); -} - -message CreateDatabaseRequest { - string region = 1; - string user_attributes = 2; // opaque JSON metadata for the caller - int64 ttl_seconds = 3; // unset: never expires. Otherwise clamped to the server cap, and never extended -} - -message CreateDatabaseResponse { - string database_id = 1; // "DB_..." - int64 expires_at_unix = 2; // 0: never expires -} - -message GetDatabaseRequest { - string database_id = 1; -} - -message GetDatabaseResponse { - string database_id = 1; - string region = 2; - string user_attributes = 3; - int64 created_at_unix = 4; - int64 expires_at_unix = 5; // 0: never expires - int64 tip = 6; // latest durable commit sequence -} - -message ListDatabasesRequest { - int32 page_size = 1; // server-clamped - string page_token = 2; // opaque cursor from a previous response -} - -message ListDatabasesResponse { - repeated DatabaseSummary databases = 1; - string next_page_token = 2; // empty when exhausted -} - -// DatabaseSummary is a database's immutable fields. No tip: it changes on every -// commit, so call GetDatabase for it. -message DatabaseSummary { - string database_id = 1; - string region = 2; - string user_attributes = 3; - int64 created_at_unix = 4; - int64 expires_at_unix = 5; // 0: never expires -} - -message DeleteDatabaseRequest { - string database_id = 1; -} - -message DeleteDatabaseResponse {} - -message DumpDatabaseRequest { - string database_id = 1; -} - -message DumpDatabaseResponse { - string download_url = 1; // pre-authenticated object-storage URL - int64 expires_at_unix = 2; // URL expiry - int64 tip = 3; // commit sequence the dump is consistent at -} diff --git a/protobufs/agentdb/livekit_agentdb_data.proto b/protobufs/agentdb/livekit_agentdb_data.proto deleted file mode 100644 index 417612cc6..000000000 --- a/protobufs/agentdb/livekit_agentdb_data.proto +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright 2026 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package livekit.agentdb; - -option go_package = "github.com/livekit/protocol/livekit/agentdb"; -option csharp_namespace = "LiveKit.Proto"; -option ruby_package = "LiveKit::Proto"; - -// Data plane for AgentDB databases: one WebSocket per database, one -// protobuf message per frame, requests and responses correlated by a -// client-chosen request_id. -// -// Query results stream as ColumnBatch frames paced by the credits the -// client advertises (Credit): the server never sends more un-consumed -// batches than granted. - -message ClientMessage { - uint32 request_id = 1; - oneof message { - Hello hello = 2; // must be first on the socket - Statement exec = 3; // no result rows; answers ExecResult - Statement query = 4; // answers Columns + ColumnBatch* + Done - Batch batch = 5; // atomic multi-statement exec - Begin begin = 6; // interactive transaction (server enforces idle/duration timeouts) - Commit commit = 7; - Rollback rollback = 8; - Cancel cancel = 9; // stop a running query's stream/cursor - Credit credit = 10; // grant more batch credits for request_id - Ping ping = 11; - } -} - -message ServerMessage { - uint32 request_id = 1; - oneof message { - HelloOk hello_ok = 2; - Columns columns = 3; - ColumnBatch column_batch = 4; - ExecResult exec_result = 5; - Done done = 6; - Error error = 7; - Pong pong = 8; - } -} - -// QueryLang selects the query language of a statement; both execute -// against the same database. -enum QueryLang { - QUERY_LANG_SQL = 0; - QUERY_LANG_CYPHER = 1; -} - -// Value mirrors SQLite's five storage classes exactly. -message Value { - oneof value { - bool null_value = 1; // always true when set - int64 int_value = 2; - double double_value = 3; - string text_value = 4; - bytes blob_value = 5; - } -} - -message Statement { - string sql = 1; // statement text in the selected lang - repeated Value params = 2; // positional bind parameters - QueryLang lang = 3; -} - -message Batch { - repeated Statement statements = 1; // applied atomically, in order -} - -message Begin {} -message Commit {} -message Rollback {} -message Cancel {} - -message Credit { - uint32 batches = 1; // additional batch frames the client can absorb -} - -message Ping { - int64 timestamp = 1; -} - -message Pong { - int64 last_ping_timestamp = 1; - int64 timestamp = 2; -} - -message Hello { - string token = 1; // access token; authorization is checked here - string database_id = 2; -} - -message HelloOk { - int64 tip = 1; // latest durable commit sequence - uint32 ping_interval_ms = 2; // server-advertised keepalive cadence - uint32 ping_timeout_ms = 3; -} - -message Columns { - repeated string names = 1; -} - -// ValueType tags one value's storage class within a Column. -enum ValueType { - VALUE_TYPE_NULL = 0; - VALUE_TYPE_INT = 1; - VALUE_TYPE_DOUBLE = 2; - VALUE_TYPE_TEXT = 3; - VALUE_TYPE_BLOB = 4; -} - -// Column is one column of a batch. Values are typed individually, as -// SQLite types them, so a column may mix classes: walk `types` and take the next -// entry from the matching array. A NULL occupies a tag only. -message Column { - bytes types = 1; // one ValueType per row - repeated sint64 ints = 2; - repeated double doubles = 3; - // Values concatenated, one exclusive end offset each: value i is - // data[ends[i-1]:ends[i]], with 0 implied before the first. - bytes text_data = 4; - repeated uint32 text_ends = 5; - bytes blob_data = 6; - repeated uint32 blob_ends = 7; -} - -message ColumnBatch { - repeated Column columns = 1; // one per column of Columns - uint32 rows = 2; -} - -message ExecResult { - int64 rows_affected = 1; - int64 last_insert_id = 2; - int64 tip = 3; // durable commit sequence after this exec -} - -message Done { - int64 tip = 1; // snapshot the query ran at - uint64 total_rows = 2; -} - -message Error { - string code = 1; // stable machine-readable code - string message = 2; -} diff --git a/protobufs/livekit_agentdb.proto b/protobufs/livekit_agentdb.proto new file mode 100644 index 000000000..7a6686286 --- /dev/null +++ b/protobufs/livekit_agentdb.proto @@ -0,0 +1,244 @@ +// Copyright 2026 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package livekit; + +option go_package = "github.com/livekit/protocol/livekit"; +option csharp_namespace = "LiveKit.Proto"; +option ruby_package = "LiveKit::Proto"; + +// AgentDBService hands out SQLite databases: lifecycle and export. Querying +// goes through the data plane, whose frames are AgentDB.ClientMessage and +// AgentDB.ServerMessage. The project comes from the access token, never from a +// request field. +service AgentDBService { + rpc CreateDatabase(AgentDB.CreateRequest) returns (AgentDB.CreateResponse); + rpc GetDatabase(AgentDB.GetRequest) returns (AgentDB.GetResponse); + rpc ListDatabases(AgentDB.ListRequest) returns (AgentDB.ListResponse); + + // Deletes the stored data too, not just the metadata row. + rpc DeleteDatabase(AgentDB.DeleteRequest) returns (AgentDB.DeleteResponse); + + // Exports a consistent SQLite file, returning a time-limited download URL. + rpc Dump(AgentDB.DumpRequest) returns (AgentDB.DumpResponse); +} + +// AgentDB nests every message this service and its data plane use, so names +// like Value and Ping do not have to be unique across the whole livekit +// package (the DataStream container does the same). +message AgentDB { + message CreateRequest { + string region = 1; + string user_attributes = 2; // opaque JSON metadata for the caller + int64 ttl_seconds = 3; // unset: never expires. Otherwise clamped to the server cap, and never extended + } + + message CreateResponse { + string database_id = 1; // "DB_..." + int64 expires_at_unix = 2; // 0: never expires + } + + message GetRequest { + string database_id = 1; + } + + message GetResponse { + string database_id = 1; + string region = 2; + string user_attributes = 3; + int64 created_at_unix = 4; + int64 expires_at_unix = 5; // 0: never expires + int64 tip = 6; // latest durable commit sequence + } + + message ListRequest { + int32 page_size = 1; // server-clamped + string page_token = 2; // opaque cursor from a previous response + } + + message ListResponse { + repeated Summary databases = 1; + string next_page_token = 2; // empty when exhausted + } + + // Summary is a database's immutable fields. No tip: it changes on every + // commit, so call GetDatabase for it. + message Summary { + string database_id = 1; + string region = 2; + string user_attributes = 3; + int64 created_at_unix = 4; + int64 expires_at_unix = 5; // 0: never expires + } + + message DeleteRequest { + string database_id = 1; + } + + message DeleteResponse {} + + message DumpRequest { + string database_id = 1; + } + + message DumpResponse { + string download_url = 1; // pre-authenticated object-storage URL + int64 expires_at_unix = 2; // URL expiry + int64 tip = 3; // commit sequence the dump is consistent at + } + + // Data plane: one WebSocket per database, one protobuf message per frame, + // requests and responses correlated by a client-chosen request_id. + // + // Query results stream as ColumnBatch frames paced by the credits the client + // advertises (Credit): the server never sends more un-consumed batches than + // granted. + + message ClientMessage { + uint32 request_id = 1; + oneof message { + Hello hello = 2; // must be first on the socket + Statement exec = 3; // no result rows; answers ExecResult + Statement query = 4; // answers Columns + ColumnBatch* + Done + Batch batch = 5; // atomic multi-statement exec + Begin begin = 6; // interactive transaction (server enforces idle/duration timeouts) + Commit commit = 7; + Rollback rollback = 8; + Cancel cancel = 9; // stop a running query's stream/cursor + Credit credit = 10; // grant more batch credits for request_id + Ping ping = 11; + } + } + + message ServerMessage { + uint32 request_id = 1; + oneof message { + HelloOk hello_ok = 2; + Columns columns = 3; + ColumnBatch column_batch = 4; + ExecResult exec_result = 5; + Done done = 6; + Error error = 7; + Pong pong = 8; + } + } + + // QueryLang selects the query language of a statement; both execute + // against the same database. + enum QueryLang { + QUERY_LANG_SQL = 0; + QUERY_LANG_CYPHER = 1; + } + + // Value mirrors SQLite's five storage classes exactly. + message Value { + oneof value { + bool null_value = 1; // always true when set + int64 int_value = 2; + double double_value = 3; + string text_value = 4; + bytes blob_value = 5; + } + } + + message Statement { + string sql = 1; // statement text in the selected lang + repeated Value params = 2; // positional bind parameters + QueryLang lang = 3; + } + + message Batch { + repeated Statement statements = 1; // applied atomically, in order + } + + message Begin {} + message Commit {} + message Rollback {} + message Cancel {} + + message Credit { + uint32 batches = 1; // additional batch frames the client can absorb + } + + message Ping { + int64 timestamp = 1; + } + + message Pong { + int64 last_ping_timestamp = 1; + int64 timestamp = 2; + } + + message Hello { + string token = 1; // access token; authorization is checked here + string database_id = 2; + } + + message HelloOk { + int64 tip = 1; // latest durable commit sequence + uint32 ping_interval_ms = 2; // server-advertised keepalive cadence + uint32 ping_timeout_ms = 3; + } + + message Columns { + repeated string names = 1; + } + + // ValueType tags one value's storage class within a Column. + enum ValueType { + VALUE_TYPE_NULL = 0; + VALUE_TYPE_INT = 1; + VALUE_TYPE_DOUBLE = 2; + VALUE_TYPE_TEXT = 3; + VALUE_TYPE_BLOB = 4; + } + + // Column is one column of a batch. Values are typed individually, as + // SQLite types them, so a column may mix classes: walk `types` and take the next + // entry from the matching array. A NULL occupies a tag only. + message Column { + bytes types = 1; // one ValueType per row + repeated sint64 ints = 2; + repeated double doubles = 3; + // Values concatenated, one exclusive end offset each: value i is + // data[ends[i-1]:ends[i]], with 0 implied before the first. + bytes text_data = 4; + repeated uint32 text_ends = 5; + bytes blob_data = 6; + repeated uint32 blob_ends = 7; + } + + message ColumnBatch { + repeated Column columns = 1; // one per column of Columns + uint32 rows = 2; + } + + message ExecResult { + int64 rows_affected = 1; + int64 last_insert_id = 2; + int64 tip = 3; // durable commit sequence after this exec + } + + message Done { + int64 tip = 1; // snapshot the query ran at + uint64 total_rows = 2; + } + + message Error { + string code = 1; // stable machine-readable code + string message = 2; + } +} From 9fd858babcd7716607956e500610036ff10db4dc Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 06:10:07 +0000 Subject: [PATCH 14/24] generated protobuf --- livekit/livekit_agentdb.pb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livekit/livekit_agentdb.pb.go b/livekit/livekit_agentdb.pb.go index 252819264..c8a2349b5 100644 --- a/livekit/livekit_agentdb.pb.go +++ b/livekit/livekit_agentdb.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v7.35.1 // source: livekit_agentdb.proto package livekit From 9fd83488aa32a182a5c189a5b6312321798b056f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Wed, 5 Aug 2026 14:21:49 -0700 Subject: [PATCH 15/24] agentdb: trim comments, drop the Cypher enum value Comments say only what the shape does not. ttl_seconds keeps its semantics (unset never expires, and expires_at_unix is 0 then) stated once rather than repeated on four messages, tip is defined once on the container, and the column encoding keeps its explanation because nothing about the field names implies it. The restatements are gone. QueryLang loses QUERY_LANG_CYPHER: the graph language is not public, so the protocol should not name it. The number is reserved so nothing reuses it. --- livekit/livekit_agentdb.pb.go | 110 ++++++++-------- livekit/livekit_agentdb.twirp.go | 210 +++++++++++++++---------------- protobufs/livekit_agentdb.proto | 98 +++++++-------- 3 files changed, 201 insertions(+), 217 deletions(-) diff --git a/livekit/livekit_agentdb.pb.go b/livekit/livekit_agentdb.pb.go index c8a2349b5..31d6994c2 100644 --- a/livekit/livekit_agentdb.pb.go +++ b/livekit/livekit_agentdb.pb.go @@ -35,24 +35,19 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// QueryLang selects the query language of a statement; both execute -// against the same database. type AgentDB_QueryLang int32 const ( - AgentDB_QUERY_LANG_SQL AgentDB_QueryLang = 0 - AgentDB_QUERY_LANG_CYPHER AgentDB_QueryLang = 1 + AgentDB_QUERY_LANG_SQL AgentDB_QueryLang = 0 ) // Enum value maps for AgentDB_QueryLang. var ( AgentDB_QueryLang_name = map[int32]string{ 0: "QUERY_LANG_SQL", - 1: "QUERY_LANG_CYPHER", } AgentDB_QueryLang_value = map[string]int32{ - "QUERY_LANG_SQL": 0, - "QUERY_LANG_CYPHER": 1, + "QUERY_LANG_SQL": 0, } ) @@ -83,7 +78,6 @@ func (AgentDB_QueryLang) EnumDescriptor() ([]byte, []int) { return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 0} } -// ValueType tags one value's storage class within a Column. type AgentDB_ValueType int32 const ( @@ -139,9 +133,8 @@ func (AgentDB_ValueType) EnumDescriptor() ([]byte, []int) { return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 1} } -// AgentDB nests every message this service and its data plane use, so names -// like Value and Ping do not have to be unique across the whole livekit -// package (the DataStream container does the same). +// Nested so that names like Value and Ping need not be unique across the +// livekit package. `tip` throughout is the latest durable commit sequence. type AgentDB struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -182,9 +175,11 @@ type AgentDB_CreateRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` UserAttributes string `protobuf:"bytes,2,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` // opaque JSON metadata for the caller - TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` // unset: never expires. Otherwise clamped to the server cap, and never extended - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Unset: never expires, and expires_at_unix is then 0 everywhere. + // Otherwise clamped to the server cap, and never extended. + TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AgentDB_CreateRequest) Reset() { @@ -240,8 +235,8 @@ func (x *AgentDB_CreateRequest) GetTtlSeconds() int64 { type AgentDB_CreateResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` // "DB_..." - ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` // "DB_..." + ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -340,8 +335,8 @@ type AgentDB_GetResponse struct { Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` - ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires - Tip int64 `protobuf:"varint,6,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence + ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` + Tip int64 `protobuf:"varint,6,opt,name=tip,proto3" json:"tip,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -420,8 +415,8 @@ func (x *AgentDB_GetResponse) GetTip() int64 { type AgentDB_ListRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // server-clamped - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // opaque cursor from a previous response + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // server-clamped + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -522,15 +517,15 @@ func (x *AgentDB_ListResponse) GetNextPageToken() string { return "" } -// Summary is a database's immutable fields. No tip: it changes on every -// commit, so call GetDatabase for it. +// Immutable fields only, so a listing needs no per-database read. No tip: it +// moves on every commit. type AgentDB_Summary struct { state protoimpl.MessageState `protogen:"open.v1"` DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` - ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // 0: never expires + ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -727,8 +722,8 @@ func (x *AgentDB_DumpRequest) GetDatabaseId() string { type AgentDB_DumpResponse struct { state protoimpl.MessageState `protogen:"open.v1"` DownloadUrl string `protobuf:"bytes,1,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"` // pre-authenticated object-storage URL - ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // URL expiry - Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // commit sequence the dump is consistent at + ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // of the URL, not the database + Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // what the dump is consistent at unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -947,7 +942,7 @@ type AgentDB_ClientMessage_Hello struct { } type AgentDB_ClientMessage_Exec struct { - Exec *AgentDB_Statement `protobuf:"bytes,3,opt,name=exec,proto3,oneof"` // no result rows; answers ExecResult + Exec *AgentDB_Statement `protobuf:"bytes,3,opt,name=exec,proto3,oneof"` // answers ExecResult } type AgentDB_ClientMessage_Query struct { @@ -955,11 +950,11 @@ type AgentDB_ClientMessage_Query struct { } type AgentDB_ClientMessage_Batch struct { - Batch *AgentDB_Batch `protobuf:"bytes,5,opt,name=batch,proto3,oneof"` // atomic multi-statement exec + Batch *AgentDB_Batch `protobuf:"bytes,5,opt,name=batch,proto3,oneof"` } type AgentDB_ClientMessage_Begin struct { - Begin *AgentDB_Begin `protobuf:"bytes,6,opt,name=begin,proto3,oneof"` // interactive transaction (server enforces idle/duration timeouts) + Begin *AgentDB_Begin `protobuf:"bytes,6,opt,name=begin,proto3,oneof"` } type AgentDB_ClientMessage_Commit struct { @@ -971,11 +966,11 @@ type AgentDB_ClientMessage_Rollback struct { } type AgentDB_ClientMessage_Cancel struct { - Cancel *AgentDB_Cancel `protobuf:"bytes,9,opt,name=cancel,proto3,oneof"` // stop a running query's stream/cursor + Cancel *AgentDB_Cancel `protobuf:"bytes,9,opt,name=cancel,proto3,oneof"` } type AgentDB_ClientMessage_Credit struct { - Credit *AgentDB_Credit `protobuf:"bytes,10,opt,name=credit,proto3,oneof"` // grant more batch credits for request_id + Credit *AgentDB_Credit `protobuf:"bytes,10,opt,name=credit,proto3,oneof"` } type AgentDB_ClientMessage_Ping struct { @@ -1172,7 +1167,7 @@ func (*AgentDB_ServerMessage_Error) isAgentDB_ServerMessage_Message() {} func (*AgentDB_ServerMessage_Pong) isAgentDB_ServerMessage_Message() {} -// Value mirrors SQLite's five storage classes exactly. +// SQLite's five storage classes. type AgentDB_Value struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Value: @@ -1305,8 +1300,8 @@ func (*AgentDB_Value_BlobValue) isAgentDB_Value_Value() {} type AgentDB_Statement struct { state protoimpl.MessageState `protogen:"open.v1"` - Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` // statement text in the selected lang - Params []*AgentDB_Value `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` // positional bind parameters + Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` + Params []*AgentDB_Value `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` // positional Lang AgentDB_QueryLang `protobuf:"varint,3,opt,name=lang,proto3,enum=livekit.AgentDB_QueryLang" json:"lang,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -1553,7 +1548,7 @@ func (*AgentDB_Cancel) Descriptor() ([]byte, []int) { type AgentDB_Credit struct { state protoimpl.MessageState `protogen:"open.v1"` - Batches uint32 `protobuf:"varint,1,opt,name=batches,proto3" json:"batches,omitempty"` // additional batch frames the client can absorb + Batches uint32 `protobuf:"varint,1,opt,name=batches,proto3" json:"batches,omitempty"` // additional batches the client can absorb unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1693,7 +1688,7 @@ func (x *AgentDB_Pong) GetTimestamp() int64 { type AgentDB_Hello struct { state protoimpl.MessageState `protogen:"open.v1"` - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // access token; authorization is checked here + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` DatabaseId string `protobuf:"bytes,2,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -1745,8 +1740,8 @@ func (x *AgentDB_Hello) GetDatabaseId() string { type AgentDB_HelloOk struct { state protoimpl.MessageState `protogen:"open.v1"` - Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // latest durable commit sequence - PingIntervalMs uint32 `protobuf:"varint,2,opt,name=ping_interval_ms,json=pingIntervalMs,proto3" json:"ping_interval_ms,omitempty"` // server-advertised keepalive cadence + Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` + PingIntervalMs uint32 `protobuf:"varint,2,opt,name=ping_interval_ms,json=pingIntervalMs,proto3" json:"ping_interval_ms,omitempty"` PingTimeoutMs uint32 `protobuf:"varint,3,opt,name=ping_timeout_ms,json=pingTimeoutMs,proto3" json:"ping_timeout_ms,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -1847,20 +1842,20 @@ func (x *AgentDB_Columns) GetNames() []string { return nil } -// Column is one column of a batch. Values are typed individually, as -// SQLite types them, so a column may mix classes: walk `types` and take the next -// entry from the matching array. A NULL occupies a tag only. +// Values are typed per row, as SQLite types them, so a column may mix +// classes: walk `types` and take the next entry from the matching array. Text +// and blobs are concatenated with one exclusive end offset each, so value i +// is data[ends[i-1]:ends[i]] with 0 implied before the first. A NULL occupies +// a tag only. type AgentDB_Column struct { - state protoimpl.MessageState `protogen:"open.v1"` - Types []byte `protobuf:"bytes,1,opt,name=types,proto3" json:"types,omitempty"` // one ValueType per row - Ints []int64 `protobuf:"zigzag64,2,rep,packed,name=ints,proto3" json:"ints,omitempty"` - Doubles []float64 `protobuf:"fixed64,3,rep,packed,name=doubles,proto3" json:"doubles,omitempty"` - // Values concatenated, one exclusive end offset each: value i is - // data[ends[i-1]:ends[i]], with 0 implied before the first. - TextData []byte `protobuf:"bytes,4,opt,name=text_data,json=textData,proto3" json:"text_data,omitempty"` - TextEnds []uint32 `protobuf:"varint,5,rep,packed,name=text_ends,json=textEnds,proto3" json:"text_ends,omitempty"` - BlobData []byte `protobuf:"bytes,6,opt,name=blob_data,json=blobData,proto3" json:"blob_data,omitempty"` - BlobEnds []uint32 `protobuf:"varint,7,rep,packed,name=blob_ends,json=blobEnds,proto3" json:"blob_ends,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Types []byte `protobuf:"bytes,1,opt,name=types,proto3" json:"types,omitempty"` // one ValueType per row + Ints []int64 `protobuf:"zigzag64,2,rep,packed,name=ints,proto3" json:"ints,omitempty"` + Doubles []float64 `protobuf:"fixed64,3,rep,packed,name=doubles,proto3" json:"doubles,omitempty"` + TextData []byte `protobuf:"bytes,4,opt,name=text_data,json=textData,proto3" json:"text_data,omitempty"` + TextEnds []uint32 `protobuf:"varint,5,rep,packed,name=text_ends,json=textEnds,proto3" json:"text_ends,omitempty"` + BlobData []byte `protobuf:"bytes,6,opt,name=blob_data,json=blobData,proto3" json:"blob_data,omitempty"` + BlobEnds []uint32 `protobuf:"varint,7,rep,packed,name=blob_ends,json=blobEnds,proto3" json:"blob_ends,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1946,7 +1941,7 @@ func (x *AgentDB_Column) GetBlobEnds() []uint32 { type AgentDB_ColumnBatch struct { state protoimpl.MessageState `protogen:"open.v1"` - Columns []*AgentDB_Column `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` // one per column of Columns + Columns []*AgentDB_Column `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` // one per name in Columns Rows uint32 `protobuf:"varint,2,opt,name=rows,proto3" json:"rows,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -2000,7 +1995,7 @@ type AgentDB_ExecResult struct { state protoimpl.MessageState `protogen:"open.v1"` RowsAffected int64 `protobuf:"varint,1,opt,name=rows_affected,json=rowsAffected,proto3" json:"rows_affected,omitempty"` LastInsertId int64 `protobuf:"varint,2,opt,name=last_insert_id,json=lastInsertId,proto3" json:"last_insert_id,omitempty"` - Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // durable commit sequence after this exec + Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2058,7 +2053,7 @@ func (x *AgentDB_ExecResult) GetTip() int64 { type AgentDB_Done struct { state protoimpl.MessageState `protogen:"open.v1"` - Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // snapshot the query ran at + Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // the snapshot the query ran at TotalRows uint64 `protobuf:"varint,2,opt,name=total_rows,json=totalRows,proto3" json:"total_rows,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -2110,7 +2105,7 @@ func (x *AgentDB_Done) GetTotalRows() uint64 { type AgentDB_Error struct { state protoimpl.MessageState `protogen:"open.v1"` - Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // stable machine-readable code + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // stable, machine-readable Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -2164,7 +2159,7 @@ var File_livekit_agentdb_proto protoreflect.FileDescriptor const file_livekit_agentdb_proto_rawDesc = "" + "\n" + - "\x15livekit_agentdb.proto\x12\alivekit\"\xd5\x1b\n" + + "\x15livekit_agentdb.proto\x12\alivekit\"\xc4\x1b\n" + "\aAgentDB\x1aq\n" + "\rCreateRequest\x12\x16\n" + "\x06region\x18\x01 \x01(\tR\x06region\x12'\n" + @@ -2301,10 +2296,9 @@ const file_livekit_agentdb_proto_rawDesc = "" + "total_rows\x18\x02 \x01(\x04R\ttotalRows\x1a5\n" + "\x05Error\x12\x12\n" + "\x04code\x18\x01 \x01(\tR\x04code\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage\"6\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"%\n" + "\tQueryLang\x12\x12\n" + - "\x0eQUERY_LANG_SQL\x10\x00\x12\x15\n" + - "\x11QUERY_LANG_CYPHER\x10\x01\"u\n" + + "\x0eQUERY_LANG_SQL\x10\x00\"\x04\b\x01\x10\x01\"u\n" + "\tValueType\x12\x13\n" + "\x0fVALUE_TYPE_NULL\x10\x00\x12\x12\n" + "\x0eVALUE_TYPE_INT\x10\x01\x12\x15\n" + diff --git a/livekit/livekit_agentdb.twirp.go b/livekit/livekit_agentdb.twirp.go index 06c17a861..f71ab91fd 100644 --- a/livekit/livekit_agentdb.twirp.go +++ b/livekit/livekit_agentdb.twirp.go @@ -26,10 +26,8 @@ const _ = twirp.TwirpPackageMinVersion_8_1_0 // AgentDBService Interface // ======================== -// AgentDBService hands out SQLite databases: lifecycle and export. Querying -// goes through the data plane, whose frames are AgentDB.ClientMessage and -// AgentDB.ServerMessage. The project comes from the access token, never from a -// request field. +// AgentDBService is the lifecycle and export API for SQLite databases; queries +// run over the data plane below. The project comes from the access token. type AgentDBService interface { CreateDatabase(context.Context, *AgentDB_CreateRequest) (*AgentDB_CreateResponse, error) @@ -37,10 +35,10 @@ type AgentDBService interface { ListDatabases(context.Context, *AgentDB_ListRequest) (*AgentDB_ListResponse, error) - // Deletes the stored data too, not just the metadata row. + // Deletes the stored data, not just the metadata. DeleteDatabase(context.Context, *AgentDB_DeleteRequest) (*AgentDB_DeleteResponse, error) - // Exports a consistent SQLite file, returning a time-limited download URL. + // Exports a consistent SQLite file as a time-limited download URL. Dump(context.Context, *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) } @@ -1639,104 +1637,104 @@ func (s *agentDBServiceServer) PathPrefix() string { } var twirpFileDescriptor2 = []byte{ - // 1578 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcd, 0x6e, 0x1b, 0x47,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a8, 0xfb, 0x0b, 0x23, 0x74, - 0xce, 0xc4, 0x90, 0x13, 0xa5, 0xbb, 0xc4, 0x41, 0x24, 0x3d, 0x0c, 0xec, 0xc8, 0xf7, 0x84, 0x56, - 0xd6, 0x62, 0x60, 0xdb, 0xbe, 0x27, 0x30, 0xb0, 0x48, 0x42, 0x1d, 0x8a, 0x20, 0xf0, 0x03, 0x2d, - 0xab, 0x45, 0x1d, 0x76, 0xd0, 0x8a, 0x3a, 0x24, 0x1a, 0x65, 0xcd, 0xf7, 0xc6, 0x5a, 0x50, 0x29, - 0x59, 0xf3, 0x75, 0xd6, 0xfc, 0x8b, 0x59, 0xfb, 0x29, 0x03, 0xb9, 0x8f, 0xb6, 0x1b, 0xe1, 0x75, - 0x08, 0x5e, 0xe4, 0xba, 0xd6, 0x29, 0xf6, 0x28, 0x5b, 0xc5, 0xee, 0x12, 0x2f, 0x21, 0xa6, 0x08, - 0xab, 0x50, 0x72, 0x3c, 0xa9, 0xed, 0x54, 0x45, 0x50, 0x9d, 0x8e, 0x27, 0x95, 0xf9, 0x11, 0x56, - 0xa3, 0x68, 0xe0, 0x0a, 0xcd, 0xc0, 0xe4, 0x64, 0x30, 0x86, 0x0a, 0x4d, 0x26, 0x91, 0x78, 0x39, - 0x28, 0x0a, 0x26, 0xa1, 0x84, 0x93, 0x20, 0x96, 0x10, 0x06, 0xae, 0x3f, 0xd0, 0x04, 0x8c, 0x71, - 0x05, 0x09, 0x88, 0x11, 0xa1, 0x55, 0x80, 0x1c, 0xd9, 0xcc, 0x6f, 0xa1, 0x94, 0x9c, 0x77, 0xac, - 0x5f, 0xe1, 0x49, 0x5c, 0x01, 0xb1, 0xc9, 0x9a, 0x90, 0x9f, 0xda, 0x81, 0x3d, 0xc1, 0x87, 0x8b, - 0x91, 0x1a, 0x41, 0x1a, 0x8f, 0x6b, 0x16, 0x6b, 0x42, 0xd6, 0xb5, 0xbd, 0x31, 0x2d, 0xbb, 0x96, - 0x52, 0x5b, 0xf6, 0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x74, 0x8d, 0xc0, 0x05, 0x7b, 0xf6, - 0x44, 0x3f, 0x71, 0x4a, 0x5c, 0x75, 0xcc, 0x5f, 0x32, 0x98, 0x10, 0x64, 0xd0, 0x8e, 0xce, 0xa7, - 0x3a, 0xdc, 0x15, 0xae, 0x3a, 0x8c, 0x41, 0xd6, 0xc1, 0x7c, 0xa3, 0xb8, 0x18, 0xa7, 0x36, 0xa6, - 0x46, 0x69, 0x1d, 0x67, 0x35, 0x36, 0x32, 0x3c, 0xee, 0xe2, 0xbb, 0x8c, 0x64, 0x8f, 0x3b, 0x26, - 0xd5, 0x57, 0x78, 0x11, 0x81, 0xb6, 0x2d, 0xed, 0xc4, 0x28, 0xf0, 0x01, 0x9d, 0x5b, 0x33, 0x36, - 0xaa, 0xca, 0xd8, 0xf1, 0x46, 0xe4, 0x49, 0xe7, 0x81, 0x3c, 0xf3, 0xca, 0x13, 0x81, 0xd8, 0x93, - 0x8c, 0xe4, 0x59, 0x50, 0x9e, 0x08, 0xa0, 0xa7, 0xd9, 0x87, 0xf2, 0x5c, 0x31, 0x63, 0xcf, 0x67, - 0x65, 0x53, 0x69, 0xf4, 0xde, 0x15, 0xb5, 0x6f, 0x56, 0x33, 0x19, 0x64, 0x03, 0xff, 0x73, 0x1c, - 0x6b, 0x6a, 0x9b, 0x0e, 0xc0, 0xac, 0xc0, 0xb1, 0x47, 0x50, 0x45, 0xd4, 0xb2, 0x3f, 0x7d, 0x12, - 0x43, 0x29, 0x46, 0x3a, 0x6b, 0x15, 0x04, 0xb7, 0x34, 0xc6, 0x1e, 0x43, 0x8d, 0x94, 0xe6, 0x78, - 0xa1, 0x08, 0x64, 0x9c, 0x7f, 0x83, 0x57, 0x10, 0xdd, 0x21, 0x70, 0x67, 0x94, 0xf2, 0x02, 0x79, - 0x05, 0x59, 0x2c, 0x89, 0x29, 0x82, 0x58, 0x05, 0x90, 0xbe, 0xb4, 0x5d, 0x2b, 0x59, 0x5e, 0x96, - 0x97, 0x08, 0xe1, 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x19, 0x73, 0xf5, 0x0a, 0xab, 0x1e, 0x6d, 0x2f, 0x7e, - 0x4d, 0x7f, 0x65, 0xab, 0x17, 0x1e, 0xe8, 0x29, 0x5b, 0xbd, 0xf8, 0x1c, 0x67, 0xdb, 0x90, 0xc5, - 0xe7, 0x75, 0xca, 0xba, 0xe6, 0x5e, 0xe9, 0x29, 0xeb, 0x9a, 0x7f, 0x93, 0xb7, 0xfe, 0xfb, 0xcd, - 0xa3, 0xb1, 0x23, 0x8f, 0xa2, 0x41, 0x73, 0xe8, 0x4f, 0x9e, 0x6a, 0xea, 0x53, 0xfa, 0x92, 0x0f, - 0x7d, 0x37, 0x06, 0xbe, 0x5f, 0xae, 0xf6, 0x9c, 0x53, 0xf1, 0x3f, 0x47, 0x36, 0x77, 0xd1, 0xf4, - 0xfb, 0x72, 0x4d, 0xf7, 0x5f, 0xbf, 0x26, 0x60, 0x90, 0x27, 0x97, 0x7f, 0xff, 0x11, 0x00, 0x00, - 0xff, 0xff, 0xf2, 0xa1, 0xab, 0xe4, 0xde, 0x0f, 0x00, 0x00, + // 1573 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcd, 0x72, 0xdb, 0x46, + 0x12, 0x26, 0x05, 0xfe, 0x36, 0x7f, 0x44, 0x8f, 0xd7, 0x36, 0x17, 0xb6, 0xd6, 0x5a, 0xd9, 0xeb, + 0x55, 0xd5, 0xd6, 0xd2, 0xb6, 0x12, 0xc7, 0x55, 0x3e, 0xb8, 0x4a, 0x14, 0x19, 0x53, 0x15, 0xda, + 0x96, 0x20, 0xca, 0x15, 0xe7, 0x82, 0x02, 0x89, 0x31, 0x85, 0x12, 0x7e, 0x28, 0x60, 0x20, 0x4b, + 0xae, 0xca, 0x53, 0xe4, 0x2d, 0x72, 0xc8, 0x25, 0x87, 0x1c, 0x72, 0xc9, 0x21, 0x2f, 0x90, 0xd7, + 0xc8, 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, 0x12, 0x72, 0xdb, 0x11, 0x6d, 0xb8, 0xcc, 0x85, 0xcc, 0xe4, + 0x42, 0x2d, 0xf6, 0x3f, 0x28, 0xcc, 0x1c, 0x7f, 0xda, 0xae, 0x91, 0xc3, 0xad, 0x05, 0x87, 0x1d, + 0xc7, 0x9f, 0x62, 0x4a, 0x90, 0xd4, 0xad, 0x42, 0xd9, 0x93, 0xf2, 0xd0, 0x7f, 0xd6, 0xa0, 0xb1, + 0xc7, 0xc3, 0x63, 0x1e, 0x5e, 0x53, 0x30, 0xcf, 0xa0, 0x42, 0x4a, 0x30, 0x83, 0x43, 0xa5, 0x99, + 0x76, 0xb6, 0x66, 0xde, 0x62, 0x18, 0xca, 0x07, 0xb2, 0xc9, 0xbe, 0x84, 0xf2, 0x24, 0x70, 0x63, + 0xcf, 0x8f, 0x94, 0x74, 0xda, 0x19, 0x21, 0x27, 0x3b, 0x7a, 0x29, 0x2a, 0xdb, 0x84, 0xba, 0x6c, + 0x9a, 0x52, 0x0e, 0x52, 0x42, 0xf7, 0x2e, 0x71, 0x4d, 0x44, 0x51, 0x9b, 0xcc, 0xbb, 0xec, 0x25, + 0xd4, 0x50, 0x86, 0x66, 0xc8, 0xa3, 0xd8, 0x15, 0x4a, 0x50, 0x77, 0x17, 0x46, 0xe8, 0x9f, 0xf0, + 0x89, 0x41, 0x94, 0x41, 0xce, 0x00, 0x9e, 0xf6, 0x30, 0xb0, 0x76, 0xe0, 0x73, 0xa5, 0xac, 0xc5, + 0xc0, 0xf6, 0x02, 0x9f, 0x63, 0x60, 0x91, 0x84, 0x3a, 0xe4, 0x61, 0x18, 0x84, 0x4a, 0x56, 0x8b, + 0x3a, 0xec, 0xa3, 0x15, 0x75, 0x48, 0x34, 0xca, 0x5a, 0xe0, 0x4f, 0x95, 0xa0, 0x32, 0xb2, 0x16, + 0xa8, 0xac, 0x05, 0xe7, 0xb3, 0xf6, 0x4b, 0x1e, 0x8a, 0xef, 0x2c, 0x37, 0xc6, 0xeb, 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0xc6, 0x11, 0x9d, 0x1d, 0x34, 0xfd, 0xb9, 0xd4, 0x54, 0xfd, 0x17, + 0x2f, 0x08, 0x18, 0x97, 0xc8, 0xe5, 0x8b, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x5f, 0x55, + 0x99, 0xcd, 0x0f, 0x00, 0x00, } diff --git a/protobufs/livekit_agentdb.proto b/protobufs/livekit_agentdb.proto index 7a6686286..0cbc036f4 100644 --- a/protobufs/livekit_agentdb.proto +++ b/protobufs/livekit_agentdb.proto @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + syntax = "proto3"; package livekit; @@ -20,35 +21,32 @@ option go_package = "github.com/livekit/protocol/livekit"; option csharp_namespace = "LiveKit.Proto"; option ruby_package = "LiveKit::Proto"; -// AgentDBService hands out SQLite databases: lifecycle and export. Querying -// goes through the data plane, whose frames are AgentDB.ClientMessage and -// AgentDB.ServerMessage. The project comes from the access token, never from a -// request field. +// AgentDBService is the lifecycle and export API for SQLite databases; queries +// run over the data plane below. The project comes from the access token. service AgentDBService { rpc CreateDatabase(AgentDB.CreateRequest) returns (AgentDB.CreateResponse); rpc GetDatabase(AgentDB.GetRequest) returns (AgentDB.GetResponse); rpc ListDatabases(AgentDB.ListRequest) returns (AgentDB.ListResponse); - - // Deletes the stored data too, not just the metadata row. + // Deletes the stored data, not just the metadata. rpc DeleteDatabase(AgentDB.DeleteRequest) returns (AgentDB.DeleteResponse); - - // Exports a consistent SQLite file, returning a time-limited download URL. + // Exports a consistent SQLite file as a time-limited download URL. rpc Dump(AgentDB.DumpRequest) returns (AgentDB.DumpResponse); } -// AgentDB nests every message this service and its data plane use, so names -// like Value and Ping do not have to be unique across the whole livekit -// package (the DataStream container does the same). +// Nested so that names like Value and Ping need not be unique across the +// livekit package. `tip` throughout is the latest durable commit sequence. message AgentDB { message CreateRequest { string region = 1; string user_attributes = 2; // opaque JSON metadata for the caller - int64 ttl_seconds = 3; // unset: never expires. Otherwise clamped to the server cap, and never extended + // Unset: never expires, and expires_at_unix is then 0 everywhere. + // Otherwise clamped to the server cap, and never extended. + int64 ttl_seconds = 3; } message CreateResponse { string database_id = 1; // "DB_..." - int64 expires_at_unix = 2; // 0: never expires + int64 expires_at_unix = 2; } message GetRequest { @@ -60,13 +58,13 @@ message AgentDB { string region = 2; string user_attributes = 3; int64 created_at_unix = 4; - int64 expires_at_unix = 5; // 0: never expires - int64 tip = 6; // latest durable commit sequence + int64 expires_at_unix = 5; + int64 tip = 6; } message ListRequest { int32 page_size = 1; // server-clamped - string page_token = 2; // opaque cursor from a previous response + string page_token = 2; } message ListResponse { @@ -74,14 +72,14 @@ message AgentDB { string next_page_token = 2; // empty when exhausted } - // Summary is a database's immutable fields. No tip: it changes on every - // commit, so call GetDatabase for it. + // Immutable fields only, so a listing needs no per-database read. No tip: it + // moves on every commit. message Summary { string database_id = 1; string region = 2; string user_attributes = 3; int64 created_at_unix = 4; - int64 expires_at_unix = 5; // 0: never expires + int64 expires_at_unix = 5; } message DeleteRequest { @@ -96,29 +94,26 @@ message AgentDB { message DumpResponse { string download_url = 1; // pre-authenticated object-storage URL - int64 expires_at_unix = 2; // URL expiry - int64 tip = 3; // commit sequence the dump is consistent at + int64 expires_at_unix = 2; // of the URL, not the database + int64 tip = 3; // what the dump is consistent at } - // Data plane: one WebSocket per database, one protobuf message per frame, - // requests and responses correlated by a client-chosen request_id. - // - // Query results stream as ColumnBatch frames paced by the credits the client - // advertises (Credit): the server never sends more un-consumed batches than - // granted. + // Data plane: one WebSocket per database, one message per frame, correlated + // by a client-chosen request_id. Result batches are paced by Credit, so the + // server never sends more un-consumed batches than granted. message ClientMessage { uint32 request_id = 1; oneof message { Hello hello = 2; // must be first on the socket - Statement exec = 3; // no result rows; answers ExecResult + Statement exec = 3; // answers ExecResult Statement query = 4; // answers Columns + ColumnBatch* + Done - Batch batch = 5; // atomic multi-statement exec - Begin begin = 6; // interactive transaction (server enforces idle/duration timeouts) + Batch batch = 5; + Begin begin = 6; Commit commit = 7; Rollback rollback = 8; - Cancel cancel = 9; // stop a running query's stream/cursor - Credit credit = 10; // grant more batch credits for request_id + Cancel cancel = 9; + Credit credit = 10; Ping ping = 11; } } @@ -136,14 +131,12 @@ message AgentDB { } } - // QueryLang selects the query language of a statement; both execute - // against the same database. enum QueryLang { QUERY_LANG_SQL = 0; - QUERY_LANG_CYPHER = 1; + reserved 1; } - // Value mirrors SQLite's five storage classes exactly. + // SQLite's five storage classes. message Value { oneof value { bool null_value = 1; // always true when set @@ -155,8 +148,8 @@ message AgentDB { } message Statement { - string sql = 1; // statement text in the selected lang - repeated Value params = 2; // positional bind parameters + string sql = 1; + repeated Value params = 2; // positional QueryLang lang = 3; } @@ -170,7 +163,7 @@ message AgentDB { message Cancel {} message Credit { - uint32 batches = 1; // additional batch frames the client can absorb + uint32 batches = 1; // additional batches the client can absorb } message Ping { @@ -183,13 +176,13 @@ message AgentDB { } message Hello { - string token = 1; // access token; authorization is checked here + string token = 1; string database_id = 2; } message HelloOk { - int64 tip = 1; // latest durable commit sequence - uint32 ping_interval_ms = 2; // server-advertised keepalive cadence + int64 tip = 1; + uint32 ping_interval_ms = 2; uint32 ping_timeout_ms = 3; } @@ -197,7 +190,6 @@ message AgentDB { repeated string names = 1; } - // ValueType tags one value's storage class within a Column. enum ValueType { VALUE_TYPE_NULL = 0; VALUE_TYPE_INT = 1; @@ -206,15 +198,15 @@ message AgentDB { VALUE_TYPE_BLOB = 4; } - // Column is one column of a batch. Values are typed individually, as - // SQLite types them, so a column may mix classes: walk `types` and take the next - // entry from the matching array. A NULL occupies a tag only. + // Values are typed per row, as SQLite types them, so a column may mix + // classes: walk `types` and take the next entry from the matching array. Text + // and blobs are concatenated with one exclusive end offset each, so value i + // is data[ends[i-1]:ends[i]] with 0 implied before the first. A NULL occupies + // a tag only. message Column { - bytes types = 1; // one ValueType per row + bytes types = 1; // one ValueType per row repeated sint64 ints = 2; repeated double doubles = 3; - // Values concatenated, one exclusive end offset each: value i is - // data[ends[i-1]:ends[i]], with 0 implied before the first. bytes text_data = 4; repeated uint32 text_ends = 5; bytes blob_data = 6; @@ -222,23 +214,23 @@ message AgentDB { } message ColumnBatch { - repeated Column columns = 1; // one per column of Columns + repeated Column columns = 1; // one per name in Columns uint32 rows = 2; } message ExecResult { int64 rows_affected = 1; int64 last_insert_id = 2; - int64 tip = 3; // durable commit sequence after this exec + int64 tip = 3; } message Done { - int64 tip = 1; // snapshot the query ran at + int64 tip = 1; // the snapshot the query ran at uint64 total_rows = 2; } message Error { - string code = 1; // stable machine-readable code + string code = 1; // stable, machine-readable string message = 2; } } From d418aadfd88f73013a03ff4ef993990e06a175c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Wed, 5 Aug 2026 14:31:28 -0700 Subject: [PATCH 16/24] agentdb: group the data plane under AgentDB.Wire The container held two audiences at once: the Twirp control surface and the WebSocket frames, separated only by a comment. Nesting the frames under Wire makes the split structural, so a type name says which plane it belongs to, and it stays one file with one top-level message. --- livekit/livekit_agentdb.pb.go | 1127 ++++++++++++++++-------------- livekit/livekit_agentdb.twirp.go | 201 +++--- protobufs/livekit_agentdb.proto | 221 +++--- 3 files changed, 796 insertions(+), 753 deletions(-) diff --git a/livekit/livekit_agentdb.pb.go b/livekit/livekit_agentdb.pb.go index 31d6994c2..f62643ce7 100644 --- a/livekit/livekit_agentdb.pb.go +++ b/livekit/livekit_agentdb.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.35.1 +// protoc v7.34.1 // source: livekit_agentdb.proto package livekit @@ -35,69 +35,69 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type AgentDB_QueryLang int32 +type AgentDB_Wire_QueryLang int32 const ( - AgentDB_QUERY_LANG_SQL AgentDB_QueryLang = 0 + AgentDB_Wire_QUERY_LANG_SQL AgentDB_Wire_QueryLang = 0 ) -// Enum value maps for AgentDB_QueryLang. +// Enum value maps for AgentDB_Wire_QueryLang. var ( - AgentDB_QueryLang_name = map[int32]string{ + AgentDB_Wire_QueryLang_name = map[int32]string{ 0: "QUERY_LANG_SQL", } - AgentDB_QueryLang_value = map[string]int32{ + AgentDB_Wire_QueryLang_value = map[string]int32{ "QUERY_LANG_SQL": 0, } ) -func (x AgentDB_QueryLang) Enum() *AgentDB_QueryLang { - p := new(AgentDB_QueryLang) +func (x AgentDB_Wire_QueryLang) Enum() *AgentDB_Wire_QueryLang { + p := new(AgentDB_Wire_QueryLang) *p = x return p } -func (x AgentDB_QueryLang) String() string { +func (x AgentDB_Wire_QueryLang) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (AgentDB_QueryLang) Descriptor() protoreflect.EnumDescriptor { +func (AgentDB_Wire_QueryLang) Descriptor() protoreflect.EnumDescriptor { return file_livekit_agentdb_proto_enumTypes[0].Descriptor() } -func (AgentDB_QueryLang) Type() protoreflect.EnumType { +func (AgentDB_Wire_QueryLang) Type() protoreflect.EnumType { return &file_livekit_agentdb_proto_enumTypes[0] } -func (x AgentDB_QueryLang) Number() protoreflect.EnumNumber { +func (x AgentDB_Wire_QueryLang) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use AgentDB_QueryLang.Descriptor instead. -func (AgentDB_QueryLang) EnumDescriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 0} +// Deprecated: Use AgentDB_Wire_QueryLang.Descriptor instead. +func (AgentDB_Wire_QueryLang) EnumDescriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 0} } -type AgentDB_ValueType int32 +type AgentDB_Wire_ValueType int32 const ( - AgentDB_VALUE_TYPE_NULL AgentDB_ValueType = 0 - AgentDB_VALUE_TYPE_INT AgentDB_ValueType = 1 - AgentDB_VALUE_TYPE_DOUBLE AgentDB_ValueType = 2 - AgentDB_VALUE_TYPE_TEXT AgentDB_ValueType = 3 - AgentDB_VALUE_TYPE_BLOB AgentDB_ValueType = 4 + AgentDB_Wire_VALUE_TYPE_NULL AgentDB_Wire_ValueType = 0 + AgentDB_Wire_VALUE_TYPE_INT AgentDB_Wire_ValueType = 1 + AgentDB_Wire_VALUE_TYPE_DOUBLE AgentDB_Wire_ValueType = 2 + AgentDB_Wire_VALUE_TYPE_TEXT AgentDB_Wire_ValueType = 3 + AgentDB_Wire_VALUE_TYPE_BLOB AgentDB_Wire_ValueType = 4 ) -// Enum value maps for AgentDB_ValueType. +// Enum value maps for AgentDB_Wire_ValueType. var ( - AgentDB_ValueType_name = map[int32]string{ + AgentDB_Wire_ValueType_name = map[int32]string{ 0: "VALUE_TYPE_NULL", 1: "VALUE_TYPE_INT", 2: "VALUE_TYPE_DOUBLE", 3: "VALUE_TYPE_TEXT", 4: "VALUE_TYPE_BLOB", } - AgentDB_ValueType_value = map[string]int32{ + AgentDB_Wire_ValueType_value = map[string]int32{ "VALUE_TYPE_NULL": 0, "VALUE_TYPE_INT": 1, "VALUE_TYPE_DOUBLE": 2, @@ -106,31 +106,31 @@ var ( } ) -func (x AgentDB_ValueType) Enum() *AgentDB_ValueType { - p := new(AgentDB_ValueType) +func (x AgentDB_Wire_ValueType) Enum() *AgentDB_Wire_ValueType { + p := new(AgentDB_Wire_ValueType) *p = x return p } -func (x AgentDB_ValueType) String() string { +func (x AgentDB_Wire_ValueType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (AgentDB_ValueType) Descriptor() protoreflect.EnumDescriptor { +func (AgentDB_Wire_ValueType) Descriptor() protoreflect.EnumDescriptor { return file_livekit_agentdb_proto_enumTypes[1].Descriptor() } -func (AgentDB_ValueType) Type() protoreflect.EnumType { +func (AgentDB_Wire_ValueType) Type() protoreflect.EnumType { return &file_livekit_agentdb_proto_enumTypes[1] } -func (x AgentDB_ValueType) Number() protoreflect.EnumNumber { +func (x AgentDB_Wire_ValueType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use AgentDB_ValueType.Descriptor instead. -func (AgentDB_ValueType) EnumDescriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 1} +// Deprecated: Use AgentDB_Wire_ValueType.Descriptor instead. +func (AgentDB_Wire_ValueType) EnumDescriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 1} } // Nested so that names like Value and Ping need not be unique across the @@ -779,41 +779,80 @@ func (x *AgentDB_DumpResponse) GetTip() int64 { return 0 } -type AgentDB_ClientMessage struct { +// Data plane: one WebSocket per database, one message per frame, correlated +// by a client-chosen request_id. Result batches are paced by Credit, so the +// server never sends more un-consumed batches than granted. +type AgentDB_Wire struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AgentDB_Wire) Reset() { + *x = AgentDB_Wire{} + mi := &file_livekit_agentdb_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AgentDB_Wire) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentDB_Wire) ProtoMessage() {} + +func (x *AgentDB_Wire) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentDB_Wire.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11} +} + +type AgentDB_Wire_ClientMessage struct { state protoimpl.MessageState `protogen:"open.v1"` RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // Types that are valid to be assigned to Message: // - // *AgentDB_ClientMessage_Hello - // *AgentDB_ClientMessage_Exec - // *AgentDB_ClientMessage_Query - // *AgentDB_ClientMessage_Batch - // *AgentDB_ClientMessage_Begin - // *AgentDB_ClientMessage_Commit - // *AgentDB_ClientMessage_Rollback - // *AgentDB_ClientMessage_Cancel - // *AgentDB_ClientMessage_Credit - // *AgentDB_ClientMessage_Ping - Message isAgentDB_ClientMessage_Message `protobuf_oneof:"message"` + // *AgentDB_Wire_ClientMessage_Hello + // *AgentDB_Wire_ClientMessage_Exec + // *AgentDB_Wire_ClientMessage_Query + // *AgentDB_Wire_ClientMessage_Batch + // *AgentDB_Wire_ClientMessage_Begin + // *AgentDB_Wire_ClientMessage_Commit + // *AgentDB_Wire_ClientMessage_Rollback + // *AgentDB_Wire_ClientMessage_Cancel + // *AgentDB_Wire_ClientMessage_Credit + // *AgentDB_Wire_ClientMessage_Ping + Message isAgentDB_Wire_ClientMessage_Message `protobuf_oneof:"message"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_ClientMessage) Reset() { - *x = AgentDB_ClientMessage{} - mi := &file_livekit_agentdb_proto_msgTypes[12] +func (x *AgentDB_Wire_ClientMessage) Reset() { + *x = AgentDB_Wire_ClientMessage{} + mi := &file_livekit_agentdb_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_ClientMessage) String() string { +func (x *AgentDB_Wire_ClientMessage) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_ClientMessage) ProtoMessage() {} +func (*AgentDB_Wire_ClientMessage) ProtoMessage() {} -func (x *AgentDB_ClientMessage) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[12] +func (x *AgentDB_Wire_ClientMessage) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -824,211 +863,211 @@ func (x *AgentDB_ClientMessage) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_ClientMessage.ProtoReflect.Descriptor instead. -func (*AgentDB_ClientMessage) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11} +// Deprecated: Use AgentDB_Wire_ClientMessage.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_ClientMessage) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 0} } -func (x *AgentDB_ClientMessage) GetRequestId() uint32 { +func (x *AgentDB_Wire_ClientMessage) GetRequestId() uint32 { if x != nil { return x.RequestId } return 0 } -func (x *AgentDB_ClientMessage) GetMessage() isAgentDB_ClientMessage_Message { +func (x *AgentDB_Wire_ClientMessage) GetMessage() isAgentDB_Wire_ClientMessage_Message { if x != nil { return x.Message } return nil } -func (x *AgentDB_ClientMessage) GetHello() *AgentDB_Hello { +func (x *AgentDB_Wire_ClientMessage) GetHello() *AgentDB_Wire_Hello { if x != nil { - if x, ok := x.Message.(*AgentDB_ClientMessage_Hello); ok { + if x, ok := x.Message.(*AgentDB_Wire_ClientMessage_Hello); ok { return x.Hello } } return nil } -func (x *AgentDB_ClientMessage) GetExec() *AgentDB_Statement { +func (x *AgentDB_Wire_ClientMessage) GetExec() *AgentDB_Wire_Statement { if x != nil { - if x, ok := x.Message.(*AgentDB_ClientMessage_Exec); ok { + if x, ok := x.Message.(*AgentDB_Wire_ClientMessage_Exec); ok { return x.Exec } } return nil } -func (x *AgentDB_ClientMessage) GetQuery() *AgentDB_Statement { +func (x *AgentDB_Wire_ClientMessage) GetQuery() *AgentDB_Wire_Statement { if x != nil { - if x, ok := x.Message.(*AgentDB_ClientMessage_Query); ok { + if x, ok := x.Message.(*AgentDB_Wire_ClientMessage_Query); ok { return x.Query } } return nil } -func (x *AgentDB_ClientMessage) GetBatch() *AgentDB_Batch { +func (x *AgentDB_Wire_ClientMessage) GetBatch() *AgentDB_Wire_Batch { if x != nil { - if x, ok := x.Message.(*AgentDB_ClientMessage_Batch); ok { + if x, ok := x.Message.(*AgentDB_Wire_ClientMessage_Batch); ok { return x.Batch } } return nil } -func (x *AgentDB_ClientMessage) GetBegin() *AgentDB_Begin { +func (x *AgentDB_Wire_ClientMessage) GetBegin() *AgentDB_Wire_Begin { if x != nil { - if x, ok := x.Message.(*AgentDB_ClientMessage_Begin); ok { + if x, ok := x.Message.(*AgentDB_Wire_ClientMessage_Begin); ok { return x.Begin } } return nil } -func (x *AgentDB_ClientMessage) GetCommit() *AgentDB_Commit { +func (x *AgentDB_Wire_ClientMessage) GetCommit() *AgentDB_Wire_Commit { if x != nil { - if x, ok := x.Message.(*AgentDB_ClientMessage_Commit); ok { + if x, ok := x.Message.(*AgentDB_Wire_ClientMessage_Commit); ok { return x.Commit } } return nil } -func (x *AgentDB_ClientMessage) GetRollback() *AgentDB_Rollback { +func (x *AgentDB_Wire_ClientMessage) GetRollback() *AgentDB_Wire_Rollback { if x != nil { - if x, ok := x.Message.(*AgentDB_ClientMessage_Rollback); ok { + if x, ok := x.Message.(*AgentDB_Wire_ClientMessage_Rollback); ok { return x.Rollback } } return nil } -func (x *AgentDB_ClientMessage) GetCancel() *AgentDB_Cancel { +func (x *AgentDB_Wire_ClientMessage) GetCancel() *AgentDB_Wire_Cancel { if x != nil { - if x, ok := x.Message.(*AgentDB_ClientMessage_Cancel); ok { + if x, ok := x.Message.(*AgentDB_Wire_ClientMessage_Cancel); ok { return x.Cancel } } return nil } -func (x *AgentDB_ClientMessage) GetCredit() *AgentDB_Credit { +func (x *AgentDB_Wire_ClientMessage) GetCredit() *AgentDB_Wire_Credit { if x != nil { - if x, ok := x.Message.(*AgentDB_ClientMessage_Credit); ok { + if x, ok := x.Message.(*AgentDB_Wire_ClientMessage_Credit); ok { return x.Credit } } return nil } -func (x *AgentDB_ClientMessage) GetPing() *AgentDB_Ping { +func (x *AgentDB_Wire_ClientMessage) GetPing() *AgentDB_Wire_Ping { if x != nil { - if x, ok := x.Message.(*AgentDB_ClientMessage_Ping); ok { + if x, ok := x.Message.(*AgentDB_Wire_ClientMessage_Ping); ok { return x.Ping } } return nil } -type isAgentDB_ClientMessage_Message interface { - isAgentDB_ClientMessage_Message() +type isAgentDB_Wire_ClientMessage_Message interface { + isAgentDB_Wire_ClientMessage_Message() } -type AgentDB_ClientMessage_Hello struct { - Hello *AgentDB_Hello `protobuf:"bytes,2,opt,name=hello,proto3,oneof"` // must be first on the socket +type AgentDB_Wire_ClientMessage_Hello struct { + Hello *AgentDB_Wire_Hello `protobuf:"bytes,2,opt,name=hello,proto3,oneof"` // must be first on the socket } -type AgentDB_ClientMessage_Exec struct { - Exec *AgentDB_Statement `protobuf:"bytes,3,opt,name=exec,proto3,oneof"` // answers ExecResult +type AgentDB_Wire_ClientMessage_Exec struct { + Exec *AgentDB_Wire_Statement `protobuf:"bytes,3,opt,name=exec,proto3,oneof"` // answers ExecResult } -type AgentDB_ClientMessage_Query struct { - Query *AgentDB_Statement `protobuf:"bytes,4,opt,name=query,proto3,oneof"` // answers Columns + ColumnBatch* + Done +type AgentDB_Wire_ClientMessage_Query struct { + Query *AgentDB_Wire_Statement `protobuf:"bytes,4,opt,name=query,proto3,oneof"` // answers Columns + ColumnBatch* + Done } -type AgentDB_ClientMessage_Batch struct { - Batch *AgentDB_Batch `protobuf:"bytes,5,opt,name=batch,proto3,oneof"` +type AgentDB_Wire_ClientMessage_Batch struct { + Batch *AgentDB_Wire_Batch `protobuf:"bytes,5,opt,name=batch,proto3,oneof"` } -type AgentDB_ClientMessage_Begin struct { - Begin *AgentDB_Begin `protobuf:"bytes,6,opt,name=begin,proto3,oneof"` +type AgentDB_Wire_ClientMessage_Begin struct { + Begin *AgentDB_Wire_Begin `protobuf:"bytes,6,opt,name=begin,proto3,oneof"` } -type AgentDB_ClientMessage_Commit struct { - Commit *AgentDB_Commit `protobuf:"bytes,7,opt,name=commit,proto3,oneof"` +type AgentDB_Wire_ClientMessage_Commit struct { + Commit *AgentDB_Wire_Commit `protobuf:"bytes,7,opt,name=commit,proto3,oneof"` } -type AgentDB_ClientMessage_Rollback struct { - Rollback *AgentDB_Rollback `protobuf:"bytes,8,opt,name=rollback,proto3,oneof"` +type AgentDB_Wire_ClientMessage_Rollback struct { + Rollback *AgentDB_Wire_Rollback `protobuf:"bytes,8,opt,name=rollback,proto3,oneof"` } -type AgentDB_ClientMessage_Cancel struct { - Cancel *AgentDB_Cancel `protobuf:"bytes,9,opt,name=cancel,proto3,oneof"` +type AgentDB_Wire_ClientMessage_Cancel struct { + Cancel *AgentDB_Wire_Cancel `protobuf:"bytes,9,opt,name=cancel,proto3,oneof"` } -type AgentDB_ClientMessage_Credit struct { - Credit *AgentDB_Credit `protobuf:"bytes,10,opt,name=credit,proto3,oneof"` +type AgentDB_Wire_ClientMessage_Credit struct { + Credit *AgentDB_Wire_Credit `protobuf:"bytes,10,opt,name=credit,proto3,oneof"` } -type AgentDB_ClientMessage_Ping struct { - Ping *AgentDB_Ping `protobuf:"bytes,11,opt,name=ping,proto3,oneof"` +type AgentDB_Wire_ClientMessage_Ping struct { + Ping *AgentDB_Wire_Ping `protobuf:"bytes,11,opt,name=ping,proto3,oneof"` } -func (*AgentDB_ClientMessage_Hello) isAgentDB_ClientMessage_Message() {} +func (*AgentDB_Wire_ClientMessage_Hello) isAgentDB_Wire_ClientMessage_Message() {} -func (*AgentDB_ClientMessage_Exec) isAgentDB_ClientMessage_Message() {} +func (*AgentDB_Wire_ClientMessage_Exec) isAgentDB_Wire_ClientMessage_Message() {} -func (*AgentDB_ClientMessage_Query) isAgentDB_ClientMessage_Message() {} +func (*AgentDB_Wire_ClientMessage_Query) isAgentDB_Wire_ClientMessage_Message() {} -func (*AgentDB_ClientMessage_Batch) isAgentDB_ClientMessage_Message() {} +func (*AgentDB_Wire_ClientMessage_Batch) isAgentDB_Wire_ClientMessage_Message() {} -func (*AgentDB_ClientMessage_Begin) isAgentDB_ClientMessage_Message() {} +func (*AgentDB_Wire_ClientMessage_Begin) isAgentDB_Wire_ClientMessage_Message() {} -func (*AgentDB_ClientMessage_Commit) isAgentDB_ClientMessage_Message() {} +func (*AgentDB_Wire_ClientMessage_Commit) isAgentDB_Wire_ClientMessage_Message() {} -func (*AgentDB_ClientMessage_Rollback) isAgentDB_ClientMessage_Message() {} +func (*AgentDB_Wire_ClientMessage_Rollback) isAgentDB_Wire_ClientMessage_Message() {} -func (*AgentDB_ClientMessage_Cancel) isAgentDB_ClientMessage_Message() {} +func (*AgentDB_Wire_ClientMessage_Cancel) isAgentDB_Wire_ClientMessage_Message() {} -func (*AgentDB_ClientMessage_Credit) isAgentDB_ClientMessage_Message() {} +func (*AgentDB_Wire_ClientMessage_Credit) isAgentDB_Wire_ClientMessage_Message() {} -func (*AgentDB_ClientMessage_Ping) isAgentDB_ClientMessage_Message() {} +func (*AgentDB_Wire_ClientMessage_Ping) isAgentDB_Wire_ClientMessage_Message() {} -type AgentDB_ServerMessage struct { +type AgentDB_Wire_ServerMessage struct { state protoimpl.MessageState `protogen:"open.v1"` RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // Types that are valid to be assigned to Message: // - // *AgentDB_ServerMessage_HelloOk - // *AgentDB_ServerMessage_Columns - // *AgentDB_ServerMessage_ColumnBatch - // *AgentDB_ServerMessage_ExecResult - // *AgentDB_ServerMessage_Done - // *AgentDB_ServerMessage_Error - // *AgentDB_ServerMessage_Pong - Message isAgentDB_ServerMessage_Message `protobuf_oneof:"message"` + // *AgentDB_Wire_ServerMessage_HelloOk + // *AgentDB_Wire_ServerMessage_Columns + // *AgentDB_Wire_ServerMessage_ColumnBatch + // *AgentDB_Wire_ServerMessage_ExecResult + // *AgentDB_Wire_ServerMessage_Done + // *AgentDB_Wire_ServerMessage_Error + // *AgentDB_Wire_ServerMessage_Pong + Message isAgentDB_Wire_ServerMessage_Message `protobuf_oneof:"message"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_ServerMessage) Reset() { - *x = AgentDB_ServerMessage{} - mi := &file_livekit_agentdb_proto_msgTypes[13] +func (x *AgentDB_Wire_ServerMessage) Reset() { + *x = AgentDB_Wire_ServerMessage{} + mi := &file_livekit_agentdb_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_ServerMessage) String() string { +func (x *AgentDB_Wire_ServerMessage) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_ServerMessage) ProtoMessage() {} +func (*AgentDB_Wire_ServerMessage) ProtoMessage() {} -func (x *AgentDB_ServerMessage) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[13] +func (x *AgentDB_Wire_ServerMessage) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1039,164 +1078,164 @@ func (x *AgentDB_ServerMessage) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_ServerMessage.ProtoReflect.Descriptor instead. -func (*AgentDB_ServerMessage) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 12} +// Deprecated: Use AgentDB_Wire_ServerMessage.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_ServerMessage) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 1} } -func (x *AgentDB_ServerMessage) GetRequestId() uint32 { +func (x *AgentDB_Wire_ServerMessage) GetRequestId() uint32 { if x != nil { return x.RequestId } return 0 } -func (x *AgentDB_ServerMessage) GetMessage() isAgentDB_ServerMessage_Message { +func (x *AgentDB_Wire_ServerMessage) GetMessage() isAgentDB_Wire_ServerMessage_Message { if x != nil { return x.Message } return nil } -func (x *AgentDB_ServerMessage) GetHelloOk() *AgentDB_HelloOk { +func (x *AgentDB_Wire_ServerMessage) GetHelloOk() *AgentDB_Wire_HelloOk { if x != nil { - if x, ok := x.Message.(*AgentDB_ServerMessage_HelloOk); ok { + if x, ok := x.Message.(*AgentDB_Wire_ServerMessage_HelloOk); ok { return x.HelloOk } } return nil } -func (x *AgentDB_ServerMessage) GetColumns() *AgentDB_Columns { +func (x *AgentDB_Wire_ServerMessage) GetColumns() *AgentDB_Wire_Columns { if x != nil { - if x, ok := x.Message.(*AgentDB_ServerMessage_Columns); ok { + if x, ok := x.Message.(*AgentDB_Wire_ServerMessage_Columns); ok { return x.Columns } } return nil } -func (x *AgentDB_ServerMessage) GetColumnBatch() *AgentDB_ColumnBatch { +func (x *AgentDB_Wire_ServerMessage) GetColumnBatch() *AgentDB_Wire_ColumnBatch { if x != nil { - if x, ok := x.Message.(*AgentDB_ServerMessage_ColumnBatch); ok { + if x, ok := x.Message.(*AgentDB_Wire_ServerMessage_ColumnBatch); ok { return x.ColumnBatch } } return nil } -func (x *AgentDB_ServerMessage) GetExecResult() *AgentDB_ExecResult { +func (x *AgentDB_Wire_ServerMessage) GetExecResult() *AgentDB_Wire_ExecResult { if x != nil { - if x, ok := x.Message.(*AgentDB_ServerMessage_ExecResult); ok { + if x, ok := x.Message.(*AgentDB_Wire_ServerMessage_ExecResult); ok { return x.ExecResult } } return nil } -func (x *AgentDB_ServerMessage) GetDone() *AgentDB_Done { +func (x *AgentDB_Wire_ServerMessage) GetDone() *AgentDB_Wire_Done { if x != nil { - if x, ok := x.Message.(*AgentDB_ServerMessage_Done); ok { + if x, ok := x.Message.(*AgentDB_Wire_ServerMessage_Done); ok { return x.Done } } return nil } -func (x *AgentDB_ServerMessage) GetError() *AgentDB_Error { +func (x *AgentDB_Wire_ServerMessage) GetError() *AgentDB_Wire_Error { if x != nil { - if x, ok := x.Message.(*AgentDB_ServerMessage_Error); ok { + if x, ok := x.Message.(*AgentDB_Wire_ServerMessage_Error); ok { return x.Error } } return nil } -func (x *AgentDB_ServerMessage) GetPong() *AgentDB_Pong { +func (x *AgentDB_Wire_ServerMessage) GetPong() *AgentDB_Wire_Pong { if x != nil { - if x, ok := x.Message.(*AgentDB_ServerMessage_Pong); ok { + if x, ok := x.Message.(*AgentDB_Wire_ServerMessage_Pong); ok { return x.Pong } } return nil } -type isAgentDB_ServerMessage_Message interface { - isAgentDB_ServerMessage_Message() +type isAgentDB_Wire_ServerMessage_Message interface { + isAgentDB_Wire_ServerMessage_Message() } -type AgentDB_ServerMessage_HelloOk struct { - HelloOk *AgentDB_HelloOk `protobuf:"bytes,2,opt,name=hello_ok,json=helloOk,proto3,oneof"` +type AgentDB_Wire_ServerMessage_HelloOk struct { + HelloOk *AgentDB_Wire_HelloOk `protobuf:"bytes,2,opt,name=hello_ok,json=helloOk,proto3,oneof"` } -type AgentDB_ServerMessage_Columns struct { - Columns *AgentDB_Columns `protobuf:"bytes,3,opt,name=columns,proto3,oneof"` +type AgentDB_Wire_ServerMessage_Columns struct { + Columns *AgentDB_Wire_Columns `protobuf:"bytes,3,opt,name=columns,proto3,oneof"` } -type AgentDB_ServerMessage_ColumnBatch struct { - ColumnBatch *AgentDB_ColumnBatch `protobuf:"bytes,4,opt,name=column_batch,json=columnBatch,proto3,oneof"` +type AgentDB_Wire_ServerMessage_ColumnBatch struct { + ColumnBatch *AgentDB_Wire_ColumnBatch `protobuf:"bytes,4,opt,name=column_batch,json=columnBatch,proto3,oneof"` } -type AgentDB_ServerMessage_ExecResult struct { - ExecResult *AgentDB_ExecResult `protobuf:"bytes,5,opt,name=exec_result,json=execResult,proto3,oneof"` +type AgentDB_Wire_ServerMessage_ExecResult struct { + ExecResult *AgentDB_Wire_ExecResult `protobuf:"bytes,5,opt,name=exec_result,json=execResult,proto3,oneof"` } -type AgentDB_ServerMessage_Done struct { - Done *AgentDB_Done `protobuf:"bytes,6,opt,name=done,proto3,oneof"` +type AgentDB_Wire_ServerMessage_Done struct { + Done *AgentDB_Wire_Done `protobuf:"bytes,6,opt,name=done,proto3,oneof"` } -type AgentDB_ServerMessage_Error struct { - Error *AgentDB_Error `protobuf:"bytes,7,opt,name=error,proto3,oneof"` +type AgentDB_Wire_ServerMessage_Error struct { + Error *AgentDB_Wire_Error `protobuf:"bytes,7,opt,name=error,proto3,oneof"` } -type AgentDB_ServerMessage_Pong struct { - Pong *AgentDB_Pong `protobuf:"bytes,8,opt,name=pong,proto3,oneof"` +type AgentDB_Wire_ServerMessage_Pong struct { + Pong *AgentDB_Wire_Pong `protobuf:"bytes,8,opt,name=pong,proto3,oneof"` } -func (*AgentDB_ServerMessage_HelloOk) isAgentDB_ServerMessage_Message() {} +func (*AgentDB_Wire_ServerMessage_HelloOk) isAgentDB_Wire_ServerMessage_Message() {} -func (*AgentDB_ServerMessage_Columns) isAgentDB_ServerMessage_Message() {} +func (*AgentDB_Wire_ServerMessage_Columns) isAgentDB_Wire_ServerMessage_Message() {} -func (*AgentDB_ServerMessage_ColumnBatch) isAgentDB_ServerMessage_Message() {} +func (*AgentDB_Wire_ServerMessage_ColumnBatch) isAgentDB_Wire_ServerMessage_Message() {} -func (*AgentDB_ServerMessage_ExecResult) isAgentDB_ServerMessage_Message() {} +func (*AgentDB_Wire_ServerMessage_ExecResult) isAgentDB_Wire_ServerMessage_Message() {} -func (*AgentDB_ServerMessage_Done) isAgentDB_ServerMessage_Message() {} +func (*AgentDB_Wire_ServerMessage_Done) isAgentDB_Wire_ServerMessage_Message() {} -func (*AgentDB_ServerMessage_Error) isAgentDB_ServerMessage_Message() {} +func (*AgentDB_Wire_ServerMessage_Error) isAgentDB_Wire_ServerMessage_Message() {} -func (*AgentDB_ServerMessage_Pong) isAgentDB_ServerMessage_Message() {} +func (*AgentDB_Wire_ServerMessage_Pong) isAgentDB_Wire_ServerMessage_Message() {} // SQLite's five storage classes. -type AgentDB_Value struct { +type AgentDB_Wire_Value struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Value: // - // *AgentDB_Value_NullValue - // *AgentDB_Value_IntValue - // *AgentDB_Value_DoubleValue - // *AgentDB_Value_TextValue - // *AgentDB_Value_BlobValue - Value isAgentDB_Value_Value `protobuf_oneof:"value"` + // *AgentDB_Wire_Value_NullValue + // *AgentDB_Wire_Value_IntValue + // *AgentDB_Wire_Value_DoubleValue + // *AgentDB_Wire_Value_TextValue + // *AgentDB_Wire_Value_BlobValue + Value isAgentDB_Wire_Value_Value `protobuf_oneof:"value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_Value) Reset() { - *x = AgentDB_Value{} - mi := &file_livekit_agentdb_proto_msgTypes[14] +func (x *AgentDB_Wire_Value) Reset() { + *x = AgentDB_Wire_Value{} + mi := &file_livekit_agentdb_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Value) String() string { +func (x *AgentDB_Wire_Value) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Value) ProtoMessage() {} +func (*AgentDB_Wire_Value) ProtoMessage() {} -func (x *AgentDB_Value) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[14] +func (x *AgentDB_Wire_Value) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1207,121 +1246,121 @@ func (x *AgentDB_Value) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Value.ProtoReflect.Descriptor instead. -func (*AgentDB_Value) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 13} +// Deprecated: Use AgentDB_Wire_Value.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Value) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 2} } -func (x *AgentDB_Value) GetValue() isAgentDB_Value_Value { +func (x *AgentDB_Wire_Value) GetValue() isAgentDB_Wire_Value_Value { if x != nil { return x.Value } return nil } -func (x *AgentDB_Value) GetNullValue() bool { +func (x *AgentDB_Wire_Value) GetNullValue() bool { if x != nil { - if x, ok := x.Value.(*AgentDB_Value_NullValue); ok { + if x, ok := x.Value.(*AgentDB_Wire_Value_NullValue); ok { return x.NullValue } } return false } -func (x *AgentDB_Value) GetIntValue() int64 { +func (x *AgentDB_Wire_Value) GetIntValue() int64 { if x != nil { - if x, ok := x.Value.(*AgentDB_Value_IntValue); ok { + if x, ok := x.Value.(*AgentDB_Wire_Value_IntValue); ok { return x.IntValue } } return 0 } -func (x *AgentDB_Value) GetDoubleValue() float64 { +func (x *AgentDB_Wire_Value) GetDoubleValue() float64 { if x != nil { - if x, ok := x.Value.(*AgentDB_Value_DoubleValue); ok { + if x, ok := x.Value.(*AgentDB_Wire_Value_DoubleValue); ok { return x.DoubleValue } } return 0 } -func (x *AgentDB_Value) GetTextValue() string { +func (x *AgentDB_Wire_Value) GetTextValue() string { if x != nil { - if x, ok := x.Value.(*AgentDB_Value_TextValue); ok { + if x, ok := x.Value.(*AgentDB_Wire_Value_TextValue); ok { return x.TextValue } } return "" } -func (x *AgentDB_Value) GetBlobValue() []byte { +func (x *AgentDB_Wire_Value) GetBlobValue() []byte { if x != nil { - if x, ok := x.Value.(*AgentDB_Value_BlobValue); ok { + if x, ok := x.Value.(*AgentDB_Wire_Value_BlobValue); ok { return x.BlobValue } } return nil } -type isAgentDB_Value_Value interface { - isAgentDB_Value_Value() +type isAgentDB_Wire_Value_Value interface { + isAgentDB_Wire_Value_Value() } -type AgentDB_Value_NullValue struct { +type AgentDB_Wire_Value_NullValue struct { NullValue bool `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,oneof"` // always true when set } -type AgentDB_Value_IntValue struct { +type AgentDB_Wire_Value_IntValue struct { IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` } -type AgentDB_Value_DoubleValue struct { +type AgentDB_Wire_Value_DoubleValue struct { DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"` } -type AgentDB_Value_TextValue struct { +type AgentDB_Wire_Value_TextValue struct { TextValue string `protobuf:"bytes,4,opt,name=text_value,json=textValue,proto3,oneof"` } -type AgentDB_Value_BlobValue struct { +type AgentDB_Wire_Value_BlobValue struct { BlobValue []byte `protobuf:"bytes,5,opt,name=blob_value,json=blobValue,proto3,oneof"` } -func (*AgentDB_Value_NullValue) isAgentDB_Value_Value() {} +func (*AgentDB_Wire_Value_NullValue) isAgentDB_Wire_Value_Value() {} -func (*AgentDB_Value_IntValue) isAgentDB_Value_Value() {} +func (*AgentDB_Wire_Value_IntValue) isAgentDB_Wire_Value_Value() {} -func (*AgentDB_Value_DoubleValue) isAgentDB_Value_Value() {} +func (*AgentDB_Wire_Value_DoubleValue) isAgentDB_Wire_Value_Value() {} -func (*AgentDB_Value_TextValue) isAgentDB_Value_Value() {} +func (*AgentDB_Wire_Value_TextValue) isAgentDB_Wire_Value_Value() {} -func (*AgentDB_Value_BlobValue) isAgentDB_Value_Value() {} +func (*AgentDB_Wire_Value_BlobValue) isAgentDB_Wire_Value_Value() {} -type AgentDB_Statement struct { +type AgentDB_Wire_Statement struct { state protoimpl.MessageState `protogen:"open.v1"` Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` - Params []*AgentDB_Value `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` // positional - Lang AgentDB_QueryLang `protobuf:"varint,3,opt,name=lang,proto3,enum=livekit.AgentDB_QueryLang" json:"lang,omitempty"` + Params []*AgentDB_Wire_Value `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` // positional + Lang AgentDB_Wire_QueryLang `protobuf:"varint,3,opt,name=lang,proto3,enum=livekit.AgentDB_Wire_QueryLang" json:"lang,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_Statement) Reset() { - *x = AgentDB_Statement{} - mi := &file_livekit_agentdb_proto_msgTypes[15] +func (x *AgentDB_Wire_Statement) Reset() { + *x = AgentDB_Wire_Statement{} + mi := &file_livekit_agentdb_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Statement) String() string { +func (x *AgentDB_Wire_Statement) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Statement) ProtoMessage() {} +func (*AgentDB_Wire_Statement) ProtoMessage() {} -func (x *AgentDB_Statement) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[15] +func (x *AgentDB_Wire_Statement) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1332,54 +1371,54 @@ func (x *AgentDB_Statement) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Statement.ProtoReflect.Descriptor instead. -func (*AgentDB_Statement) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 14} +// Deprecated: Use AgentDB_Wire_Statement.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Statement) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 3} } -func (x *AgentDB_Statement) GetSql() string { +func (x *AgentDB_Wire_Statement) GetSql() string { if x != nil { return x.Sql } return "" } -func (x *AgentDB_Statement) GetParams() []*AgentDB_Value { +func (x *AgentDB_Wire_Statement) GetParams() []*AgentDB_Wire_Value { if x != nil { return x.Params } return nil } -func (x *AgentDB_Statement) GetLang() AgentDB_QueryLang { +func (x *AgentDB_Wire_Statement) GetLang() AgentDB_Wire_QueryLang { if x != nil { return x.Lang } - return AgentDB_QUERY_LANG_SQL + return AgentDB_Wire_QUERY_LANG_SQL } -type AgentDB_Batch struct { - state protoimpl.MessageState `protogen:"open.v1"` - Statements []*AgentDB_Statement `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"` // applied atomically, in order +type AgentDB_Wire_Batch struct { + state protoimpl.MessageState `protogen:"open.v1"` + Statements []*AgentDB_Wire_Statement `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"` // applied atomically, in order unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_Batch) Reset() { - *x = AgentDB_Batch{} - mi := &file_livekit_agentdb_proto_msgTypes[16] +func (x *AgentDB_Wire_Batch) Reset() { + *x = AgentDB_Wire_Batch{} + mi := &file_livekit_agentdb_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Batch) String() string { +func (x *AgentDB_Wire_Batch) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Batch) ProtoMessage() {} +func (*AgentDB_Wire_Batch) ProtoMessage() {} -func (x *AgentDB_Batch) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[16] +func (x *AgentDB_Wire_Batch) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1390,39 +1429,39 @@ func (x *AgentDB_Batch) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Batch.ProtoReflect.Descriptor instead. -func (*AgentDB_Batch) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 15} +// Deprecated: Use AgentDB_Wire_Batch.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Batch) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 4} } -func (x *AgentDB_Batch) GetStatements() []*AgentDB_Statement { +func (x *AgentDB_Wire_Batch) GetStatements() []*AgentDB_Wire_Statement { if x != nil { return x.Statements } return nil } -type AgentDB_Begin struct { +type AgentDB_Wire_Begin struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_Begin) Reset() { - *x = AgentDB_Begin{} - mi := &file_livekit_agentdb_proto_msgTypes[17] +func (x *AgentDB_Wire_Begin) Reset() { + *x = AgentDB_Wire_Begin{} + mi := &file_livekit_agentdb_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Begin) String() string { +func (x *AgentDB_Wire_Begin) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Begin) ProtoMessage() {} +func (*AgentDB_Wire_Begin) ProtoMessage() {} -func (x *AgentDB_Begin) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[17] +func (x *AgentDB_Wire_Begin) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1433,32 +1472,32 @@ func (x *AgentDB_Begin) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Begin.ProtoReflect.Descriptor instead. -func (*AgentDB_Begin) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 16} +// Deprecated: Use AgentDB_Wire_Begin.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Begin) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 5} } -type AgentDB_Commit struct { +type AgentDB_Wire_Commit struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_Commit) Reset() { - *x = AgentDB_Commit{} - mi := &file_livekit_agentdb_proto_msgTypes[18] +func (x *AgentDB_Wire_Commit) Reset() { + *x = AgentDB_Wire_Commit{} + mi := &file_livekit_agentdb_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Commit) String() string { +func (x *AgentDB_Wire_Commit) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Commit) ProtoMessage() {} +func (*AgentDB_Wire_Commit) ProtoMessage() {} -func (x *AgentDB_Commit) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[18] +func (x *AgentDB_Wire_Commit) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1469,32 +1508,32 @@ func (x *AgentDB_Commit) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Commit.ProtoReflect.Descriptor instead. -func (*AgentDB_Commit) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 17} +// Deprecated: Use AgentDB_Wire_Commit.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Commit) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 6} } -type AgentDB_Rollback struct { +type AgentDB_Wire_Rollback struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_Rollback) Reset() { - *x = AgentDB_Rollback{} - mi := &file_livekit_agentdb_proto_msgTypes[19] +func (x *AgentDB_Wire_Rollback) Reset() { + *x = AgentDB_Wire_Rollback{} + mi := &file_livekit_agentdb_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Rollback) String() string { +func (x *AgentDB_Wire_Rollback) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Rollback) ProtoMessage() {} +func (*AgentDB_Wire_Rollback) ProtoMessage() {} -func (x *AgentDB_Rollback) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[19] +func (x *AgentDB_Wire_Rollback) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1505,32 +1544,32 @@ func (x *AgentDB_Rollback) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Rollback.ProtoReflect.Descriptor instead. -func (*AgentDB_Rollback) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 18} +// Deprecated: Use AgentDB_Wire_Rollback.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Rollback) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 7} } -type AgentDB_Cancel struct { +type AgentDB_Wire_Cancel struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_Cancel) Reset() { - *x = AgentDB_Cancel{} - mi := &file_livekit_agentdb_proto_msgTypes[20] +func (x *AgentDB_Wire_Cancel) Reset() { + *x = AgentDB_Wire_Cancel{} + mi := &file_livekit_agentdb_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Cancel) String() string { +func (x *AgentDB_Wire_Cancel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Cancel) ProtoMessage() {} +func (*AgentDB_Wire_Cancel) ProtoMessage() {} -func (x *AgentDB_Cancel) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[20] +func (x *AgentDB_Wire_Cancel) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1541,33 +1580,33 @@ func (x *AgentDB_Cancel) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Cancel.ProtoReflect.Descriptor instead. -func (*AgentDB_Cancel) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 19} +// Deprecated: Use AgentDB_Wire_Cancel.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Cancel) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 8} } -type AgentDB_Credit struct { +type AgentDB_Wire_Credit struct { state protoimpl.MessageState `protogen:"open.v1"` Batches uint32 `protobuf:"varint,1,opt,name=batches,proto3" json:"batches,omitempty"` // additional batches the client can absorb unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_Credit) Reset() { - *x = AgentDB_Credit{} - mi := &file_livekit_agentdb_proto_msgTypes[21] +func (x *AgentDB_Wire_Credit) Reset() { + *x = AgentDB_Wire_Credit{} + mi := &file_livekit_agentdb_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Credit) String() string { +func (x *AgentDB_Wire_Credit) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Credit) ProtoMessage() {} +func (*AgentDB_Wire_Credit) ProtoMessage() {} -func (x *AgentDB_Credit) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[21] +func (x *AgentDB_Wire_Credit) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1578,40 +1617,40 @@ func (x *AgentDB_Credit) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Credit.ProtoReflect.Descriptor instead. -func (*AgentDB_Credit) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 20} +// Deprecated: Use AgentDB_Wire_Credit.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Credit) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 9} } -func (x *AgentDB_Credit) GetBatches() uint32 { +func (x *AgentDB_Wire_Credit) GetBatches() uint32 { if x != nil { return x.Batches } return 0 } -type AgentDB_Ping struct { +type AgentDB_Wire_Ping struct { state protoimpl.MessageState `protogen:"open.v1"` Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_Ping) Reset() { - *x = AgentDB_Ping{} - mi := &file_livekit_agentdb_proto_msgTypes[22] +func (x *AgentDB_Wire_Ping) Reset() { + *x = AgentDB_Wire_Ping{} + mi := &file_livekit_agentdb_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Ping) String() string { +func (x *AgentDB_Wire_Ping) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Ping) ProtoMessage() {} +func (*AgentDB_Wire_Ping) ProtoMessage() {} -func (x *AgentDB_Ping) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[22] +func (x *AgentDB_Wire_Ping) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1622,19 +1661,19 @@ func (x *AgentDB_Ping) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Ping.ProtoReflect.Descriptor instead. -func (*AgentDB_Ping) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 21} +// Deprecated: Use AgentDB_Wire_Ping.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Ping) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 10} } -func (x *AgentDB_Ping) GetTimestamp() int64 { +func (x *AgentDB_Wire_Ping) GetTimestamp() int64 { if x != nil { return x.Timestamp } return 0 } -type AgentDB_Pong struct { +type AgentDB_Wire_Pong struct { state protoimpl.MessageState `protogen:"open.v1"` LastPingTimestamp int64 `protobuf:"varint,1,opt,name=last_ping_timestamp,json=lastPingTimestamp,proto3" json:"last_ping_timestamp,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` @@ -1642,21 +1681,21 @@ type AgentDB_Pong struct { sizeCache protoimpl.SizeCache } -func (x *AgentDB_Pong) Reset() { - *x = AgentDB_Pong{} - mi := &file_livekit_agentdb_proto_msgTypes[23] +func (x *AgentDB_Wire_Pong) Reset() { + *x = AgentDB_Wire_Pong{} + mi := &file_livekit_agentdb_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Pong) String() string { +func (x *AgentDB_Wire_Pong) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Pong) ProtoMessage() {} +func (*AgentDB_Wire_Pong) ProtoMessage() {} -func (x *AgentDB_Pong) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[23] +func (x *AgentDB_Wire_Pong) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1667,26 +1706,26 @@ func (x *AgentDB_Pong) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Pong.ProtoReflect.Descriptor instead. -func (*AgentDB_Pong) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 22} +// Deprecated: Use AgentDB_Wire_Pong.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Pong) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 11} } -func (x *AgentDB_Pong) GetLastPingTimestamp() int64 { +func (x *AgentDB_Wire_Pong) GetLastPingTimestamp() int64 { if x != nil { return x.LastPingTimestamp } return 0 } -func (x *AgentDB_Pong) GetTimestamp() int64 { +func (x *AgentDB_Wire_Pong) GetTimestamp() int64 { if x != nil { return x.Timestamp } return 0 } -type AgentDB_Hello struct { +type AgentDB_Wire_Hello struct { state protoimpl.MessageState `protogen:"open.v1"` Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` DatabaseId string `protobuf:"bytes,2,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` @@ -1694,21 +1733,21 @@ type AgentDB_Hello struct { sizeCache protoimpl.SizeCache } -func (x *AgentDB_Hello) Reset() { - *x = AgentDB_Hello{} - mi := &file_livekit_agentdb_proto_msgTypes[24] +func (x *AgentDB_Wire_Hello) Reset() { + *x = AgentDB_Wire_Hello{} + mi := &file_livekit_agentdb_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Hello) String() string { +func (x *AgentDB_Wire_Hello) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Hello) ProtoMessage() {} +func (*AgentDB_Wire_Hello) ProtoMessage() {} -func (x *AgentDB_Hello) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[24] +func (x *AgentDB_Wire_Hello) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1719,26 +1758,26 @@ func (x *AgentDB_Hello) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Hello.ProtoReflect.Descriptor instead. -func (*AgentDB_Hello) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 23} +// Deprecated: Use AgentDB_Wire_Hello.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Hello) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 12} } -func (x *AgentDB_Hello) GetToken() string { +func (x *AgentDB_Wire_Hello) GetToken() string { if x != nil { return x.Token } return "" } -func (x *AgentDB_Hello) GetDatabaseId() string { +func (x *AgentDB_Wire_Hello) GetDatabaseId() string { if x != nil { return x.DatabaseId } return "" } -type AgentDB_HelloOk struct { +type AgentDB_Wire_HelloOk struct { state protoimpl.MessageState `protogen:"open.v1"` Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` PingIntervalMs uint32 `protobuf:"varint,2,opt,name=ping_interval_ms,json=pingIntervalMs,proto3" json:"ping_interval_ms,omitempty"` @@ -1747,21 +1786,21 @@ type AgentDB_HelloOk struct { sizeCache protoimpl.SizeCache } -func (x *AgentDB_HelloOk) Reset() { - *x = AgentDB_HelloOk{} - mi := &file_livekit_agentdb_proto_msgTypes[25] +func (x *AgentDB_Wire_HelloOk) Reset() { + *x = AgentDB_Wire_HelloOk{} + mi := &file_livekit_agentdb_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_HelloOk) String() string { +func (x *AgentDB_Wire_HelloOk) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_HelloOk) ProtoMessage() {} +func (*AgentDB_Wire_HelloOk) ProtoMessage() {} -func (x *AgentDB_HelloOk) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[25] +func (x *AgentDB_Wire_HelloOk) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1772,54 +1811,54 @@ func (x *AgentDB_HelloOk) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_HelloOk.ProtoReflect.Descriptor instead. -func (*AgentDB_HelloOk) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 24} +// Deprecated: Use AgentDB_Wire_HelloOk.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_HelloOk) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 13} } -func (x *AgentDB_HelloOk) GetTip() int64 { +func (x *AgentDB_Wire_HelloOk) GetTip() int64 { if x != nil { return x.Tip } return 0 } -func (x *AgentDB_HelloOk) GetPingIntervalMs() uint32 { +func (x *AgentDB_Wire_HelloOk) GetPingIntervalMs() uint32 { if x != nil { return x.PingIntervalMs } return 0 } -func (x *AgentDB_HelloOk) GetPingTimeoutMs() uint32 { +func (x *AgentDB_Wire_HelloOk) GetPingTimeoutMs() uint32 { if x != nil { return x.PingTimeoutMs } return 0 } -type AgentDB_Columns struct { +type AgentDB_Wire_Columns struct { state protoimpl.MessageState `protogen:"open.v1"` Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_Columns) Reset() { - *x = AgentDB_Columns{} - mi := &file_livekit_agentdb_proto_msgTypes[26] +func (x *AgentDB_Wire_Columns) Reset() { + *x = AgentDB_Wire_Columns{} + mi := &file_livekit_agentdb_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Columns) String() string { +func (x *AgentDB_Wire_Columns) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Columns) ProtoMessage() {} +func (*AgentDB_Wire_Columns) ProtoMessage() {} -func (x *AgentDB_Columns) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[26] +func (x *AgentDB_Wire_Columns) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1830,12 +1869,12 @@ func (x *AgentDB_Columns) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Columns.ProtoReflect.Descriptor instead. -func (*AgentDB_Columns) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 25} +// Deprecated: Use AgentDB_Wire_Columns.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Columns) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 14} } -func (x *AgentDB_Columns) GetNames() []string { +func (x *AgentDB_Wire_Columns) GetNames() []string { if x != nil { return x.Names } @@ -1847,7 +1886,7 @@ func (x *AgentDB_Columns) GetNames() []string { // and blobs are concatenated with one exclusive end offset each, so value i // is data[ends[i-1]:ends[i]] with 0 implied before the first. A NULL occupies // a tag only. -type AgentDB_Column struct { +type AgentDB_Wire_Column struct { state protoimpl.MessageState `protogen:"open.v1"` Types []byte `protobuf:"bytes,1,opt,name=types,proto3" json:"types,omitempty"` // one ValueType per row Ints []int64 `protobuf:"zigzag64,2,rep,packed,name=ints,proto3" json:"ints,omitempty"` @@ -1860,21 +1899,21 @@ type AgentDB_Column struct { sizeCache protoimpl.SizeCache } -func (x *AgentDB_Column) Reset() { - *x = AgentDB_Column{} - mi := &file_livekit_agentdb_proto_msgTypes[27] +func (x *AgentDB_Wire_Column) Reset() { + *x = AgentDB_Wire_Column{} + mi := &file_livekit_agentdb_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Column) String() string { +func (x *AgentDB_Wire_Column) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Column) ProtoMessage() {} +func (*AgentDB_Wire_Column) ProtoMessage() {} -func (x *AgentDB_Column) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[27] +func (x *AgentDB_Wire_Column) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1885,83 +1924,83 @@ func (x *AgentDB_Column) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Column.ProtoReflect.Descriptor instead. -func (*AgentDB_Column) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 26} +// Deprecated: Use AgentDB_Wire_Column.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Column) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 15} } -func (x *AgentDB_Column) GetTypes() []byte { +func (x *AgentDB_Wire_Column) GetTypes() []byte { if x != nil { return x.Types } return nil } -func (x *AgentDB_Column) GetInts() []int64 { +func (x *AgentDB_Wire_Column) GetInts() []int64 { if x != nil { return x.Ints } return nil } -func (x *AgentDB_Column) GetDoubles() []float64 { +func (x *AgentDB_Wire_Column) GetDoubles() []float64 { if x != nil { return x.Doubles } return nil } -func (x *AgentDB_Column) GetTextData() []byte { +func (x *AgentDB_Wire_Column) GetTextData() []byte { if x != nil { return x.TextData } return nil } -func (x *AgentDB_Column) GetTextEnds() []uint32 { +func (x *AgentDB_Wire_Column) GetTextEnds() []uint32 { if x != nil { return x.TextEnds } return nil } -func (x *AgentDB_Column) GetBlobData() []byte { +func (x *AgentDB_Wire_Column) GetBlobData() []byte { if x != nil { return x.BlobData } return nil } -func (x *AgentDB_Column) GetBlobEnds() []uint32 { +func (x *AgentDB_Wire_Column) GetBlobEnds() []uint32 { if x != nil { return x.BlobEnds } return nil } -type AgentDB_ColumnBatch struct { +type AgentDB_Wire_ColumnBatch struct { state protoimpl.MessageState `protogen:"open.v1"` - Columns []*AgentDB_Column `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` // one per name in Columns + Columns []*AgentDB_Wire_Column `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` // one per name in Columns Rows uint32 `protobuf:"varint,2,opt,name=rows,proto3" json:"rows,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_ColumnBatch) Reset() { - *x = AgentDB_ColumnBatch{} - mi := &file_livekit_agentdb_proto_msgTypes[28] +func (x *AgentDB_Wire_ColumnBatch) Reset() { + *x = AgentDB_Wire_ColumnBatch{} + mi := &file_livekit_agentdb_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_ColumnBatch) String() string { +func (x *AgentDB_Wire_ColumnBatch) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_ColumnBatch) ProtoMessage() {} +func (*AgentDB_Wire_ColumnBatch) ProtoMessage() {} -func (x *AgentDB_ColumnBatch) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[28] +func (x *AgentDB_Wire_ColumnBatch) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1972,26 +2011,26 @@ func (x *AgentDB_ColumnBatch) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_ColumnBatch.ProtoReflect.Descriptor instead. -func (*AgentDB_ColumnBatch) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 27} +// Deprecated: Use AgentDB_Wire_ColumnBatch.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_ColumnBatch) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 16} } -func (x *AgentDB_ColumnBatch) GetColumns() []*AgentDB_Column { +func (x *AgentDB_Wire_ColumnBatch) GetColumns() []*AgentDB_Wire_Column { if x != nil { return x.Columns } return nil } -func (x *AgentDB_ColumnBatch) GetRows() uint32 { +func (x *AgentDB_Wire_ColumnBatch) GetRows() uint32 { if x != nil { return x.Rows } return 0 } -type AgentDB_ExecResult struct { +type AgentDB_Wire_ExecResult struct { state protoimpl.MessageState `protogen:"open.v1"` RowsAffected int64 `protobuf:"varint,1,opt,name=rows_affected,json=rowsAffected,proto3" json:"rows_affected,omitempty"` LastInsertId int64 `protobuf:"varint,2,opt,name=last_insert_id,json=lastInsertId,proto3" json:"last_insert_id,omitempty"` @@ -2000,21 +2039,21 @@ type AgentDB_ExecResult struct { sizeCache protoimpl.SizeCache } -func (x *AgentDB_ExecResult) Reset() { - *x = AgentDB_ExecResult{} - mi := &file_livekit_agentdb_proto_msgTypes[29] +func (x *AgentDB_Wire_ExecResult) Reset() { + *x = AgentDB_Wire_ExecResult{} + mi := &file_livekit_agentdb_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_ExecResult) String() string { +func (x *AgentDB_Wire_ExecResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_ExecResult) ProtoMessage() {} +func (*AgentDB_Wire_ExecResult) ProtoMessage() {} -func (x *AgentDB_ExecResult) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[29] +func (x *AgentDB_Wire_ExecResult) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2025,33 +2064,33 @@ func (x *AgentDB_ExecResult) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_ExecResult.ProtoReflect.Descriptor instead. -func (*AgentDB_ExecResult) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 28} +// Deprecated: Use AgentDB_Wire_ExecResult.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_ExecResult) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 17} } -func (x *AgentDB_ExecResult) GetRowsAffected() int64 { +func (x *AgentDB_Wire_ExecResult) GetRowsAffected() int64 { if x != nil { return x.RowsAffected } return 0 } -func (x *AgentDB_ExecResult) GetLastInsertId() int64 { +func (x *AgentDB_Wire_ExecResult) GetLastInsertId() int64 { if x != nil { return x.LastInsertId } return 0 } -func (x *AgentDB_ExecResult) GetTip() int64 { +func (x *AgentDB_Wire_ExecResult) GetTip() int64 { if x != nil { return x.Tip } return 0 } -type AgentDB_Done struct { +type AgentDB_Wire_Done struct { state protoimpl.MessageState `protogen:"open.v1"` Tip int64 `protobuf:"varint,1,opt,name=tip,proto3" json:"tip,omitempty"` // the snapshot the query ran at TotalRows uint64 `protobuf:"varint,2,opt,name=total_rows,json=totalRows,proto3" json:"total_rows,omitempty"` @@ -2059,21 +2098,21 @@ type AgentDB_Done struct { sizeCache protoimpl.SizeCache } -func (x *AgentDB_Done) Reset() { - *x = AgentDB_Done{} - mi := &file_livekit_agentdb_proto_msgTypes[30] +func (x *AgentDB_Wire_Done) Reset() { + *x = AgentDB_Wire_Done{} + mi := &file_livekit_agentdb_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Done) String() string { +func (x *AgentDB_Wire_Done) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Done) ProtoMessage() {} +func (*AgentDB_Wire_Done) ProtoMessage() {} -func (x *AgentDB_Done) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[30] +func (x *AgentDB_Wire_Done) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2084,26 +2123,26 @@ func (x *AgentDB_Done) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Done.ProtoReflect.Descriptor instead. -func (*AgentDB_Done) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 29} +// Deprecated: Use AgentDB_Wire_Done.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Done) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 18} } -func (x *AgentDB_Done) GetTip() int64 { +func (x *AgentDB_Wire_Done) GetTip() int64 { if x != nil { return x.Tip } return 0 } -func (x *AgentDB_Done) GetTotalRows() uint64 { +func (x *AgentDB_Wire_Done) GetTotalRows() uint64 { if x != nil { return x.TotalRows } return 0 } -type AgentDB_Error struct { +type AgentDB_Wire_Error struct { state protoimpl.MessageState `protogen:"open.v1"` Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // stable, machine-readable Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` @@ -2111,21 +2150,21 @@ type AgentDB_Error struct { sizeCache protoimpl.SizeCache } -func (x *AgentDB_Error) Reset() { - *x = AgentDB_Error{} - mi := &file_livekit_agentdb_proto_msgTypes[31] +func (x *AgentDB_Wire_Error) Reset() { + *x = AgentDB_Wire_Error{} + mi := &file_livekit_agentdb_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Error) String() string { +func (x *AgentDB_Wire_Error) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Error) ProtoMessage() {} +func (*AgentDB_Wire_Error) ProtoMessage() {} -func (x *AgentDB_Error) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[31] +func (x *AgentDB_Wire_Error) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2136,19 +2175,19 @@ func (x *AgentDB_Error) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Error.ProtoReflect.Descriptor instead. -func (*AgentDB_Error) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 30} +// Deprecated: Use AgentDB_Wire_Error.ProtoReflect.Descriptor instead. +func (*AgentDB_Wire_Error) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 19} } -func (x *AgentDB_Error) GetCode() string { +func (x *AgentDB_Wire_Error) GetCode() string { if x != nil { return x.Code } return "" } -func (x *AgentDB_Error) GetMessage() string { +func (x *AgentDB_Wire_Error) GetMessage() string { if x != nil { return x.Message } @@ -2159,7 +2198,7 @@ var File_livekit_agentdb_proto protoreflect.FileDescriptor const file_livekit_agentdb_proto_rawDesc = "" + "\n" + - "\x15livekit_agentdb.proto\x12\alivekit\"\xc4\x1b\n" + + "\x15livekit_agentdb.proto\x12\alivekit\"\xb7\x1c\n" + "\aAgentDB\x1aq\n" + "\rCreateRequest\x12\x16\n" + "\x06region\x18\x01 \x01(\tR\x06region\x12'\n" + @@ -2206,33 +2245,34 @@ const file_livekit_agentdb_proto_rawDesc = "" + "\fDumpResponse\x12!\n" + "\fdownload_url\x18\x01 \x01(\tR\vdownloadUrl\x12&\n" + "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + - "\x03tip\x18\x03 \x01(\x03R\x03tip\x1a\xae\x04\n" + + "\x03tip\x18\x03 \x01(\x03R\x03tip\x1a\x80\x14\n" + + "\x04Wire\x1a\xe0\x04\n" + "\rClientMessage\x12\x1d\n" + "\n" + - "request_id\x18\x01 \x01(\rR\trequestId\x12.\n" + - "\x05hello\x18\x02 \x01(\v2\x16.livekit.AgentDB.HelloH\x00R\x05hello\x120\n" + - "\x04exec\x18\x03 \x01(\v2\x1a.livekit.AgentDB.StatementH\x00R\x04exec\x122\n" + - "\x05query\x18\x04 \x01(\v2\x1a.livekit.AgentDB.StatementH\x00R\x05query\x12.\n" + - "\x05batch\x18\x05 \x01(\v2\x16.livekit.AgentDB.BatchH\x00R\x05batch\x12.\n" + - "\x05begin\x18\x06 \x01(\v2\x16.livekit.AgentDB.BeginH\x00R\x05begin\x121\n" + - "\x06commit\x18\a \x01(\v2\x17.livekit.AgentDB.CommitH\x00R\x06commit\x127\n" + - "\brollback\x18\b \x01(\v2\x19.livekit.AgentDB.RollbackH\x00R\brollback\x121\n" + - "\x06cancel\x18\t \x01(\v2\x17.livekit.AgentDB.CancelH\x00R\x06cancel\x121\n" + + "request_id\x18\x01 \x01(\rR\trequestId\x123\n" + + "\x05hello\x18\x02 \x01(\v2\x1b.livekit.AgentDB.Wire.HelloH\x00R\x05hello\x125\n" + + "\x04exec\x18\x03 \x01(\v2\x1f.livekit.AgentDB.Wire.StatementH\x00R\x04exec\x127\n" + + "\x05query\x18\x04 \x01(\v2\x1f.livekit.AgentDB.Wire.StatementH\x00R\x05query\x123\n" + + "\x05batch\x18\x05 \x01(\v2\x1b.livekit.AgentDB.Wire.BatchH\x00R\x05batch\x123\n" + + "\x05begin\x18\x06 \x01(\v2\x1b.livekit.AgentDB.Wire.BeginH\x00R\x05begin\x126\n" + + "\x06commit\x18\a \x01(\v2\x1c.livekit.AgentDB.Wire.CommitH\x00R\x06commit\x12<\n" + + "\brollback\x18\b \x01(\v2\x1e.livekit.AgentDB.Wire.RollbackH\x00R\brollback\x126\n" + + "\x06cancel\x18\t \x01(\v2\x1c.livekit.AgentDB.Wire.CancelH\x00R\x06cancel\x126\n" + "\x06credit\x18\n" + - " \x01(\v2\x17.livekit.AgentDB.CreditH\x00R\x06credit\x12+\n" + - "\x04ping\x18\v \x01(\v2\x15.livekit.AgentDB.PingH\x00R\x04pingB\t\n" + - "\amessage\x1a\xb3\x03\n" + + " \x01(\v2\x1c.livekit.AgentDB.Wire.CreditH\x00R\x06credit\x120\n" + + "\x04ping\x18\v \x01(\v2\x1a.livekit.AgentDB.Wire.PingH\x00R\x04pingB\t\n" + + "\amessage\x1a\xd6\x03\n" + "\rServerMessage\x12\x1d\n" + "\n" + - "request_id\x18\x01 \x01(\rR\trequestId\x125\n" + - "\bhello_ok\x18\x02 \x01(\v2\x18.livekit.AgentDB.HelloOkH\x00R\ahelloOk\x124\n" + - "\acolumns\x18\x03 \x01(\v2\x18.livekit.AgentDB.ColumnsH\x00R\acolumns\x12A\n" + - "\fcolumn_batch\x18\x04 \x01(\v2\x1c.livekit.AgentDB.ColumnBatchH\x00R\vcolumnBatch\x12>\n" + - "\vexec_result\x18\x05 \x01(\v2\x1b.livekit.AgentDB.ExecResultH\x00R\n" + - "execResult\x12+\n" + - "\x04done\x18\x06 \x01(\v2\x15.livekit.AgentDB.DoneH\x00R\x04done\x12.\n" + - "\x05error\x18\a \x01(\v2\x16.livekit.AgentDB.ErrorH\x00R\x05error\x12+\n" + - "\x04pong\x18\b \x01(\v2\x15.livekit.AgentDB.PongH\x00R\x04pongB\t\n" + + "request_id\x18\x01 \x01(\rR\trequestId\x12:\n" + + "\bhello_ok\x18\x02 \x01(\v2\x1d.livekit.AgentDB.Wire.HelloOkH\x00R\ahelloOk\x129\n" + + "\acolumns\x18\x03 \x01(\v2\x1d.livekit.AgentDB.Wire.ColumnsH\x00R\acolumns\x12F\n" + + "\fcolumn_batch\x18\x04 \x01(\v2!.livekit.AgentDB.Wire.ColumnBatchH\x00R\vcolumnBatch\x12C\n" + + "\vexec_result\x18\x05 \x01(\v2 .livekit.AgentDB.Wire.ExecResultH\x00R\n" + + "execResult\x120\n" + + "\x04done\x18\x06 \x01(\v2\x1a.livekit.AgentDB.Wire.DoneH\x00R\x04done\x123\n" + + "\x05error\x18\a \x01(\v2\x1b.livekit.AgentDB.Wire.ErrorH\x00R\x05error\x120\n" + + "\x04pong\x18\b \x01(\v2\x1a.livekit.AgentDB.Wire.PongH\x00R\x04pongB\t\n" + "\amessage\x1a\xb7\x01\n" + "\x05Value\x12\x1f\n" + "\n" + @@ -2243,14 +2283,14 @@ const file_livekit_agentdb_proto_rawDesc = "" + "text_value\x18\x04 \x01(\tH\x00R\ttextValue\x12\x1f\n" + "\n" + "blob_value\x18\x05 \x01(\fH\x00R\tblobValueB\a\n" + - "\x05value\x1a}\n" + + "\x05value\x1a\x87\x01\n" + "\tStatement\x12\x10\n" + - "\x03sql\x18\x01 \x01(\tR\x03sql\x12.\n" + - "\x06params\x18\x02 \x03(\v2\x16.livekit.AgentDB.ValueR\x06params\x12.\n" + - "\x04lang\x18\x03 \x01(\x0e2\x1a.livekit.AgentDB.QueryLangR\x04lang\x1aC\n" + - "\x05Batch\x12:\n" + + "\x03sql\x18\x01 \x01(\tR\x03sql\x123\n" + + "\x06params\x18\x02 \x03(\v2\x1b.livekit.AgentDB.Wire.ValueR\x06params\x123\n" + + "\x04lang\x18\x03 \x01(\x0e2\x1f.livekit.AgentDB.Wire.QueryLangR\x04lang\x1aH\n" + + "\x05Batch\x12?\n" + "\n" + - "statements\x18\x01 \x03(\v2\x1a.livekit.AgentDB.StatementR\n" + + "statements\x18\x01 \x03(\v2\x1f.livekit.AgentDB.Wire.StatementR\n" + "statements\x1a\a\n" + "\x05Begin\x1a\b\n" + "\x06Commit\x1a\n" + @@ -2281,9 +2321,9 @@ const file_livekit_agentdb_proto_rawDesc = "" + "\ttext_data\x18\x04 \x01(\fR\btextData\x12\x1b\n" + "\ttext_ends\x18\x05 \x03(\rR\btextEnds\x12\x1b\n" + "\tblob_data\x18\x06 \x01(\fR\bblobData\x12\x1b\n" + - "\tblob_ends\x18\a \x03(\rR\bblobEnds\x1aT\n" + - "\vColumnBatch\x121\n" + - "\acolumns\x18\x01 \x03(\v2\x17.livekit.AgentDB.ColumnR\acolumns\x12\x12\n" + + "\tblob_ends\x18\a \x03(\rR\bblobEnds\x1aY\n" + + "\vColumnBatch\x126\n" + + "\acolumns\x18\x01 \x03(\v2\x1c.livekit.AgentDB.Wire.ColumnR\acolumns\x12\x12\n" + "\x04rows\x18\x02 \x01(\rR\x04rows\x1ai\n" + "\n" + "ExecResult\x12#\n" + @@ -2325,66 +2365,67 @@ func file_livekit_agentdb_proto_rawDescGZIP() []byte { } var file_livekit_agentdb_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_livekit_agentdb_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_livekit_agentdb_proto_msgTypes = make([]protoimpl.MessageInfo, 33) var file_livekit_agentdb_proto_goTypes = []any{ - (AgentDB_QueryLang)(0), // 0: livekit.AgentDB.QueryLang - (AgentDB_ValueType)(0), // 1: livekit.AgentDB.ValueType - (*AgentDB)(nil), // 2: livekit.AgentDB - (*AgentDB_CreateRequest)(nil), // 3: livekit.AgentDB.CreateRequest - (*AgentDB_CreateResponse)(nil), // 4: livekit.AgentDB.CreateResponse - (*AgentDB_GetRequest)(nil), // 5: livekit.AgentDB.GetRequest - (*AgentDB_GetResponse)(nil), // 6: livekit.AgentDB.GetResponse - (*AgentDB_ListRequest)(nil), // 7: livekit.AgentDB.ListRequest - (*AgentDB_ListResponse)(nil), // 8: livekit.AgentDB.ListResponse - (*AgentDB_Summary)(nil), // 9: livekit.AgentDB.Summary - (*AgentDB_DeleteRequest)(nil), // 10: livekit.AgentDB.DeleteRequest - (*AgentDB_DeleteResponse)(nil), // 11: livekit.AgentDB.DeleteResponse - (*AgentDB_DumpRequest)(nil), // 12: livekit.AgentDB.DumpRequest - (*AgentDB_DumpResponse)(nil), // 13: livekit.AgentDB.DumpResponse - (*AgentDB_ClientMessage)(nil), // 14: livekit.AgentDB.ClientMessage - (*AgentDB_ServerMessage)(nil), // 15: livekit.AgentDB.ServerMessage - (*AgentDB_Value)(nil), // 16: livekit.AgentDB.Value - (*AgentDB_Statement)(nil), // 17: livekit.AgentDB.Statement - (*AgentDB_Batch)(nil), // 18: livekit.AgentDB.Batch - (*AgentDB_Begin)(nil), // 19: livekit.AgentDB.Begin - (*AgentDB_Commit)(nil), // 20: livekit.AgentDB.Commit - (*AgentDB_Rollback)(nil), // 21: livekit.AgentDB.Rollback - (*AgentDB_Cancel)(nil), // 22: livekit.AgentDB.Cancel - (*AgentDB_Credit)(nil), // 23: livekit.AgentDB.Credit - (*AgentDB_Ping)(nil), // 24: livekit.AgentDB.Ping - (*AgentDB_Pong)(nil), // 25: livekit.AgentDB.Pong - (*AgentDB_Hello)(nil), // 26: livekit.AgentDB.Hello - (*AgentDB_HelloOk)(nil), // 27: livekit.AgentDB.HelloOk - (*AgentDB_Columns)(nil), // 28: livekit.AgentDB.Columns - (*AgentDB_Column)(nil), // 29: livekit.AgentDB.Column - (*AgentDB_ColumnBatch)(nil), // 30: livekit.AgentDB.ColumnBatch - (*AgentDB_ExecResult)(nil), // 31: livekit.AgentDB.ExecResult - (*AgentDB_Done)(nil), // 32: livekit.AgentDB.Done - (*AgentDB_Error)(nil), // 33: livekit.AgentDB.Error + (AgentDB_Wire_QueryLang)(0), // 0: livekit.AgentDB.Wire.QueryLang + (AgentDB_Wire_ValueType)(0), // 1: livekit.AgentDB.Wire.ValueType + (*AgentDB)(nil), // 2: livekit.AgentDB + (*AgentDB_CreateRequest)(nil), // 3: livekit.AgentDB.CreateRequest + (*AgentDB_CreateResponse)(nil), // 4: livekit.AgentDB.CreateResponse + (*AgentDB_GetRequest)(nil), // 5: livekit.AgentDB.GetRequest + (*AgentDB_GetResponse)(nil), // 6: livekit.AgentDB.GetResponse + (*AgentDB_ListRequest)(nil), // 7: livekit.AgentDB.ListRequest + (*AgentDB_ListResponse)(nil), // 8: livekit.AgentDB.ListResponse + (*AgentDB_Summary)(nil), // 9: livekit.AgentDB.Summary + (*AgentDB_DeleteRequest)(nil), // 10: livekit.AgentDB.DeleteRequest + (*AgentDB_DeleteResponse)(nil), // 11: livekit.AgentDB.DeleteResponse + (*AgentDB_DumpRequest)(nil), // 12: livekit.AgentDB.DumpRequest + (*AgentDB_DumpResponse)(nil), // 13: livekit.AgentDB.DumpResponse + (*AgentDB_Wire)(nil), // 14: livekit.AgentDB.Wire + (*AgentDB_Wire_ClientMessage)(nil), // 15: livekit.AgentDB.Wire.ClientMessage + (*AgentDB_Wire_ServerMessage)(nil), // 16: livekit.AgentDB.Wire.ServerMessage + (*AgentDB_Wire_Value)(nil), // 17: livekit.AgentDB.Wire.Value + (*AgentDB_Wire_Statement)(nil), // 18: livekit.AgentDB.Wire.Statement + (*AgentDB_Wire_Batch)(nil), // 19: livekit.AgentDB.Wire.Batch + (*AgentDB_Wire_Begin)(nil), // 20: livekit.AgentDB.Wire.Begin + (*AgentDB_Wire_Commit)(nil), // 21: livekit.AgentDB.Wire.Commit + (*AgentDB_Wire_Rollback)(nil), // 22: livekit.AgentDB.Wire.Rollback + (*AgentDB_Wire_Cancel)(nil), // 23: livekit.AgentDB.Wire.Cancel + (*AgentDB_Wire_Credit)(nil), // 24: livekit.AgentDB.Wire.Credit + (*AgentDB_Wire_Ping)(nil), // 25: livekit.AgentDB.Wire.Ping + (*AgentDB_Wire_Pong)(nil), // 26: livekit.AgentDB.Wire.Pong + (*AgentDB_Wire_Hello)(nil), // 27: livekit.AgentDB.Wire.Hello + (*AgentDB_Wire_HelloOk)(nil), // 28: livekit.AgentDB.Wire.HelloOk + (*AgentDB_Wire_Columns)(nil), // 29: livekit.AgentDB.Wire.Columns + (*AgentDB_Wire_Column)(nil), // 30: livekit.AgentDB.Wire.Column + (*AgentDB_Wire_ColumnBatch)(nil), // 31: livekit.AgentDB.Wire.ColumnBatch + (*AgentDB_Wire_ExecResult)(nil), // 32: livekit.AgentDB.Wire.ExecResult + (*AgentDB_Wire_Done)(nil), // 33: livekit.AgentDB.Wire.Done + (*AgentDB_Wire_Error)(nil), // 34: livekit.AgentDB.Wire.Error } var file_livekit_agentdb_proto_depIdxs = []int32{ 9, // 0: livekit.AgentDB.ListResponse.databases:type_name -> livekit.AgentDB.Summary - 26, // 1: livekit.AgentDB.ClientMessage.hello:type_name -> livekit.AgentDB.Hello - 17, // 2: livekit.AgentDB.ClientMessage.exec:type_name -> livekit.AgentDB.Statement - 17, // 3: livekit.AgentDB.ClientMessage.query:type_name -> livekit.AgentDB.Statement - 18, // 4: livekit.AgentDB.ClientMessage.batch:type_name -> livekit.AgentDB.Batch - 19, // 5: livekit.AgentDB.ClientMessage.begin:type_name -> livekit.AgentDB.Begin - 20, // 6: livekit.AgentDB.ClientMessage.commit:type_name -> livekit.AgentDB.Commit - 21, // 7: livekit.AgentDB.ClientMessage.rollback:type_name -> livekit.AgentDB.Rollback - 22, // 8: livekit.AgentDB.ClientMessage.cancel:type_name -> livekit.AgentDB.Cancel - 23, // 9: livekit.AgentDB.ClientMessage.credit:type_name -> livekit.AgentDB.Credit - 24, // 10: livekit.AgentDB.ClientMessage.ping:type_name -> livekit.AgentDB.Ping - 27, // 11: livekit.AgentDB.ServerMessage.hello_ok:type_name -> livekit.AgentDB.HelloOk - 28, // 12: livekit.AgentDB.ServerMessage.columns:type_name -> livekit.AgentDB.Columns - 30, // 13: livekit.AgentDB.ServerMessage.column_batch:type_name -> livekit.AgentDB.ColumnBatch - 31, // 14: livekit.AgentDB.ServerMessage.exec_result:type_name -> livekit.AgentDB.ExecResult - 32, // 15: livekit.AgentDB.ServerMessage.done:type_name -> livekit.AgentDB.Done - 33, // 16: livekit.AgentDB.ServerMessage.error:type_name -> livekit.AgentDB.Error - 25, // 17: livekit.AgentDB.ServerMessage.pong:type_name -> livekit.AgentDB.Pong - 16, // 18: livekit.AgentDB.Statement.params:type_name -> livekit.AgentDB.Value - 0, // 19: livekit.AgentDB.Statement.lang:type_name -> livekit.AgentDB.QueryLang - 17, // 20: livekit.AgentDB.Batch.statements:type_name -> livekit.AgentDB.Statement - 29, // 21: livekit.AgentDB.ColumnBatch.columns:type_name -> livekit.AgentDB.Column + 27, // 1: livekit.AgentDB.Wire.ClientMessage.hello:type_name -> livekit.AgentDB.Wire.Hello + 18, // 2: livekit.AgentDB.Wire.ClientMessage.exec:type_name -> livekit.AgentDB.Wire.Statement + 18, // 3: livekit.AgentDB.Wire.ClientMessage.query:type_name -> livekit.AgentDB.Wire.Statement + 19, // 4: livekit.AgentDB.Wire.ClientMessage.batch:type_name -> livekit.AgentDB.Wire.Batch + 20, // 5: livekit.AgentDB.Wire.ClientMessage.begin:type_name -> livekit.AgentDB.Wire.Begin + 21, // 6: livekit.AgentDB.Wire.ClientMessage.commit:type_name -> livekit.AgentDB.Wire.Commit + 22, // 7: livekit.AgentDB.Wire.ClientMessage.rollback:type_name -> livekit.AgentDB.Wire.Rollback + 23, // 8: livekit.AgentDB.Wire.ClientMessage.cancel:type_name -> livekit.AgentDB.Wire.Cancel + 24, // 9: livekit.AgentDB.Wire.ClientMessage.credit:type_name -> livekit.AgentDB.Wire.Credit + 25, // 10: livekit.AgentDB.Wire.ClientMessage.ping:type_name -> livekit.AgentDB.Wire.Ping + 28, // 11: livekit.AgentDB.Wire.ServerMessage.hello_ok:type_name -> livekit.AgentDB.Wire.HelloOk + 29, // 12: livekit.AgentDB.Wire.ServerMessage.columns:type_name -> livekit.AgentDB.Wire.Columns + 31, // 13: livekit.AgentDB.Wire.ServerMessage.column_batch:type_name -> livekit.AgentDB.Wire.ColumnBatch + 32, // 14: livekit.AgentDB.Wire.ServerMessage.exec_result:type_name -> livekit.AgentDB.Wire.ExecResult + 33, // 15: livekit.AgentDB.Wire.ServerMessage.done:type_name -> livekit.AgentDB.Wire.Done + 34, // 16: livekit.AgentDB.Wire.ServerMessage.error:type_name -> livekit.AgentDB.Wire.Error + 26, // 17: livekit.AgentDB.Wire.ServerMessage.pong:type_name -> livekit.AgentDB.Wire.Pong + 17, // 18: livekit.AgentDB.Wire.Statement.params:type_name -> livekit.AgentDB.Wire.Value + 0, // 19: livekit.AgentDB.Wire.Statement.lang:type_name -> livekit.AgentDB.Wire.QueryLang + 18, // 20: livekit.AgentDB.Wire.Batch.statements:type_name -> livekit.AgentDB.Wire.Statement + 30, // 21: livekit.AgentDB.Wire.ColumnBatch.columns:type_name -> livekit.AgentDB.Wire.Column 3, // 22: livekit.AgentDBService.CreateDatabase:input_type -> livekit.AgentDB.CreateRequest 5, // 23: livekit.AgentDBService.GetDatabase:input_type -> livekit.AgentDB.GetRequest 7, // 24: livekit.AgentDBService.ListDatabases:input_type -> livekit.AgentDB.ListRequest @@ -2407,33 +2448,33 @@ func file_livekit_agentdb_proto_init() { if File_livekit_agentdb_proto != nil { return } - file_livekit_agentdb_proto_msgTypes[12].OneofWrappers = []any{ - (*AgentDB_ClientMessage_Hello)(nil), - (*AgentDB_ClientMessage_Exec)(nil), - (*AgentDB_ClientMessage_Query)(nil), - (*AgentDB_ClientMessage_Batch)(nil), - (*AgentDB_ClientMessage_Begin)(nil), - (*AgentDB_ClientMessage_Commit)(nil), - (*AgentDB_ClientMessage_Rollback)(nil), - (*AgentDB_ClientMessage_Cancel)(nil), - (*AgentDB_ClientMessage_Credit)(nil), - (*AgentDB_ClientMessage_Ping)(nil), - } file_livekit_agentdb_proto_msgTypes[13].OneofWrappers = []any{ - (*AgentDB_ServerMessage_HelloOk)(nil), - (*AgentDB_ServerMessage_Columns)(nil), - (*AgentDB_ServerMessage_ColumnBatch)(nil), - (*AgentDB_ServerMessage_ExecResult)(nil), - (*AgentDB_ServerMessage_Done)(nil), - (*AgentDB_ServerMessage_Error)(nil), - (*AgentDB_ServerMessage_Pong)(nil), + (*AgentDB_Wire_ClientMessage_Hello)(nil), + (*AgentDB_Wire_ClientMessage_Exec)(nil), + (*AgentDB_Wire_ClientMessage_Query)(nil), + (*AgentDB_Wire_ClientMessage_Batch)(nil), + (*AgentDB_Wire_ClientMessage_Begin)(nil), + (*AgentDB_Wire_ClientMessage_Commit)(nil), + (*AgentDB_Wire_ClientMessage_Rollback)(nil), + (*AgentDB_Wire_ClientMessage_Cancel)(nil), + (*AgentDB_Wire_ClientMessage_Credit)(nil), + (*AgentDB_Wire_ClientMessage_Ping)(nil), } file_livekit_agentdb_proto_msgTypes[14].OneofWrappers = []any{ - (*AgentDB_Value_NullValue)(nil), - (*AgentDB_Value_IntValue)(nil), - (*AgentDB_Value_DoubleValue)(nil), - (*AgentDB_Value_TextValue)(nil), - (*AgentDB_Value_BlobValue)(nil), + (*AgentDB_Wire_ServerMessage_HelloOk)(nil), + (*AgentDB_Wire_ServerMessage_Columns)(nil), + (*AgentDB_Wire_ServerMessage_ColumnBatch)(nil), + (*AgentDB_Wire_ServerMessage_ExecResult)(nil), + (*AgentDB_Wire_ServerMessage_Done)(nil), + (*AgentDB_Wire_ServerMessage_Error)(nil), + (*AgentDB_Wire_ServerMessage_Pong)(nil), + } + file_livekit_agentdb_proto_msgTypes[15].OneofWrappers = []any{ + (*AgentDB_Wire_Value_NullValue)(nil), + (*AgentDB_Wire_Value_IntValue)(nil), + (*AgentDB_Wire_Value_DoubleValue)(nil), + (*AgentDB_Wire_Value_TextValue)(nil), + (*AgentDB_Wire_Value_BlobValue)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -2441,7 +2482,7 @@ func file_livekit_agentdb_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_agentdb_proto_rawDesc), len(file_livekit_agentdb_proto_rawDesc)), NumEnums: 2, - NumMessages: 32, + NumMessages: 33, NumExtensions: 0, NumServices: 1, }, diff --git a/livekit/livekit_agentdb.twirp.go b/livekit/livekit_agentdb.twirp.go index f71ab91fd..7054707c8 100644 --- a/livekit/livekit_agentdb.twirp.go +++ b/livekit/livekit_agentdb.twirp.go @@ -1637,104 +1637,105 @@ func (s *agentDBServiceServer) PathPrefix() string { } var twirpFileDescriptor2 = []byte{ - // 1573 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcd, 0x72, 0xdb, 0x46, - 0x12, 0x26, 0x05, 0xfe, 0x36, 0x7f, 0x44, 0x8f, 0xd7, 0x36, 0x17, 0xb6, 0xd6, 0x5a, 0xd9, 0xeb, - 0x55, 0xd5, 0xd6, 0xd2, 0xb6, 0x12, 0xc7, 0x55, 0x3e, 0xb8, 0x4a, 0x14, 0x19, 0x53, 0x15, 0xda, - 0x96, 0x20, 0xca, 0x15, 0xe7, 0x82, 0x02, 0x89, 0x31, 0x85, 0x12, 0x7e, 0x28, 0x60, 0x20, 0x4b, - 0xae, 0xca, 0x53, 0xe4, 0x2d, 0x72, 0xc8, 0x25, 0x87, 0x1c, 0x72, 0xc9, 0x21, 0x2f, 0x90, 0xd7, - 0xc8, 0x53, 0xa4, 0xba, 0x67, 0x00, 0x4a, 0x22, 0x64, 0xe9, 0x9a, 0xdb, 0xcc, 0xd7, 0x5f, 0xcf, - 0x4f, 0xf7, 0x37, 0x3d, 0x33, 0x70, 0xcb, 0x75, 0x8e, 0xf9, 0xa1, 0x23, 0x4c, 0x6b, 0xca, 0x7d, - 0x61, 0x8f, 0x3b, 0xb3, 0x30, 0x10, 0x01, 0x2b, 0x2b, 0x78, 0xed, 0xf7, 0xbb, 0x50, 0xde, 0x44, - 0x53, 0xaf, 0xab, 0x1f, 0x41, 0x63, 0x2b, 0xe4, 0x96, 0xe0, 0x06, 0x3f, 0x8a, 0x79, 0x24, 0xd8, - 0x6d, 0x28, 0x85, 0x7c, 0xea, 0x04, 0x7e, 0x3b, 0xbf, 0x9a, 0x5f, 0xaf, 0x1a, 0xaa, 0xc7, 0xfe, - 0x0b, 0xcb, 0x71, 0xc4, 0x43, 0xd3, 0x12, 0x22, 0x74, 0xc6, 0xb1, 0xe0, 0x51, 0x7b, 0x89, 0x08, - 0x4d, 0x84, 0x37, 0x53, 0x94, 0xdd, 0x87, 0x9a, 0x10, 0xae, 0x19, 0xf1, 0x49, 0xe0, 0xdb, 0x51, - 0x5b, 0x5b, 0xcd, 0xaf, 0x6b, 0x06, 0x08, 0xe1, 0xee, 0x49, 0x44, 0x7f, 0x0f, 0xcd, 0x64, 0xca, - 0x68, 0x16, 0xf8, 0x11, 0x47, 0x17, 0xdb, 0x12, 0xd6, 0xd8, 0x8a, 0xb8, 0xe9, 0xd8, 0x6a, 0x62, - 0x48, 0xa0, 0x6d, 0x9b, 0x3d, 0x82, 0x65, 0x7e, 0x32, 0x73, 0x42, 0x1e, 0x99, 0x96, 0x30, 0x63, - 0xdf, 0x39, 0xa1, 0xc9, 0x35, 0xa3, 0xa1, 0xe0, 0x4d, 0xb1, 0xef, 0x3b, 0x27, 0xfa, 0xff, 0x01, - 0x5e, 0x71, 0x91, 0x6c, 0xe5, 0xaa, 0x61, 0xf5, 0x3f, 0xf2, 0x50, 0x23, 0xfe, 0x75, 0xd7, 0x31, - 0x0f, 0xce, 0xd2, 0x55, 0xc1, 0xd1, 0x32, 0x83, 0xf3, 0x08, 0x96, 0x27, 0xb4, 0x77, 0x3b, 0xdd, - 0x48, 0x41, 0x6e, 0x44, 0xc1, 0x72, 0x23, 0x59, 0x1b, 0x2e, 0x66, 0x6c, 0x98, 0xb5, 0x40, 0x13, - 0xce, 0xac, 0x5d, 0x22, 0x1b, 0x36, 0xf5, 0x6d, 0xa8, 0x0d, 0x9d, 0x28, 0x8d, 0xc1, 0x5d, 0xa8, - 0xce, 0xac, 0x29, 0x37, 0x23, 0xe7, 0x13, 0xa7, 0x0d, 0x15, 0x8d, 0x0a, 0x02, 0x7b, 0xce, 0x27, - 0xce, 0x56, 0x00, 0xc8, 0x28, 0x82, 0x43, 0x9e, 0x6c, 0x89, 0xe8, 0x23, 0x04, 0x74, 0x1f, 0xea, - 0x72, 0x28, 0x15, 0x9e, 0xaf, 0xa0, 0x9a, 0xc4, 0x22, 0x6a, 0xe7, 0x57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xb8, 0xaa, 0xb1, 0x25, 0x26, 0x07, 0x94, 0xc5, 0xac, 0x55, 0x75, 0xd1, 0x8a, 0x7c, 0xa2, 0x11, - 0x9f, 0x4f, 0x1d, 0x9f, 0x0e, 0x59, 0x26, 0x1f, 0xad, 0xc4, 0xc7, 0x06, 0x7b, 0x0a, 0xa5, 0x49, - 0xe0, 0x79, 0x8e, 0x68, 0x97, 0xc9, 0xe1, 0xce, 0x82, 0xc3, 0x16, 0x99, 0x07, 0x39, 0x43, 0x11, - 0xd9, 0x73, 0xa8, 0x84, 0x81, 0xeb, 0x8e, 0xad, 0xc9, 0x61, 0xbb, 0x42, 0x4e, 0xff, 0x5c, 0x70, - 0x32, 0x14, 0x61, 0x90, 0x33, 0x52, 0x32, 0xcd, 0x65, 0xf9, 0x13, 0xee, 0xb6, 0xab, 0x97, 0xcd, - 0x45, 0x66, 0x9a, 0x8b, 0x5a, 0xe4, 0x12, 0x72, 0xdb, 0x11, 0x6d, 0xb8, 0xcc, 0x85, 0xcc, 0xe4, - 0x42, 0x2d, 0xf6, 0x3f, 0x28, 0xcc, 0x1c, 0x7f, 0xda, 0xae, 0x91, 0xc3, 0xad, 0x05, 0x87, 0x1d, - 0xc7, 0x9f, 0x62, 0x4a, 0x90, 0xd4, 0xad, 0x42, 0xd9, 0x93, 0xf2, 0xd0, 0x7f, 0xd6, 0xa0, 0xb1, - 0xc7, 0xc3, 0x63, 0x1e, 0x5e, 0x53, 0x30, 0xcf, 0xa0, 0x42, 0x4a, 0x30, 0x83, 0x43, 0xa5, 0x99, - 0x76, 0xb6, 0x66, 0xde, 0x62, 0x18, 0xca, 0x07, 0xb2, 0xc9, 0xbe, 0x84, 0xf2, 0x24, 0x70, 0x63, - 0xcf, 0x8f, 0x94, 0x74, 0xda, 0x19, 0x21, 0x27, 0x3b, 0x7a, 0x29, 0x2a, 0xdb, 0x84, 0xba, 0x6c, - 0x9a, 0x52, 0x0e, 0x52, 0x42, 0xf7, 0x2e, 0x71, 0x4d, 0x44, 0x51, 0x9b, 0xcc, 0xbb, 0xec, 0x25, - 0xd4, 0x50, 0x86, 0x66, 0xc8, 0xa3, 0xd8, 0x15, 0x4a, 0x50, 0x77, 0x17, 0x46, 0xe8, 0x9f, 0xf0, - 0x89, 0x41, 0x94, 0x41, 0xce, 0x00, 0x9e, 0xf6, 0x30, 0xb0, 0x76, 0xe0, 0x73, 0xa5, 0xac, 0xc5, - 0xc0, 0xf6, 0x02, 0x9f, 0x63, 0x60, 0x91, 0x84, 0x3a, 0xe4, 0x61, 0x18, 0x84, 0x4a, 0x56, 0x8b, - 0x3a, 0xec, 0xa3, 0x15, 0x75, 0x48, 0x34, 0xca, 0x5a, 0xe0, 0x4f, 0x95, 0xa0, 0x32, 0xb2, 0x16, - 0xa8, 0xac, 0x05, 0xe7, 0xb3, 0xf6, 0x4b, 0x1e, 0x8a, 0xef, 0x2c, 0x37, 0xc6, 0xeb, 0x10, 0xfc, - 0xd8, 0x75, 0xcd, 0x63, 0xec, 0x51, 0xb6, 0x2a, 0x83, 0x9c, 0x51, 0x45, 0x4c, 0x12, 0x56, 0xa0, - 0xea, 0xf8, 0x42, 0xd9, 0xa9, 0x8a, 0xa0, 0x3a, 0x1d, 0x5f, 0x48, 0xf3, 0x03, 0xac, 0x46, 0xf1, - 0xd8, 0xe5, 0x8a, 0x81, 0xc9, 0xc9, 0x63, 0x0c, 0x25, 0x9a, 0x4e, 0x22, 0xf0, 0x72, 0x90, 0x14, - 0x4c, 0x42, 0x15, 0x27, 0x41, 0x2c, 0x25, 0x8c, 0xdd, 0x60, 0xac, 0x08, 0x18, 0xe3, 0x3a, 0x12, - 0x10, 0x23, 0x42, 0xb7, 0x0c, 0x45, 0xb2, 0xe9, 0xdf, 0x43, 0x35, 0x3d, 0xef, 0x58, 0xbf, 0xa2, - 0xa3, 0xa4, 0x02, 0x62, 0x93, 0x75, 0xa0, 0x34, 0xb3, 0x42, 0xcb, 0xc3, 0x87, 0x8b, 0x96, 0x19, - 0x41, 0x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7b, 0xd9, 0x46, 0x35, 0xd2, 0x10, 0x1a, 0xf8, 0x9d, 0xe8, 0xa5, 0xff, 0x82, 0x45, 0xfa, - 0x99, 0x9f, 0x8b, 0xbe, 0x72, 0x89, 0x55, 0x8d, 0xb6, 0x9b, 0x3c, 0x9e, 0x3f, 0xb3, 0xd5, 0x73, - 0xef, 0xf1, 0x8c, 0xad, 0x9e, 0x7f, 0x7d, 0xb3, 0x2d, 0x28, 0xe0, 0x6b, 0x3a, 0x63, 0x5d, 0x67, - 0x1e, 0xe5, 0x19, 0xeb, 0x3a, 0xfb, 0x04, 0xef, 0x7e, 0xfd, 0xdd, 0x83, 0xa9, 0x23, 0x0e, 0xe2, - 0x71, 0x67, 0x12, 0x78, 0x8f, 0x15, 0xf5, 0x31, 0xfd, 0xc0, 0x27, 0x81, 0x9b, 0x00, 0x3f, 0x2e, - 0x35, 0x86, 0xce, 0x31, 0xff, 0xc6, 0x11, 0x9d, 0x1d, 0x34, 0xfd, 0xb9, 0xd4, 0x54, 0xfd, 0x17, - 0x2f, 0x08, 0x18, 0x97, 0xc8, 0xe5, 0x8b, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x5f, 0x55, - 0x99, 0xcd, 0x0f, 0x00, 0x00, + // 1588 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcd, 0x72, 0x1b, 0x37, + 0x12, 0x26, 0x35, 0xfc, 0x6d, 0xfe, 0x88, 0x86, 0xed, 0x2d, 0xd6, 0x58, 0x5a, 0xc9, 0xb2, 0xd7, + 0xab, 0xcb, 0xd2, 0x2e, 0xa9, 0x6c, 0xd7, 0xba, 0xb6, 0x76, 0x4b, 0x14, 0x69, 0x53, 0xb5, 0xb4, + 0x2d, 0x8d, 0x28, 0x27, 0xce, 0x65, 0x6a, 0x48, 0xc2, 0x14, 0x4a, 0xc3, 0x19, 0x6a, 0x06, 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, 0x0e, 0x63, 0x90, 0x11, 0x18, 0x74, 0xd4, 0x1a, 0xb3, 0xa8, 0x8d, 0xa1, 0x51, + 0xda, 0xc7, 0x55, 0x8d, 0xf5, 0xb4, 0x15, 0x77, 0xb1, 0x0a, 0xa4, 0x6b, 0x80, 0x1e, 0xd3, 0x2d, + 0x28, 0x5b, 0x05, 0x04, 0x5a, 0x8e, 0x74, 0x92, 0x41, 0x8e, 0xe5, 0x7a, 0x76, 0xd5, 0x58, 0xaf, + 0xa8, 0xc1, 0xb6, 0x37, 0x24, 0x4b, 0xba, 0x1f, 0x64, 0x99, 0x53, 0x96, 0x08, 0xc4, 0x96, 0x34, + 0x48, 0x96, 0x79, 0x65, 0x89, 0x40, 0x5b, 0x95, 0xf9, 0xa5, 0x73, 0x09, 0x8f, 0xbd, 0x98, 0x26, + 0x59, 0x25, 0xd4, 0xa5, 0xeb, 0x92, 0xe4, 0x34, 0xc3, 0x32, 0xc8, 0x04, 0xfe, 0xe7, 0xf8, 0xc0, + 0xa9, 0x6d, 0x0a, 0x80, 0x69, 0x12, 0x64, 0x8f, 0xa0, 0x82, 0xa8, 0xed, 0x7c, 0xfa, 0xc4, 0x07, + 0x92, 0x0f, 0x75, 0xe8, 0xca, 0x08, 0x6e, 0x69, 0x8c, 0x3d, 0x86, 0x2a, 0xc9, 0x4d, 0x78, 0x21, + 0x0f, 0x64, 0x2c, 0x02, 0xc3, 0x2a, 0x23, 0xba, 0x43, 0xe0, 0xce, 0x70, 0x46, 0xd1, 0xf3, 0x12, + 0x32, 0x98, 0x31, 0x67, 0xa8, 0x62, 0x19, 0x40, 0xfa, 0xd2, 0x71, 0xed, 0x64, 0x7b, 0x19, 0xab, + 0x48, 0x88, 0x85, 0x7b, 0x7c, 0x0e, 0x59, 0xca, 0x9b, 0xe8, 0xc0, 0xc0, 0x1f, 0x72, 0x2d, 0x48, + 0x6a, 0x63, 0xa4, 0x74, 0x42, 0xd4, 0x5a, 0x8c, 0xbb, 0x6b, 0xff, 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 0x01, 0x33, 0xf6, 0x75, 0xbe, 0xea, 0x6f, 0xbe, 0xfe, 0xee, 0xd1, 0x48, 0xc8, 0xc3, 0xa8, 0xdf, + 0x18, 0xf8, 0xe3, 0xa7, 0x9a, 0xfa, 0x94, 0x3e, 0xfd, 0x03, 0xdf, 0x8d, 0x81, 0x9f, 0x16, 0x2a, + 0x5d, 0x71, 0xc2, 0xff, 0x2f, 0x64, 0x63, 0x17, 0x87, 0xfe, 0x58, 0xa8, 0xea, 0xfe, 0xab, 0x57, + 0x04, 0xf4, 0x73, 0x64, 0xb2, 0xf9, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xef, 0x72, 0x68, + 0x40, 0x10, 0x00, 0x00, } diff --git a/protobufs/livekit_agentdb.proto b/protobufs/livekit_agentdb.proto index 0cbc036f4..ee4b3ad0e 100644 --- a/protobufs/livekit_agentdb.proto +++ b/protobufs/livekit_agentdb.proto @@ -101,136 +101,137 @@ message AgentDB { // Data plane: one WebSocket per database, one message per frame, correlated // by a client-chosen request_id. Result batches are paced by Credit, so the // server never sends more un-consumed batches than granted. - - message ClientMessage { - uint32 request_id = 1; - oneof message { - Hello hello = 2; // must be first on the socket - Statement exec = 3; // answers ExecResult - Statement query = 4; // answers Columns + ColumnBatch* + Done - Batch batch = 5; - Begin begin = 6; - Commit commit = 7; - Rollback rollback = 8; - Cancel cancel = 9; - Credit credit = 10; - Ping ping = 11; + message Wire { + message ClientMessage { + uint32 request_id = 1; + oneof message { + Hello hello = 2; // must be first on the socket + Statement exec = 3; // answers ExecResult + Statement query = 4; // answers Columns + ColumnBatch* + Done + Batch batch = 5; + Begin begin = 6; + Commit commit = 7; + Rollback rollback = 8; + Cancel cancel = 9; + Credit credit = 10; + Ping ping = 11; + } } - } - message ServerMessage { - uint32 request_id = 1; - oneof message { - HelloOk hello_ok = 2; - Columns columns = 3; - ColumnBatch column_batch = 4; - ExecResult exec_result = 5; - Done done = 6; - Error error = 7; - Pong pong = 8; + message ServerMessage { + uint32 request_id = 1; + oneof message { + HelloOk hello_ok = 2; + Columns columns = 3; + ColumnBatch column_batch = 4; + ExecResult exec_result = 5; + Done done = 6; + Error error = 7; + Pong pong = 8; + } } - } - enum QueryLang { - QUERY_LANG_SQL = 0; - reserved 1; - } + enum QueryLang { + QUERY_LANG_SQL = 0; + reserved 1; + } - // SQLite's five storage classes. - message Value { - oneof value { - bool null_value = 1; // always true when set - int64 int_value = 2; - double double_value = 3; - string text_value = 4; - bytes blob_value = 5; + // SQLite's five storage classes. + message Value { + oneof value { + bool null_value = 1; // always true when set + int64 int_value = 2; + double double_value = 3; + string text_value = 4; + bytes blob_value = 5; + } } - } - message Statement { - string sql = 1; - repeated Value params = 2; // positional - QueryLang lang = 3; - } + message Statement { + string sql = 1; + repeated Value params = 2; // positional + QueryLang lang = 3; + } - message Batch { - repeated Statement statements = 1; // applied atomically, in order - } + message Batch { + repeated Statement statements = 1; // applied atomically, in order + } - message Begin {} - message Commit {} - message Rollback {} - message Cancel {} + message Begin {} + message Commit {} + message Rollback {} + message Cancel {} - message Credit { - uint32 batches = 1; // additional batches the client can absorb - } + message Credit { + uint32 batches = 1; // additional batches the client can absorb + } - message Ping { - int64 timestamp = 1; - } + message Ping { + int64 timestamp = 1; + } - message Pong { - int64 last_ping_timestamp = 1; - int64 timestamp = 2; - } + message Pong { + int64 last_ping_timestamp = 1; + int64 timestamp = 2; + } - message Hello { - string token = 1; - string database_id = 2; - } + message Hello { + string token = 1; + string database_id = 2; + } - message HelloOk { - int64 tip = 1; - uint32 ping_interval_ms = 2; - uint32 ping_timeout_ms = 3; - } + message HelloOk { + int64 tip = 1; + uint32 ping_interval_ms = 2; + uint32 ping_timeout_ms = 3; + } - message Columns { - repeated string names = 1; - } + message Columns { + repeated string names = 1; + } - enum ValueType { - VALUE_TYPE_NULL = 0; - VALUE_TYPE_INT = 1; - VALUE_TYPE_DOUBLE = 2; - VALUE_TYPE_TEXT = 3; - VALUE_TYPE_BLOB = 4; - } + enum ValueType { + VALUE_TYPE_NULL = 0; + VALUE_TYPE_INT = 1; + VALUE_TYPE_DOUBLE = 2; + VALUE_TYPE_TEXT = 3; + VALUE_TYPE_BLOB = 4; + } - // Values are typed per row, as SQLite types them, so a column may mix - // classes: walk `types` and take the next entry from the matching array. Text - // and blobs are concatenated with one exclusive end offset each, so value i - // is data[ends[i-1]:ends[i]] with 0 implied before the first. A NULL occupies - // a tag only. - message Column { - bytes types = 1; // one ValueType per row - repeated sint64 ints = 2; - repeated double doubles = 3; - bytes text_data = 4; - repeated uint32 text_ends = 5; - bytes blob_data = 6; - repeated uint32 blob_ends = 7; - } + // Values are typed per row, as SQLite types them, so a column may mix + // classes: walk `types` and take the next entry from the matching array. Text + // and blobs are concatenated with one exclusive end offset each, so value i + // is data[ends[i-1]:ends[i]] with 0 implied before the first. A NULL occupies + // a tag only. + message Column { + bytes types = 1; // one ValueType per row + repeated sint64 ints = 2; + repeated double doubles = 3; + bytes text_data = 4; + repeated uint32 text_ends = 5; + bytes blob_data = 6; + repeated uint32 blob_ends = 7; + } - message ColumnBatch { - repeated Column columns = 1; // one per name in Columns - uint32 rows = 2; - } + message ColumnBatch { + repeated Column columns = 1; // one per name in Columns + uint32 rows = 2; + } - message ExecResult { - int64 rows_affected = 1; - int64 last_insert_id = 2; - int64 tip = 3; - } + message ExecResult { + int64 rows_affected = 1; + int64 last_insert_id = 2; + int64 tip = 3; + } - message Done { - int64 tip = 1; // the snapshot the query ran at - uint64 total_rows = 2; - } + message Done { + int64 tip = 1; // the snapshot the query ran at + uint64 total_rows = 2; + } - message Error { - string code = 1; // stable, machine-readable - string message = 2; + message Error { + string code = 1; // stable, machine-readable + string message = 2; + } } } From 219d0f88803cabe83cf371e8a45bf54e4a575205 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 21:32:29 +0000 Subject: [PATCH 17/24] generated protobuf --- livekit/livekit_agentdb.pb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livekit/livekit_agentdb.pb.go b/livekit/livekit_agentdb.pb.go index f62643ce7..c22cc72a1 100644 --- a/livekit/livekit_agentdb.pb.go +++ b/livekit/livekit_agentdb.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v7.35.1 // source: livekit_agentdb.proto package livekit From f88d8e11d05655fef43a9f7a83b43599c6640255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Wed, 5 Aug 2026 14:45:11 -0700 Subject: [PATCH 18/24] agentdb: field names follow the repo convention No other proto here suffixes a timestamp with _unix; created_at, started_at, ended_at and token_expires_at are the shape, so created_at_unix and expires_at_unix lose the suffix. The ping fields carry milliseconds and the repo marks non-second units (timestamp_ms, started_at_ns), so they say _ms rather than leaving a reader to assume seconds. Also drops a claim about listing that is not true: ListDatabases point-reads each head today. --- livekit/livekit_agentdb.pb.go | 119 +++++++++--------- livekit/livekit_agentdb.twirp.go | 201 +++++++++++++++---------------- protobufs/livekit_agentdb.proto | 23 ++-- 3 files changed, 173 insertions(+), 170 deletions(-) diff --git a/livekit/livekit_agentdb.pb.go b/livekit/livekit_agentdb.pb.go index c22cc72a1..3e3bfd88f 100644 --- a/livekit/livekit_agentdb.pb.go +++ b/livekit/livekit_agentdb.pb.go @@ -175,7 +175,7 @@ type AgentDB_CreateRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` UserAttributes string `protobuf:"bytes,2,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` // opaque JSON metadata for the caller - // Unset: never expires, and expires_at_unix is then 0 everywhere. + // Unset: never expires, and expires_at is then 0 everywhere. // Otherwise clamped to the server cap, and never extended. TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` unknownFields protoimpl.UnknownFields @@ -236,7 +236,7 @@ func (x *AgentDB_CreateRequest) GetTtlSeconds() int64 { type AgentDB_CreateResponse struct { state protoimpl.MessageState `protogen:"open.v1"` DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` // "DB_..." - ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` + ExpiresAt int64 `protobuf:"varint,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -278,9 +278,9 @@ func (x *AgentDB_CreateResponse) GetDatabaseId() string { return "" } -func (x *AgentDB_CreateResponse) GetExpiresAtUnix() int64 { +func (x *AgentDB_CreateResponse) GetExpiresAt() int64 { if x != nil { - return x.ExpiresAtUnix + return x.ExpiresAt } return 0 } @@ -334,8 +334,8 @@ type AgentDB_GetResponse struct { DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` - CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` - ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ExpiresAt int64 `protobuf:"varint,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` Tip int64 `protobuf:"varint,6,opt,name=tip,proto3" json:"tip,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -392,16 +392,16 @@ func (x *AgentDB_GetResponse) GetUserAttributes() string { return "" } -func (x *AgentDB_GetResponse) GetCreatedAtUnix() int64 { +func (x *AgentDB_GetResponse) GetCreatedAt() int64 { if x != nil { - return x.CreatedAtUnix + return x.CreatedAt } return 0 } -func (x *AgentDB_GetResponse) GetExpiresAtUnix() int64 { +func (x *AgentDB_GetResponse) GetExpiresAt() int64 { if x != nil { - return x.ExpiresAtUnix + return x.ExpiresAt } return 0 } @@ -517,15 +517,14 @@ func (x *AgentDB_ListResponse) GetNextPageToken() string { return "" } -// Immutable fields only, so a listing needs no per-database read. No tip: it -// moves on every commit. +// Immutable fields only. No tip: it moves on every commit. type AgentDB_Summary struct { state protoimpl.MessageState `protogen:"open.v1"` DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` - CreatedAtUnix int64 `protobuf:"varint,4,opt,name=created_at_unix,json=createdAtUnix,proto3" json:"created_at_unix,omitempty"` - ExpiresAtUnix int64 `protobuf:"varint,5,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ExpiresAt int64 `protobuf:"varint,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -581,16 +580,16 @@ func (x *AgentDB_Summary) GetUserAttributes() string { return "" } -func (x *AgentDB_Summary) GetCreatedAtUnix() int64 { +func (x *AgentDB_Summary) GetCreatedAt() int64 { if x != nil { - return x.CreatedAtUnix + return x.CreatedAt } return 0 } -func (x *AgentDB_Summary) GetExpiresAtUnix() int64 { +func (x *AgentDB_Summary) GetExpiresAt() int64 { if x != nil { - return x.ExpiresAtUnix + return x.ExpiresAt } return 0 } @@ -721,9 +720,9 @@ func (x *AgentDB_DumpRequest) GetDatabaseId() string { type AgentDB_DumpResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - DownloadUrl string `protobuf:"bytes,1,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"` // pre-authenticated object-storage URL - ExpiresAtUnix int64 `protobuf:"varint,2,opt,name=expires_at_unix,json=expiresAtUnix,proto3" json:"expires_at_unix,omitempty"` // of the URL, not the database - Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // what the dump is consistent at + DownloadUrl string `protobuf:"bytes,1,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"` // pre-authenticated object-storage URL + ExpiresAt int64 `protobuf:"varint,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` // of the URL, not the database + Tip int64 `protobuf:"varint,3,opt,name=tip,proto3" json:"tip,omitempty"` // what the dump is consistent at unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -765,9 +764,9 @@ func (x *AgentDB_DumpResponse) GetDownloadUrl() string { return "" } -func (x *AgentDB_DumpResponse) GetExpiresAtUnix() int64 { +func (x *AgentDB_DumpResponse) GetExpiresAt() int64 { if x != nil { - return x.ExpiresAtUnix + return x.ExpiresAt } return 0 } @@ -1631,7 +1630,7 @@ func (x *AgentDB_Wire_Credit) GetBatches() uint32 { type AgentDB_Wire_Ping struct { state protoimpl.MessageState `protogen:"open.v1"` - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + TimestampMs int64 `protobuf:"varint,1,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1666,19 +1665,19 @@ func (*AgentDB_Wire_Ping) Descriptor() ([]byte, []int) { return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 10} } -func (x *AgentDB_Wire_Ping) GetTimestamp() int64 { +func (x *AgentDB_Wire_Ping) GetTimestampMs() int64 { if x != nil { - return x.Timestamp + return x.TimestampMs } return 0 } type AgentDB_Wire_Pong struct { - state protoimpl.MessageState `protogen:"open.v1"` - LastPingTimestamp int64 `protobuf:"varint,1,opt,name=last_ping_timestamp,json=lastPingTimestamp,proto3" json:"last_ping_timestamp,omitempty"` - Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + LastPingTimestampMs int64 `protobuf:"varint,1,opt,name=last_ping_timestamp_ms,json=lastPingTimestampMs,proto3" json:"last_ping_timestamp_ms,omitempty"` + TimestampMs int64 `protobuf:"varint,2,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AgentDB_Wire_Pong) Reset() { @@ -1711,16 +1710,16 @@ func (*AgentDB_Wire_Pong) Descriptor() ([]byte, []int) { return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 11} } -func (x *AgentDB_Wire_Pong) GetLastPingTimestamp() int64 { +func (x *AgentDB_Wire_Pong) GetLastPingTimestampMs() int64 { if x != nil { - return x.LastPingTimestamp + return x.LastPingTimestampMs } return 0 } -func (x *AgentDB_Wire_Pong) GetTimestamp() int64 { +func (x *AgentDB_Wire_Pong) GetTimestampMs() int64 { if x != nil { - return x.Timestamp + return x.TimestampMs } return 0 } @@ -2198,28 +2197,31 @@ var File_livekit_agentdb_proto protoreflect.FileDescriptor const file_livekit_agentdb_proto_rawDesc = "" + "\n" + - "\x15livekit_agentdb.proto\x12\alivekit\"\xb7\x1c\n" + + "\x15livekit_agentdb.proto\x12\alivekit\"\x90\x1c\n" + "\aAgentDB\x1aq\n" + "\rCreateRequest\x12\x16\n" + "\x06region\x18\x01 \x01(\tR\x06region\x12'\n" + "\x0fuser_attributes\x18\x02 \x01(\tR\x0euserAttributes\x12\x1f\n" + "\vttl_seconds\x18\x03 \x01(\x03R\n" + - "ttlSeconds\x1aY\n" + + "ttlSeconds\x1aP\n" + "\x0eCreateResponse\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + - "databaseId\x12&\n" + - "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\x1a-\n" + + "databaseId\x12\x1d\n" + + "\n" + + "expires_at\x18\x02 \x01(\x03R\texpiresAt\x1a-\n" + "\n" + "GetRequest\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + - "databaseId\x1a\xd1\x01\n" + + "databaseId\x1a\xbf\x01\n" + "\vGetResponse\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + "databaseId\x12\x16\n" + "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + - "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12&\n" + - "\x0fcreated_at_unix\x18\x04 \x01(\x03R\rcreatedAtUnix\x12&\n" + - "\x0fexpires_at_unix\x18\x05 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + + "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12\x1d\n" + + "\n" + + "created_at\x18\x04 \x01(\x03R\tcreatedAt\x12\x1d\n" + + "\n" + + "expires_at\x18\x05 \x01(\x03R\texpiresAt\x12\x10\n" + "\x03tip\x18\x06 \x01(\x03R\x03tip\x1aI\n" + "\vListRequest\x12\x1b\n" + "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + @@ -2227,25 +2229,28 @@ const file_livekit_agentdb_proto_rawDesc = "" + "page_token\x18\x02 \x01(\tR\tpageToken\x1an\n" + "\fListResponse\x126\n" + "\tdatabases\x18\x01 \x03(\v2\x18.livekit.AgentDB.SummaryR\tdatabases\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x1a\xbb\x01\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x1a\xa9\x01\n" + "\aSummary\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + "databaseId\x12\x16\n" + "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + - "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12&\n" + - "\x0fcreated_at_unix\x18\x04 \x01(\x03R\rcreatedAtUnix\x12&\n" + - "\x0fexpires_at_unix\x18\x05 \x01(\x03R\rexpiresAtUnix\x1a0\n" + + "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12\x1d\n" + + "\n" + + "created_at\x18\x04 \x01(\x03R\tcreatedAt\x12\x1d\n" + + "\n" + + "expires_at\x18\x05 \x01(\x03R\texpiresAt\x1a0\n" + "\rDeleteRequest\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + "databaseId\x1a\x10\n" + "\x0eDeleteResponse\x1a.\n" + "\vDumpRequest\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + - "databaseId\x1ak\n" + + "databaseId\x1ab\n" + "\fDumpResponse\x12!\n" + - "\fdownload_url\x18\x01 \x01(\tR\vdownloadUrl\x12&\n" + - "\x0fexpires_at_unix\x18\x02 \x01(\x03R\rexpiresAtUnix\x12\x10\n" + - "\x03tip\x18\x03 \x01(\x03R\x03tip\x1a\x80\x14\n" + + "\fdownload_url\x18\x01 \x01(\tR\vdownloadUrl\x12\x1d\n" + + "\n" + + "expires_at\x18\x02 \x01(\x03R\texpiresAt\x12\x10\n" + + "\x03tip\x18\x03 \x01(\x03R\x03tip\x1a\x8f\x14\n" + "\x04Wire\x1a\xe0\x04\n" + "\rClientMessage\x12\x1d\n" + "\n" + @@ -2298,12 +2303,12 @@ const file_livekit_agentdb_proto_rawDesc = "" + "\bRollback\x1a\b\n" + "\x06Cancel\x1a\"\n" + "\x06Credit\x12\x18\n" + - "\abatches\x18\x01 \x01(\rR\abatches\x1a$\n" + - "\x04Ping\x12\x1c\n" + - "\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\x1aT\n" + - "\x04Pong\x12.\n" + - "\x13last_ping_timestamp\x18\x01 \x01(\x03R\x11lastPingTimestamp\x12\x1c\n" + - "\ttimestamp\x18\x02 \x01(\x03R\ttimestamp\x1a>\n" + + "\abatches\x18\x01 \x01(\rR\abatches\x1a)\n" + + "\x04Ping\x12!\n" + + "\ftimestamp_ms\x18\x01 \x01(\x03R\vtimestampMs\x1a^\n" + + "\x04Pong\x123\n" + + "\x16last_ping_timestamp_ms\x18\x01 \x01(\x03R\x13lastPingTimestampMs\x12!\n" + + "\ftimestamp_ms\x18\x02 \x01(\x03R\vtimestampMs\x1a>\n" + "\x05Hello\x12\x14\n" + "\x05token\x18\x01 \x01(\tR\x05token\x12\x1f\n" + "\vdatabase_id\x18\x02 \x01(\tR\n" + diff --git a/livekit/livekit_agentdb.twirp.go b/livekit/livekit_agentdb.twirp.go index 7054707c8..f2bf0f44b 100644 --- a/livekit/livekit_agentdb.twirp.go +++ b/livekit/livekit_agentdb.twirp.go @@ -1637,105 +1637,104 @@ func (s *agentDBServiceServer) PathPrefix() string { } var twirpFileDescriptor2 = []byte{ - // 1588 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcd, 0x72, 0x1b, 0x37, - 0x12, 0x26, 0x35, 0xfc, 0x6d, 0xfe, 0x88, 0x86, 0xed, 0x2d, 0xd6, 0x58, 0x5a, 0xc9, 0xb2, 0xd7, - 0xab, 0xcb, 0xd2, 0x2e, 0xa9, 0x6c, 0xd7, 0xba, 0xb6, 0x76, 0x4b, 0x14, 0x69, 0x53, 0xb5, 0xb4, - 0x2d, 0x8d, 0x28, 0x27, 0xce, 0x65, 0x6a, 0x48, 0xc2, 0x14, 0x4a, 0xc3, 0x19, 0x6a, 0x06, 0x23, - 0x4b, 0x3e, 0xe5, 0x96, 0x07, 0xc8, 0x5b, 0xe4, 0x05, 0x7c, 0x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a1, 0x51, - 0xda, 0xc7, 0x55, 0x8d, 0xf5, 0xb4, 0x15, 0x77, 0xb1, 0x0a, 0xa4, 0x6b, 0x80, 0x1e, 0xd3, 0x2d, - 0x28, 0x5b, 0x05, 0x04, 0x5a, 0x8e, 0x74, 0x92, 0x41, 0x8e, 0xe5, 0x7a, 0x76, 0xd5, 0x58, 0xaf, - 0xa8, 0xc1, 0xb6, 0x37, 0x24, 0x4b, 0xba, 0x1f, 0x64, 0x99, 0x53, 0x96, 0x08, 0xc4, 0x96, 0x34, - 0x48, 0x96, 0x79, 0x65, 0x89, 0x40, 0x5b, 0x95, 0xf9, 0xa5, 0x73, 0x09, 0x8f, 0xbd, 0x98, 0x26, - 0x59, 0x25, 0xd4, 0xa5, 0xeb, 0x92, 0xe4, 0x34, 0xc3, 0x32, 0xc8, 0x04, 0xfe, 0xe7, 0xf8, 0xc0, - 0xa9, 0x6d, 0x0a, 0x80, 0x69, 0x12, 0x64, 0x8f, 0xa0, 0x82, 0xa8, 0xed, 0x7c, 0xfa, 0xc4, 0x07, - 0x92, 0x0f, 0x75, 0xe8, 0xca, 0x08, 0x6e, 0x69, 0x8c, 0x3d, 0x86, 0x2a, 0xc9, 0x4d, 0x78, 0x21, - 0x0f, 0x64, 0x2c, 0x02, 0xc3, 0x2a, 0x23, 0xba, 0x43, 0xe0, 0xce, 0x70, 0x46, 0xd1, 0xf3, 0x12, - 0x32, 0x98, 0x31, 0x67, 0xa8, 0x62, 0x19, 0x40, 0xfa, 0xd2, 0x71, 0xed, 0x64, 0x7b, 0x19, 0xab, - 0x48, 0x88, 0x85, 0x7b, 0x7c, 0x0e, 0x59, 0xca, 0x9b, 0xe8, 0xc0, 0xc0, 0x1f, 0x72, 0x2d, 0x48, - 0x6a, 0x63, 0xa4, 0x74, 0x42, 0xd4, 0x5a, 0x8c, 0xbb, 0x6b, 0xff, 0x80, 0x62, 0x72, 0xdd, 0x19, - 0x83, 0xea, 0xde, 0x41, 0xdb, 0xfa, 0x68, 0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, 0xc8, 0xc3, 0xa8, 0xdf, - 0x18, 0xf8, 0xe3, 0xa7, 0x9a, 0xfa, 0x94, 0x3e, 0xfd, 0x03, 0xdf, 0x8d, 0x81, 0x9f, 0x16, 0x2a, - 0x5d, 0x71, 0xc2, 0xff, 0x2f, 0x64, 0x63, 0x17, 0x87, 0xfe, 0x58, 0xa8, 0xea, 0xfe, 0xab, 0x57, - 0x04, 0xf4, 0x73, 0x64, 0xb2, 0xf9, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xef, 0x72, 0x68, - 0x40, 0x10, 0x00, 0x00, + // 1578 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xdb, 0x52, 0x1b, 0xc7, + 0x16, 0x95, 0x18, 0x5d, 0xb7, 0x2e, 0xd6, 0x69, 0x5f, 0x4a, 0x35, 0x86, 0x03, 0xc6, 0xe7, 0xc2, + 0x79, 0x38, 0xb2, 0x0b, 0xca, 0x76, 0x1d, 0xd7, 0xa9, 0xa4, 0x10, 0x92, 0x2d, 0x2a, 0xc2, 0x86, + 0x01, 0x9c, 0x38, 0x0f, 0x99, 0x1a, 0x69, 0xda, 0x62, 0x8a, 0xb9, 0x88, 0x99, 0x1e, 0x0c, 0xfe, + 0x81, 0x3c, 0x26, 0x55, 0xf9, 0x8a, 0xe4, 0x07, 0xf2, 0x98, 0x7c, 0x45, 0x9e, 0xf3, 0x9c, 0xaf, + 0x48, 0xed, 0xdd, 0x3d, 0x23, 0x40, 0x12, 0xf0, 0x98, 0xb7, 0xee, 0xd5, 0x6b, 0xf5, 0x6d, 0xaf, + 0xde, 0xdd, 0x0d, 0xf7, 0x5d, 0xe7, 0x94, 0x1f, 0x3b, 0xc2, 0xb4, 0x46, 0xdc, 0x17, 0xf6, 0xa0, + 0x35, 0x0e, 0x03, 0x11, 0xb0, 0xa2, 0x82, 0x57, 0xbf, 0x5f, 0x84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0xcd, 0x36, 0x20, 0x7f, 0xc4, 0x5d, 0x37, 0xa0, 0x51, 0x2a, 0xeb, + 0x0f, 0xa7, 0x9c, 0x81, 0xdd, 0xb6, 0x7a, 0x48, 0xe9, 0x65, 0x0c, 0xc9, 0x65, 0xcf, 0x20, 0xc7, + 0xcf, 0xf8, 0x90, 0x66, 0x50, 0x59, 0x5f, 0x9e, 0xad, 0xd9, 0x17, 0x96, 0xe0, 0x1e, 0xf7, 0x45, + 0x2f, 0x63, 0x10, 0x9d, 0xbd, 0x80, 0xfc, 0x49, 0xcc, 0xc3, 0x73, 0x0a, 0xdb, 0xad, 0x74, 0x92, + 0x8f, 0x93, 0x1c, 0x58, 0x62, 0x78, 0x44, 0x01, 0x9d, 0x3b, 0xc9, 0x36, 0x52, 0x50, 0x44, 0x5c, + 0x12, 0xf1, 0x91, 0xe3, 0xd3, 0x31, 0x9b, 0x2f, 0x42, 0x0a, 0x89, 0xb0, 0xc0, 0x9e, 0x43, 0x61, + 0x18, 0x78, 0x9e, 0x23, 0x9a, 0x45, 0x52, 0x2d, 0xce, 0x56, 0x6d, 0x11, 0xa7, 0x97, 0x31, 0x14, + 0x9b, 0xfd, 0x1f, 0x4a, 0x61, 0xe0, 0xba, 0x03, 0x6b, 0x78, 0xdc, 0x2c, 0x91, 0xf2, 0xef, 0xb3, + 0x95, 0x86, 0x62, 0xf5, 0x32, 0x46, 0xaa, 0xa0, 0x51, 0x2d, 0x7f, 0xc8, 0xdd, 0x66, 0xf9, 0xda, + 0x51, 0x89, 0x43, 0xa3, 0x52, 0x89, 0x74, 0x21, 0xb7, 0x1d, 0xd1, 0x84, 0x6b, 0x75, 0xc4, 0x21, + 0x1d, 0x95, 0xd8, 0x53, 0xc8, 0x8d, 0x1d, 0x7f, 0xd4, 0xac, 0x90, 0x4a, 0x9f, 0xad, 0xda, 0x75, + 0xfc, 0x11, 0x86, 0x0e, 0x99, 0xed, 0x32, 0x14, 0x3d, 0x69, 0x28, 0xfd, 0x37, 0x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x03, 0x43, 0x97, 0xc5, 0x7d, 0x95, 0x68, 0x3a, 0x88, 0xc0, 0xfb, 0x45, + 0x52, 0x30, 0x3a, 0x65, 0x1c, 0x04, 0xb1, 0x94, 0x30, 0x70, 0x83, 0x81, 0x22, 0xe0, 0xbe, 0x57, + 0x91, 0x80, 0x18, 0x11, 0xda, 0x45, 0xc8, 0x53, 0x9b, 0xfe, 0x6d, 0x16, 0xca, 0x69, 0xda, 0xc0, + 0xf4, 0x18, 0x9d, 0x24, 0x79, 0x15, 0x8b, 0x6c, 0x03, 0x0a, 0x63, 0x2b, 0xb4, 0x3c, 0x7c, 0xe1, + 0x68, 0xf3, 0x37, 0x93, 0x7a, 0x35, 0x14, 0x95, 0x6d, 0x40, 0xce, 0xb5, 0xfc, 0x11, 0x4d, 0xbe, + 0x3e, 0x2f, 0x59, 0xed, 0x61, 0x7e, 0xea, 0x5b, 0xfe, 0xc8, 0x20, 0xb2, 0xde, 0x83, 0xbc, 0x74, + 0xcd, 0xe7, 0x00, 0x51, 0x32, 0xa3, 0xe4, 0xda, 0xbd, 0x29, 0xe1, 0x19, 0x17, 0x24, 0x7a, 0x11, + 0xf2, 0x94, 0x9b, 0xf4, 0x12, 0x14, 0x64, 0xba, 0xd1, 0x01, 0x4a, 0x49, 0xfa, 0x20, 0x94, 0x92, + 0x80, 0xbe, 0x0a, 0x05, 0x79, 0xc0, 0x59, 0x13, 0x8a, 0x64, 0x75, 0xba, 0xe7, 0xf1, 0x10, 0x26, + 0x55, 0xfd, 0x3f, 0x90, 0xc3, 0xe3, 0x8c, 0x77, 0x8f, 0x70, 0x3c, 0x1e, 0x09, 0xcb, 0x1b, 0x9b, + 0x9e, 0xa4, 0x69, 0x46, 0x25, 0xc5, 0x76, 0x22, 0xfd, 0x1b, 0xc8, 0xa1, 0x41, 0xd8, 0x06, 0x3c, + 0x70, 0xad, 0x48, 0x98, 0x78, 0xfc, 0xcd, 0x19, 0xa2, 0xbb, 0xd8, 0x8a, 0x9d, 0x1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/livekit_agentdb.proto b/protobufs/livekit_agentdb.proto index ee4b3ad0e..d961c6c23 100644 --- a/protobufs/livekit_agentdb.proto +++ b/protobufs/livekit_agentdb.proto @@ -39,14 +39,14 @@ message AgentDB { message CreateRequest { string region = 1; string user_attributes = 2; // opaque JSON metadata for the caller - // Unset: never expires, and expires_at_unix is then 0 everywhere. + // Unset: never expires, and expires_at is then 0 everywhere. // Otherwise clamped to the server cap, and never extended. int64 ttl_seconds = 3; } message CreateResponse { string database_id = 1; // "DB_..." - int64 expires_at_unix = 2; + int64 expires_at = 2; } message GetRequest { @@ -57,8 +57,8 @@ message AgentDB { string database_id = 1; string region = 2; string user_attributes = 3; - int64 created_at_unix = 4; - int64 expires_at_unix = 5; + int64 created_at = 4; + int64 expires_at = 5; int64 tip = 6; } @@ -72,14 +72,13 @@ message AgentDB { string next_page_token = 2; // empty when exhausted } - // Immutable fields only, so a listing needs no per-database read. No tip: it - // moves on every commit. + // Immutable fields only. No tip: it moves on every commit. message Summary { string database_id = 1; string region = 2; string user_attributes = 3; - int64 created_at_unix = 4; - int64 expires_at_unix = 5; + int64 created_at = 4; + int64 expires_at = 5; } message DeleteRequest { @@ -94,7 +93,7 @@ message AgentDB { message DumpResponse { string download_url = 1; // pre-authenticated object-storage URL - int64 expires_at_unix = 2; // of the URL, not the database + int64 expires_at = 2; // of the URL, not the database int64 tip = 3; // what the dump is consistent at } @@ -167,12 +166,12 @@ message AgentDB { } message Ping { - int64 timestamp = 1; + int64 timestamp_ms = 1; } message Pong { - int64 last_ping_timestamp = 1; - int64 timestamp = 2; + int64 last_ping_timestamp_ms = 1; + int64 timestamp_ms = 2; } message Hello { From 81313f418515b78d9ac5efc1eff142aeff968d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Wed, 5 Aug 2026 14:48:27 -0700 Subject: [PATCH 19/24] agentdb: drop user_attributes Nothing read it. The server checked it was well-formed JSON, stored it, and echoed it back; no path parsed, indexed or filtered on it, so it bought a column and a validation step and nothing else. A caller that needs labels can get them back as a map, with the PII annotation the rest of the repo uses, once something actually consumes them. Field numbers are renumbered rather than reserved: no client has ever spoken this protocol. --- livekit/livekit_agentdb.pb.go | 91 +++++--------- livekit/livekit_agentdb.twirp.go | 198 +++++++++++++++---------------- protobufs/livekit_agentdb.proto | 15 +-- 3 files changed, 136 insertions(+), 168 deletions(-) diff --git a/livekit/livekit_agentdb.pb.go b/livekit/livekit_agentdb.pb.go index 3e3bfd88f..b35e0a47d 100644 --- a/livekit/livekit_agentdb.pb.go +++ b/livekit/livekit_agentdb.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.35.1 +// protoc v7.34.1 // source: livekit_agentdb.proto package livekit @@ -172,12 +172,11 @@ func (*AgentDB) Descriptor() ([]byte, []int) { } type AgentDB_CreateRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` - UserAttributes string `protobuf:"bytes,2,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` // opaque JSON metadata for the caller + state protoimpl.MessageState `protogen:"open.v1"` + Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` // Unset: never expires, and expires_at is then 0 everywhere. // Otherwise clamped to the server cap, and never extended. - TtlSeconds int64 `protobuf:"varint,3,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` + TtlSeconds int64 `protobuf:"varint,2,opt,name=ttl_seconds,json=ttlSeconds,proto3" json:"ttl_seconds,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -219,13 +218,6 @@ func (x *AgentDB_CreateRequest) GetRegion() string { return "" } -func (x *AgentDB_CreateRequest) GetUserAttributes() string { - if x != nil { - return x.UserAttributes - } - return "" -} - func (x *AgentDB_CreateRequest) GetTtlSeconds() int64 { if x != nil { return x.TtlSeconds @@ -330,15 +322,14 @@ func (x *AgentDB_GetRequest) GetDatabaseId() string { } type AgentDB_GetResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` - Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` - UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` - CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - ExpiresAt int64 `protobuf:"varint,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` - Tip int64 `protobuf:"varint,6,opt,name=tip,proto3" json:"tip,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ExpiresAt int64 `protobuf:"varint,4,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + Tip int64 `protobuf:"varint,5,opt,name=tip,proto3" json:"tip,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AgentDB_GetResponse) Reset() { @@ -385,13 +376,6 @@ func (x *AgentDB_GetResponse) GetRegion() string { return "" } -func (x *AgentDB_GetResponse) GetUserAttributes() string { - if x != nil { - return x.UserAttributes - } - return "" -} - func (x *AgentDB_GetResponse) GetCreatedAt() int64 { if x != nil { return x.CreatedAt @@ -519,14 +503,13 @@ func (x *AgentDB_ListResponse) GetNextPageToken() string { // Immutable fields only. No tip: it moves on every commit. type AgentDB_Summary struct { - state protoimpl.MessageState `protogen:"open.v1"` - DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` - Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` - UserAttributes string `protobuf:"bytes,3,opt,name=user_attributes,json=userAttributes,proto3" json:"user_attributes,omitempty"` - CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - ExpiresAt int64 `protobuf:"varint,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ExpiresAt int64 `protobuf:"varint,4,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AgentDB_Summary) Reset() { @@ -573,13 +556,6 @@ func (x *AgentDB_Summary) GetRegion() string { return "" } -func (x *AgentDB_Summary) GetUserAttributes() string { - if x != nil { - return x.UserAttributes - } - return "" -} - func (x *AgentDB_Summary) GetCreatedAt() int64 { if x != nil { return x.CreatedAt @@ -2197,12 +2173,11 @@ var File_livekit_agentdb_proto protoreflect.FileDescriptor const file_livekit_agentdb_proto_rawDesc = "" + "\n" + - "\x15livekit_agentdb.proto\x12\alivekit\"\x90\x1c\n" + - "\aAgentDB\x1aq\n" + + "\x15livekit_agentdb.proto\x12\alivekit\"\x95\x1b\n" + + "\aAgentDB\x1aH\n" + "\rCreateRequest\x12\x16\n" + - "\x06region\x18\x01 \x01(\tR\x06region\x12'\n" + - "\x0fuser_attributes\x18\x02 \x01(\tR\x0euserAttributes\x12\x1f\n" + - "\vttl_seconds\x18\x03 \x01(\x03R\n" + + "\x06region\x18\x01 \x01(\tR\x06region\x12\x1f\n" + + "\vttl_seconds\x18\x02 \x01(\x03R\n" + "ttlSeconds\x1aP\n" + "\x0eCreateResponse\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + @@ -2212,33 +2187,31 @@ const file_livekit_agentdb_proto_rawDesc = "" + "\n" + "GetRequest\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + - "databaseId\x1a\xbf\x01\n" + + "databaseId\x1a\x96\x01\n" + "\vGetResponse\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + "databaseId\x12\x16\n" + - "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + - "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12\x1d\n" + + "\x06region\x18\x02 \x01(\tR\x06region\x12\x1d\n" + "\n" + - "created_at\x18\x04 \x01(\x03R\tcreatedAt\x12\x1d\n" + + "created_at\x18\x03 \x01(\x03R\tcreatedAt\x12\x1d\n" + "\n" + - "expires_at\x18\x05 \x01(\x03R\texpiresAt\x12\x10\n" + - "\x03tip\x18\x06 \x01(\x03R\x03tip\x1aI\n" + + "expires_at\x18\x04 \x01(\x03R\texpiresAt\x12\x10\n" + + "\x03tip\x18\x05 \x01(\x03R\x03tip\x1aI\n" + "\vListRequest\x12\x1b\n" + "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + "\n" + "page_token\x18\x02 \x01(\tR\tpageToken\x1an\n" + "\fListResponse\x126\n" + "\tdatabases\x18\x01 \x03(\v2\x18.livekit.AgentDB.SummaryR\tdatabases\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x1a\xa9\x01\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x1a\x80\x01\n" + "\aSummary\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + "databaseId\x12\x16\n" + - "\x06region\x18\x02 \x01(\tR\x06region\x12'\n" + - "\x0fuser_attributes\x18\x03 \x01(\tR\x0euserAttributes\x12\x1d\n" + + "\x06region\x18\x02 \x01(\tR\x06region\x12\x1d\n" + "\n" + - "created_at\x18\x04 \x01(\x03R\tcreatedAt\x12\x1d\n" + + "created_at\x18\x03 \x01(\x03R\tcreatedAt\x12\x1d\n" + "\n" + - "expires_at\x18\x05 \x01(\x03R\texpiresAt\x1a0\n" + + "expires_at\x18\x04 \x01(\x03R\texpiresAt\x1a0\n" + "\rDeleteRequest\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + "databaseId\x1a\x10\n" + diff --git a/livekit/livekit_agentdb.twirp.go b/livekit/livekit_agentdb.twirp.go index f2bf0f44b..31655599e 100644 --- a/livekit/livekit_agentdb.twirp.go +++ b/livekit/livekit_agentdb.twirp.go @@ -1637,104 +1637,102 @@ func (s *agentDBServiceServer) PathPrefix() string { } var twirpFileDescriptor2 = []byte{ - // 1578 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xdb, 0x52, 0x1b, 0xc7, - 0x16, 0x95, 0x18, 0x5d, 0xb7, 0x2e, 0xd6, 0x69, 0x5f, 0x4a, 0x35, 0x86, 0x03, 0xc6, 0xe7, 0xc2, - 0x79, 0x38, 0xb2, 0x0b, 0xca, 0x76, 0x1d, 0xd7, 0xa9, 0xa4, 0x10, 0x92, 0x2d, 0x2a, 0xc2, 0x86, - 0x01, 0x9c, 0x38, 0x0f, 0x99, 0x1a, 0x69, 0xda, 0x62, 0x8a, 0xb9, 0x88, 0x99, 0x1e, 0x0c, 0xfe, - 0x81, 0x3c, 0x26, 0x55, 0xf9, 0x8a, 0xe4, 0x07, 0xf2, 0x98, 0x7c, 0x45, 0x9e, 0xf3, 0x9c, 0xaf, - 0x48, 0xed, 0xdd, 0x3d, 0x23, 0x40, 0x12, 0xf0, 0x98, 0xb7, 0xee, 0xd5, 0x6b, 0xf5, 0x6d, 0xaf, - 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e, 0xc6, 0x28, 0x23, 0x26, 0x09, 0x4b, - 0x50, 0x76, 0x7c, 0xa1, 0xda, 0x29, 0x3f, 0xa1, 0x9f, 0x1d, 0x5f, 0xc8, 0xe6, 0xc7, 0x98, 0xe2, - 0xe2, 0x81, 0xcb, 0x15, 0x03, 0x43, 0x97, 0xc5, 0x7d, 0x95, 0x68, 0x3a, 0x88, 0xc0, 0xfb, 0x45, - 0x52, 0x30, 0x3a, 0x65, 0x1c, 0x04, 0xb1, 0x94, 0x30, 0x70, 0x83, 0x81, 0x22, 0xe0, 0xbe, 0x57, - 0x91, 0x80, 0x18, 0x11, 0xda, 0x45, 0xc8, 0x53, 0x9b, 0xfe, 0x6d, 0x16, 0xca, 0x69, 0xda, 0xc0, - 0xf4, 0x18, 0x9d, 0x24, 0x79, 0x15, 0x8b, 0x6c, 0x03, 0x0a, 0x63, 0x2b, 0xb4, 0x3c, 0x7c, 0xe1, - 0x68, 0xf3, 0x37, 0x93, 0x7a, 0x35, 0x14, 0x95, 0x6d, 0x40, 0xce, 0xb5, 0xfc, 0x11, 0x4d, 0xbe, - 0x3e, 0x2f, 0x59, 0xed, 0x61, 0x7e, 0xea, 0x5b, 0xfe, 0xc8, 0x20, 0xb2, 0xde, 0x83, 0xbc, 0x74, - 0xcd, 0xe7, 0x00, 0x51, 0x32, 0xa3, 0xe4, 0xda, 0xbd, 0x29, 0xe1, 0x19, 0x17, 0x24, 0x7a, 0x11, - 0xf2, 0x94, 0x9b, 0xf4, 0x12, 0x14, 0x64, 0xba, 0xd1, 0x01, 0x4a, 0x49, 0xfa, 0x20, 0x94, 0x92, - 0x80, 0xbe, 0x0a, 0x05, 0x79, 0xc0, 0x59, 0x13, 0x8a, 0x64, 0x75, 0xba, 0xe7, 0xf1, 0x10, 0x26, - 0x55, 0xfd, 0x3f, 0x90, 0xc3, 0xe3, 0x8c, 0x77, 0x8f, 0x70, 0x3c, 0x1e, 0x09, 0xcb, 0x1b, 0x9b, - 0x9e, 0xa4, 0x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0xfe, 0x58, 0xa8, 0xab, 0xfa, 0xcb, 0x97, 0x04, 0x0c, 0x0a, 0x24, 0xd9, 0xf8, 0x33, 0x00, 0x00, - 0xff, 0xff, 0x12, 0x57, 0x5b, 0xf6, 0x19, 0x10, 0x00, 0x00, + // 1549 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x72, 0x1b, 0x45, + 0x10, 0x96, 0xac, 0xdf, 0x6d, 0xfd, 0x44, 0x4c, 0x7e, 0x4a, 0xb5, 0x89, 0xb1, 0xe3, 0x00, 0x65, + 0x0e, 0x28, 0x29, 0xbb, 0x92, 0x14, 0x29, 0x0a, 0xca, 0xb2, 0x94, 0xc8, 0x85, 0x9c, 0xd8, 0x6b, + 0x3b, 0x10, 0x0e, 0x6c, 0xad, 0x76, 0x27, 0xf2, 0x96, 0xf7, 0x47, 0xd9, 0x1d, 0x39, 0x76, 0x4e, + 0xdc, 0x38, 0x72, 0xa0, 0xe0, 0x21, 0x78, 0x01, 0xae, 0x3c, 0x05, 0x67, 0xce, 0x3c, 0x05, 0xd5, + 0x3d, 0xb3, 0x2b, 0xdb, 0x92, 0x6c, 0xdf, 0xb8, 0xcd, 0xf4, 0x7c, 0x5f, 0x4f, 0xcf, 0xf4, 0x37, + 0x3d, 0x33, 0x70, 0xdb, 0x73, 0x8f, 0xf9, 0x91, 0x2b, 0x4c, 0x6b, 0xc8, 0x03, 0xe1, 0x0c, 0x5a, + 0xa3, 0x28, 0x14, 0x21, 0x2b, 0x29, 0xf3, 0xca, 0x6f, 0x77, 0xa1, 0xb4, 0x81, 0x43, 0x9d, 0xb6, + 0xde, 0x83, 0xda, 0x66, 0xc4, 0x2d, 0xc1, 0x0d, 0xfe, 0x6e, 0xcc, 0x63, 0xc1, 0xee, 0x40, 0x31, + 0xe2, 0x43, 0x37, 0x0c, 0x9a, 0xd9, 0xe5, 0xec, 0xaa, 0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, + 0xfb, 0xbe, 0x15, 0x9d, 0x1a, 0x13, 0x28, 0xfb, 0x0c, 0x6e, 0x04, 0xfc, 0x44, 0x98, 0x53, 0x73, + 0xd5, 0xd0, 0xbc, 0x93, 0xce, 0xf7, 0x53, 0x16, 0x4a, 0x8a, 0xfe, 0x3f, 0xed, 0xa7, 0xfe, 0x08, + 0x6a, 0x1d, 0xee, 0xf1, 0x89, 0x42, 0xaf, 0x14, 0x42, 0x03, 0xea, 0x09, 0x43, 0x6e, 0x93, 0xde, + 0x82, 0x4a, 0x67, 0xec, 0x8f, 0xae, 0xed, 0x61, 0x00, 0x55, 0x89, 0x57, 0xdb, 0x7c, 0x1f, 0xaa, + 0x4e, 0xf8, 0x3e, 0xf0, 0x42, 0xcb, 0x31, 0xc7, 0x91, 0xa7, 0x18, 0x95, 0xc4, 0x76, 0x10, 0x79, + 0x57, 0x68, 0x39, 0x51, 0x45, 0x6e, 0xa2, 0x8a, 0x5f, 0x6e, 0x41, 0xfe, 0x3b, 0x37, 0xe2, 0xfa, + 0x3f, 0x79, 0xa8, 0x6d, 0x7a, 0x2e, 0x0f, 0xc4, 0x36, 0x8f, 0x63, 0x6b, 0x48, 0x22, 0x88, 0x64, + 0xa8, 0x49, 0x78, 0x35, 0x43, 0x53, 0x96, 0x2d, 0x87, 0xad, 0x43, 0xe1, 0x90, 0x7b, 0x5e, 0x48, + 0xb3, 0x54, 0xd6, 0xee, 0x4e, 0x25, 0x1c, 0xdd, 0xb6, 0x7a, 0x08, 0xe9, 0x65, 0x0c, 0x89, 0x65, + 0x8f, 0x21, 0xcf, 0x4f, 0xb8, 0x4d, 0x11, 0x54, 0xd6, 0x96, 0x66, 0x73, 0xf6, 0x84, 0x25, 0xb8, + 0xcf, 0x03, 0xd1, 0xcb, 0x18, 0x04, 0x67, 0x4f, 0xa1, 0xf0, 0x6e, 0xcc, 0xa3, 0x53, 0xca, 0xcb, + 0xb5, 0x78, 0x12, 0x8f, 0x41, 0x0e, 0x2c, 0x61,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92, 0xae, 0x2c, 0x1c, + 0x0b, 0x04, 0xe6, 0x08, 0x58, 0x1b, 0xa9, 0x35, 0x85, 0x63, 0xb1, 0x1d, 0xeb, 0x4b, 0x50, 0x52, + 0xb5, 0x05, 0x03, 0x0e, 0x2c, 0x5f, 0xbd, 0x8d, 0x34, 0x43, 0x76, 0xf4, 0xbf, 0xb2, 0x98, 0x1f, + 0x44, 0xd0, 0x8a, 0x4e, 0x47, 0x6a, 0xf7, 0xab, 0x86, 0xec, 0x30, 0x06, 0x79, 0x17, 0x35, 0x80, + 0xd2, 0x63, 0x06, 0xb5, 0x31, 0x53, 0xf2, 0x28, 0xe0, 0xac, 0xb9, 0xd5, 0xac, 0x91, 0x74, 0xf1, + 0x41, 0x47, 0xa7, 0x02, 0x57, 0x4c, 0x87, 0xa2, 0x6a, 0x94, 0xd1, 0xd0, 0xb1, 0x84, 0x95, 0x0e, + 0x72, 0x7c, 0x35, 0x17, 0x96, 0x73, 0xab, 0x35, 0x39, 0xd8, 0x0d, 0x1c, 0x62, 0xd2, 0x71, 0x21, + 0x66, 0x51, 0x32, 0xd1, 0x90, 0x30, 0x69, 0x90, 0x98, 0x25, 0xc9, 0x44, 0x03, 0x32, 0xf5, 0x37, + 0x50, 0x39, 0x53, 0xff, 0xd8, 0x93, 0x49, 0xcd, 0x95, 0xba, 0xbd, 0x77, 0x59, 0xcd, 0x9c, 0x14, + 0x5c, 0x06, 0xf9, 0x28, 0x7c, 0x9f, 0x6c, 0x38, 0xb5, 0x75, 0x17, 0x60, 0x52, 0x13, 0xd9, 0x03, + 0xa8, 0xa1, 0xd5, 0xb4, 0xde, 0xbe, 0xe5, 0xb6, 0xe0, 0x8e, 0x4a, 0x5d, 0x15, 0x8d, 0x1b, 0xca, + 0xc6, 0x3e, 0x81, 0x3a, 0x09, 0xcf, 0x0d, 0x62, 0x1e, 0x89, 0x44, 0x04, 0x39, 0xa3, 0x8a, 0xd6, + 0x2d, 0x32, 0x6e, 0x39, 0x33, 0xde, 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 0xcd, 0x1e, 0x54, 0x9e, 0xfa, 0x50, + 0xc3, 0xcf, 0x48, 0x27, 0xfd, 0x55, 0x4c, 0xc3, 0xcf, 0xfc, 0x7b, 0xf4, 0xc5, 0x39, 0xa3, 0xca, + 0xdb, 0x6e, 0xf2, 0x6a, 0xbf, 0x64, 0xa9, 0xe7, 0x3e, 0x02, 0x33, 0x96, 0x7a, 0xfe, 0xd9, 0xcf, + 0x36, 0x21, 0x8f, 0xcf, 0xf8, 0x19, 0x71, 0x9d, 0xf9, 0x0d, 0xcc, 0x88, 0xeb, 0xec, 0xdb, 0xbf, + 0xfd, 0xfc, 0x87, 0x07, 0x43, 0x57, 0x1c, 0x8e, 0x07, 0x2d, 0x3b, 0xf4, 0x1f, 0x2a, 0xe8, 0x43, + 0xfa, 0x52, 0xdb, 0xa1, 0x97, 0x18, 0xfe, 0x58, 0xa8, 0xf5, 0xdd, 0x63, 0xfe, 0xad, 0x2b, 0x5a, + 0x3b, 0x38, 0xf4, 0xef, 0x42, 0x5d, 0xf5, 0x9f, 0x3d, 0x23, 0xc3, 0xa0, 0x48, 0x94, 0xf5, 0xff, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x51, 0x89, 0xe7, 0x62, 0x9e, 0x0f, 0x00, 0x00, } diff --git a/protobufs/livekit_agentdb.proto b/protobufs/livekit_agentdb.proto index d961c6c23..81838cb61 100644 --- a/protobufs/livekit_agentdb.proto +++ b/protobufs/livekit_agentdb.proto @@ -38,10 +38,9 @@ service AgentDBService { message AgentDB { message CreateRequest { string region = 1; - string user_attributes = 2; // opaque JSON metadata for the caller // Unset: never expires, and expires_at is then 0 everywhere. // Otherwise clamped to the server cap, and never extended. - int64 ttl_seconds = 3; + int64 ttl_seconds = 2; } message CreateResponse { @@ -56,10 +55,9 @@ message AgentDB { message GetResponse { string database_id = 1; string region = 2; - string user_attributes = 3; - int64 created_at = 4; - int64 expires_at = 5; - int64 tip = 6; + int64 created_at = 3; + int64 expires_at = 4; + int64 tip = 5; } message ListRequest { @@ -76,9 +74,8 @@ message AgentDB { message Summary { string database_id = 1; string region = 2; - string user_attributes = 3; - int64 created_at = 4; - int64 expires_at = 5; + int64 created_at = 3; + int64 expires_at = 4; } message DeleteRequest { From d5c573fe3869244c0ad5e8e69dd33b101ef451d6 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 21:49:26 +0000 Subject: [PATCH 20/24] generated protobuf --- livekit/livekit_agentdb.pb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livekit/livekit_agentdb.pb.go b/livekit/livekit_agentdb.pb.go index b35e0a47d..459b66e3c 100644 --- a/livekit/livekit_agentdb.pb.go +++ b/livekit/livekit_agentdb.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v7.35.1 // source: livekit_agentdb.proto package livekit From 0a1275d84273f5fa81b44587cf2b4d2ea01151a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Wed, 5 Aug 2026 15:45:22 -0700 Subject: [PATCH 21/24] agentdb: consistent RPC and enum naming Four RPCs were Database and one was a bare Dump; it is DumpDatabase now. Nested enums drop their redundant prefixes, since the container already namespaces them: DataStream.OperationType is CREATE, not OPERATION_TYPE_CREATE, so ValueType is NULL through BLOB and QueryLang is SQL. Generated names are AgentDB_Wire_NULL and AgentDB_Wire_SQL. --- livekit/livekit_agentdb.pb.go | 69 ++++----- livekit/livekit_agentdb.twirp.go | 251 +++++++++++++++---------------- protobufs/livekit_agentdb.proto | 14 +- 3 files changed, 167 insertions(+), 167 deletions(-) diff --git a/livekit/livekit_agentdb.pb.go b/livekit/livekit_agentdb.pb.go index 459b66e3c..695e192e1 100644 --- a/livekit/livekit_agentdb.pb.go +++ b/livekit/livekit_agentdb.pb.go @@ -38,16 +38,16 @@ const ( type AgentDB_Wire_QueryLang int32 const ( - AgentDB_Wire_QUERY_LANG_SQL AgentDB_Wire_QueryLang = 0 + AgentDB_Wire_SQL AgentDB_Wire_QueryLang = 0 ) // Enum value maps for AgentDB_Wire_QueryLang. var ( AgentDB_Wire_QueryLang_name = map[int32]string{ - 0: "QUERY_LANG_SQL", + 0: "SQL", } AgentDB_Wire_QueryLang_value = map[string]int32{ - "QUERY_LANG_SQL": 0, + "SQL": 0, } ) @@ -81,28 +81,28 @@ func (AgentDB_Wire_QueryLang) EnumDescriptor() ([]byte, []int) { type AgentDB_Wire_ValueType int32 const ( - AgentDB_Wire_VALUE_TYPE_NULL AgentDB_Wire_ValueType = 0 - AgentDB_Wire_VALUE_TYPE_INT AgentDB_Wire_ValueType = 1 - AgentDB_Wire_VALUE_TYPE_DOUBLE AgentDB_Wire_ValueType = 2 - AgentDB_Wire_VALUE_TYPE_TEXT AgentDB_Wire_ValueType = 3 - AgentDB_Wire_VALUE_TYPE_BLOB AgentDB_Wire_ValueType = 4 + AgentDB_Wire_NULL AgentDB_Wire_ValueType = 0 + AgentDB_Wire_INT AgentDB_Wire_ValueType = 1 + AgentDB_Wire_DOUBLE AgentDB_Wire_ValueType = 2 + AgentDB_Wire_TEXT AgentDB_Wire_ValueType = 3 + AgentDB_Wire_BLOB AgentDB_Wire_ValueType = 4 ) // Enum value maps for AgentDB_Wire_ValueType. var ( AgentDB_Wire_ValueType_name = map[int32]string{ - 0: "VALUE_TYPE_NULL", - 1: "VALUE_TYPE_INT", - 2: "VALUE_TYPE_DOUBLE", - 3: "VALUE_TYPE_TEXT", - 4: "VALUE_TYPE_BLOB", + 0: "NULL", + 1: "INT", + 2: "DOUBLE", + 3: "TEXT", + 4: "BLOB", } AgentDB_Wire_ValueType_value = map[string]int32{ - "VALUE_TYPE_NULL": 0, - "VALUE_TYPE_INT": 1, - "VALUE_TYPE_DOUBLE": 2, - "VALUE_TYPE_TEXT": 3, - "VALUE_TYPE_BLOB": 4, + "NULL": 0, + "INT": 1, + "DOUBLE": 2, + "TEXT": 3, + "BLOB": 4, } ) @@ -1369,7 +1369,7 @@ func (x *AgentDB_Wire_Statement) GetLang() AgentDB_Wire_QueryLang { if x != nil { return x.Lang } - return AgentDB_Wire_QUERY_LANG_SQL + return AgentDB_Wire_SQL } type AgentDB_Wire_Batch struct { @@ -2173,7 +2173,7 @@ var File_livekit_agentdb_proto protoreflect.FileDescriptor const file_livekit_agentdb_proto_rawDesc = "" + "\n" + - "\x15livekit_agentdb.proto\x12\alivekit\"\x95\x1b\n" + + "\x15livekit_agentdb.proto\x12\alivekit\"\xd3\x1a\n" + "\aAgentDB\x1aH\n" + "\rCreateRequest\x12\x16\n" + "\x06region\x18\x01 \x01(\tR\x06region\x12\x1f\n" + @@ -2223,7 +2223,7 @@ const file_livekit_agentdb_proto_rawDesc = "" + "\fdownload_url\x18\x01 \x01(\tR\vdownloadUrl\x12\x1d\n" + "\n" + "expires_at\x18\x02 \x01(\x03R\texpiresAt\x12\x10\n" + - "\x03tip\x18\x03 \x01(\x03R\x03tip\x1a\x8f\x14\n" + + "\x03tip\x18\x03 \x01(\x03R\x03tip\x1a\xcd\x13\n" + "\x04Wire\x1a\xe0\x04\n" + "\rClientMessage\x12\x1d\n" + "\n" + @@ -2314,21 +2314,22 @@ const file_livekit_agentdb_proto_rawDesc = "" + "total_rows\x18\x02 \x01(\x04R\ttotalRows\x1a5\n" + "\x05Error\x12\x12\n" + "\x04code\x18\x01 \x01(\tR\x04code\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage\"%\n" + - "\tQueryLang\x12\x12\n" + - "\x0eQUERY_LANG_SQL\x10\x00\"\x04\b\x01\x10\x01\"u\n" + - "\tValueType\x12\x13\n" + - "\x0fVALUE_TYPE_NULL\x10\x00\x12\x12\n" + - "\x0eVALUE_TYPE_INT\x10\x01\x12\x15\n" + - "\x11VALUE_TYPE_DOUBLE\x10\x02\x12\x13\n" + - "\x0fVALUE_TYPE_TEXT\x10\x03\x12\x13\n" + - "\x0fVALUE_TYPE_BLOB\x10\x042\x93\x03\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"\x1a\n" + + "\tQueryLang\x12\a\n" + + "\x03SQL\x10\x00\"\x04\b\x01\x10\x01\">\n" + + "\tValueType\x12\b\n" + + "\x04NULL\x10\x00\x12\a\n" + + "\x03INT\x10\x01\x12\n" + + "\n" + + "\x06DOUBLE\x10\x02\x12\b\n" + + "\x04TEXT\x10\x03\x12\b\n" + + "\x04BLOB\x10\x042\x9b\x03\n" + "\x0eAgentDBService\x12Q\n" + "\x0eCreateDatabase\x12\x1e.livekit.AgentDB.CreateRequest\x1a\x1f.livekit.AgentDB.CreateResponse\x12H\n" + "\vGetDatabase\x12\x1b.livekit.AgentDB.GetRequest\x1a\x1c.livekit.AgentDB.GetResponse\x12L\n" + "\rListDatabases\x12\x1c.livekit.AgentDB.ListRequest\x1a\x1d.livekit.AgentDB.ListResponse\x12Q\n" + - "\x0eDeleteDatabase\x12\x1e.livekit.AgentDB.DeleteRequest\x1a\x1f.livekit.AgentDB.DeleteResponse\x12C\n" + - "\x04Dump\x12\x1c.livekit.AgentDB.DumpRequest\x1a\x1d.livekit.AgentDB.DumpResponseBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" + "\x0eDeleteDatabase\x12\x1e.livekit.AgentDB.DeleteRequest\x1a\x1f.livekit.AgentDB.DeleteResponse\x12K\n" + + "\fDumpDatabase\x12\x1c.livekit.AgentDB.DumpRequest\x1a\x1d.livekit.AgentDB.DumpResponseBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" var ( file_livekit_agentdb_proto_rawDescOnce sync.Once @@ -2408,12 +2409,12 @@ var file_livekit_agentdb_proto_depIdxs = []int32{ 5, // 23: livekit.AgentDBService.GetDatabase:input_type -> livekit.AgentDB.GetRequest 7, // 24: livekit.AgentDBService.ListDatabases:input_type -> livekit.AgentDB.ListRequest 10, // 25: livekit.AgentDBService.DeleteDatabase:input_type -> livekit.AgentDB.DeleteRequest - 12, // 26: livekit.AgentDBService.Dump:input_type -> livekit.AgentDB.DumpRequest + 12, // 26: livekit.AgentDBService.DumpDatabase:input_type -> livekit.AgentDB.DumpRequest 4, // 27: livekit.AgentDBService.CreateDatabase:output_type -> livekit.AgentDB.CreateResponse 6, // 28: livekit.AgentDBService.GetDatabase:output_type -> livekit.AgentDB.GetResponse 8, // 29: livekit.AgentDBService.ListDatabases:output_type -> livekit.AgentDB.ListResponse 11, // 30: livekit.AgentDBService.DeleteDatabase:output_type -> livekit.AgentDB.DeleteResponse - 13, // 31: livekit.AgentDBService.Dump:output_type -> livekit.AgentDB.DumpResponse + 13, // 31: livekit.AgentDBService.DumpDatabase:output_type -> livekit.AgentDB.DumpResponse 27, // [27:32] is the sub-list for method output_type 22, // [22:27] is the sub-list for method input_type 22, // [22:22] is the sub-list for extension type_name diff --git a/livekit/livekit_agentdb.twirp.go b/livekit/livekit_agentdb.twirp.go index 31655599e..1d76e8fd4 100644 --- a/livekit/livekit_agentdb.twirp.go +++ b/livekit/livekit_agentdb.twirp.go @@ -39,7 +39,7 @@ type AgentDBService interface { DeleteDatabase(context.Context, *AgentDB_DeleteRequest) (*AgentDB_DeleteResponse, error) // Exports a consistent SQLite file as a time-limited download URL. - Dump(context.Context, *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) + DumpDatabase(context.Context, *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) } // ============================== @@ -81,7 +81,7 @@ func NewAgentDBServiceProtobufClient(baseURL string, client HTTPClient, opts ... serviceURL + "GetDatabase", serviceURL + "ListDatabases", serviceURL + "DeleteDatabase", - serviceURL + "Dump", + serviceURL + "DumpDatabase", } return &agentDBServiceProtobufClient{ @@ -276,11 +276,11 @@ func (c *agentDBServiceProtobufClient) callDeleteDatabase(ctx context.Context, i return out, nil } -func (c *agentDBServiceProtobufClient) Dump(ctx context.Context, in *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { +func (c *agentDBServiceProtobufClient) DumpDatabase(ctx context.Context, in *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") - ctx = ctxsetters.WithMethodName(ctx, "Dump") - caller := c.callDump + ctx = ctxsetters.WithMethodName(ctx, "DumpDatabase") + caller := c.callDumpDatabase if c.interceptor != nil { caller = func(ctx context.Context, req *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { resp, err := c.interceptor( @@ -289,7 +289,7 @@ func (c *agentDBServiceProtobufClient) Dump(ctx context.Context, in *AgentDB_Dum if !ok { return nil, twirp.InternalError("failed type assertion req.(*AgentDB_DumpRequest) when calling interceptor") } - return c.callDump(ctx, typedReq) + return c.callDumpDatabase(ctx, typedReq) }, )(ctx, req) if resp != nil { @@ -305,7 +305,7 @@ func (c *agentDBServiceProtobufClient) Dump(ctx context.Context, in *AgentDB_Dum return caller(ctx, in) } -func (c *agentDBServiceProtobufClient) callDump(ctx context.Context, in *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { +func (c *agentDBServiceProtobufClient) callDumpDatabase(ctx context.Context, in *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { out := new(AgentDB_DumpResponse) ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) if err != nil { @@ -361,7 +361,7 @@ func NewAgentDBServiceJSONClient(baseURL string, client HTTPClient, opts ...twir serviceURL + "GetDatabase", serviceURL + "ListDatabases", serviceURL + "DeleteDatabase", - serviceURL + "Dump", + serviceURL + "DumpDatabase", } return &agentDBServiceJSONClient{ @@ -556,11 +556,11 @@ func (c *agentDBServiceJSONClient) callDeleteDatabase(ctx context.Context, in *A return out, nil } -func (c *agentDBServiceJSONClient) Dump(ctx context.Context, in *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { +func (c *agentDBServiceJSONClient) DumpDatabase(ctx context.Context, in *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") - ctx = ctxsetters.WithMethodName(ctx, "Dump") - caller := c.callDump + ctx = ctxsetters.WithMethodName(ctx, "DumpDatabase") + caller := c.callDumpDatabase if c.interceptor != nil { caller = func(ctx context.Context, req *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { resp, err := c.interceptor( @@ -569,7 +569,7 @@ func (c *agentDBServiceJSONClient) Dump(ctx context.Context, in *AgentDB_DumpReq if !ok { return nil, twirp.InternalError("failed type assertion req.(*AgentDB_DumpRequest) when calling interceptor") } - return c.callDump(ctx, typedReq) + return c.callDumpDatabase(ctx, typedReq) }, )(ctx, req) if resp != nil { @@ -585,7 +585,7 @@ func (c *agentDBServiceJSONClient) Dump(ctx context.Context, in *AgentDB_DumpReq return caller(ctx, in) } -func (c *agentDBServiceJSONClient) callDump(ctx context.Context, in *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { +func (c *agentDBServiceJSONClient) callDumpDatabase(ctx context.Context, in *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { out := new(AgentDB_DumpResponse) ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) if err != nil { @@ -711,8 +711,8 @@ func (s *agentDBServiceServer) ServeHTTP(resp http.ResponseWriter, req *http.Req case "DeleteDatabase": s.serveDeleteDatabase(ctx, resp, req) return - case "Dump": - s.serveDump(ctx, resp, req) + case "DumpDatabase": + s.serveDumpDatabase(ctx, resp, req) return default: msg := fmt.Sprintf("no handler for path %q", req.URL.Path) @@ -1441,7 +1441,7 @@ func (s *agentDBServiceServer) serveDeleteDatabaseProtobuf(ctx context.Context, callResponseSent(ctx, s.hooks) } -func (s *agentDBServiceServer) serveDump(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *agentDBServiceServer) serveDumpDatabase(ctx context.Context, resp http.ResponseWriter, req *http.Request) { header := req.Header.Get("Content-Type") i := strings.Index(header, ";") if i == -1 { @@ -1449,9 +1449,9 @@ func (s *agentDBServiceServer) serveDump(ctx context.Context, resp http.Response } switch strings.TrimSpace(strings.ToLower(header[:i])) { case "application/json": - s.serveDumpJSON(ctx, resp, req) + s.serveDumpDatabaseJSON(ctx, resp, req) case "application/protobuf": - s.serveDumpProtobuf(ctx, resp, req) + s.serveDumpDatabaseProtobuf(ctx, resp, req) default: msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) twerr := badRouteError(msg, req.Method, req.URL.Path) @@ -1459,9 +1459,9 @@ func (s *agentDBServiceServer) serveDump(ctx context.Context, resp http.Response } } -func (s *agentDBServiceServer) serveDumpJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *agentDBServiceServer) serveDumpDatabaseJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { var err error - ctx = ctxsetters.WithMethodName(ctx, "Dump") + ctx = ctxsetters.WithMethodName(ctx, "DumpDatabase") ctx, err = callRequestRouted(ctx, s.hooks) if err != nil { s.writeError(ctx, resp, err) @@ -1481,7 +1481,7 @@ func (s *agentDBServiceServer) serveDumpJSON(ctx context.Context, resp http.Resp return } - handler := s.AgentDBService.Dump + handler := s.AgentDBService.DumpDatabase if s.interceptor != nil { handler = func(ctx context.Context, req *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { resp, err := s.interceptor( @@ -1490,7 +1490,7 @@ func (s *agentDBServiceServer) serveDumpJSON(ctx context.Context, resp http.Resp if !ok { return nil, twirp.InternalError("failed type assertion req.(*AgentDB_DumpRequest) when calling interceptor") } - return s.AgentDBService.Dump(ctx, typedReq) + return s.AgentDBService.DumpDatabase(ctx, typedReq) }, )(ctx, req) if resp != nil { @@ -1516,7 +1516,7 @@ func (s *agentDBServiceServer) serveDumpJSON(ctx context.Context, resp http.Resp return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_DumpResponse and nil error while calling Dump. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_DumpResponse and nil error while calling DumpDatabase. nil responses are not supported")) return } @@ -1542,9 +1542,9 @@ func (s *agentDBServiceServer) serveDumpJSON(ctx context.Context, resp http.Resp callResponseSent(ctx, s.hooks) } -func (s *agentDBServiceServer) serveDumpProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *agentDBServiceServer) serveDumpDatabaseProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { var err error - ctx = ctxsetters.WithMethodName(ctx, "Dump") + ctx = ctxsetters.WithMethodName(ctx, "DumpDatabase") ctx, err = callRequestRouted(ctx, s.hooks) if err != nil { s.writeError(ctx, resp, err) @@ -1562,7 +1562,7 @@ func (s *agentDBServiceServer) serveDumpProtobuf(ctx context.Context, resp http. return } - handler := s.AgentDBService.Dump + handler := s.AgentDBService.DumpDatabase if s.interceptor != nil { handler = func(ctx context.Context, req *AgentDB_DumpRequest) (*AgentDB_DumpResponse, error) { resp, err := s.interceptor( @@ -1571,7 +1571,7 @@ func (s *agentDBServiceServer) serveDumpProtobuf(ctx context.Context, resp http. if !ok { return nil, twirp.InternalError("failed type assertion req.(*AgentDB_DumpRequest) when calling interceptor") } - return s.AgentDBService.Dump(ctx, typedReq) + return s.AgentDBService.DumpDatabase(ctx, typedReq) }, )(ctx, req) if resp != nil { @@ -1597,7 +1597,7 @@ func (s *agentDBServiceServer) serveDumpProtobuf(ctx context.Context, resp http. return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_DumpResponse and nil error while calling Dump. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_DumpResponse and nil error while calling DumpDatabase. nil responses are not supported")) return } @@ -1637,102 +1637,101 @@ func (s *agentDBServiceServer) PathPrefix() string { } var twirpFileDescriptor2 = []byte{ - // 1549 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0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 0xf1, 0x89, 0x42, 0xaf, 0x14, 0x42, 0x03, 0xea, 0x09, 0x43, 0x6e, 0x93, 0xde, - 0x82, 0x4a, 0x67, 0xec, 0x8f, 0xae, 0xed, 0x61, 0x00, 0x55, 0x89, 0x57, 0xdb, 0x7c, 0x1f, 0xaa, - 0x4e, 0xf8, 0x3e, 0xf0, 0x42, 0xcb, 0x31, 0xc7, 0x91, 0xa7, 0x18, 0x95, 0xc4, 0x76, 0x10, 0x79, - 0x57, 0x68, 0x39, 0x51, 0x45, 0x6e, 0xa2, 0x8a, 0x5f, 0x6e, 0x41, 0xfe, 0x3b, 0x37, 0xe2, 0xfa, - 0x3f, 0x79, 0xa8, 0x6d, 0x7a, 0x2e, 0x0f, 0xc4, 0x36, 0x8f, 0x63, 0x6b, 0x48, 0x22, 0x88, 0x64, - 0xa8, 0x49, 0x78, 0x35, 0x43, 0x53, 0x96, 0x2d, 0x87, 0xad, 0x43, 0xe1, 0x90, 0x7b, 0x5e, 0x48, - 0xb3, 0x54, 0xd6, 0xee, 0x4e, 0x25, 0x1c, 0xdd, 0xb6, 0x7a, 0x08, 0xe9, 0x65, 0x0c, 0x89, 0x65, - 0x8f, 0x21, 0xcf, 0x4f, 0xb8, 0x4d, 0x11, 0x54, 0xd6, 0x96, 0x66, 0x73, 0xf6, 0x84, 0x25, 0xb8, - 0xcf, 0x03, 0xd1, 0xcb, 0x18, 0x04, 0x67, 0x4f, 0xa1, 0xf0, 0x6e, 0xcc, 0xa3, 0x53, 0xca, 0xcb, - 0xb5, 0x78, 0x12, 0x8f, 0x41, 0x0e, 0x2c, 0x61, 0x1f, 0xd2, 0x41, 0x98, 0x1b, 0x64, 0x1b, 0x21, - 0x48, 0x22, 0x2c, 0x91, 0xf8, 0xd0, 0x0d, 0x9a, 0xc5, 0x4b, 0x49, 0x08, 0x21, 0x12, 0x36, 0xd8, - 0x13, 0x28, 0xda, 0xa1, 0xef, 0xbb, 0xa2, 0x59, 0x22, 0xd6, 0xbd, 0xd9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, 0x1d, 0xef, 0x84, 0x01, 0xc7, 0x1d, 0x47, 0x24, 0xca, 0x97, 0x47, 0x51, 0x18, 0x29, - 0x21, 0xce, 0x91, 0x6f, 0x17, 0x21, 0x28, 0x5f, 0xc2, 0x52, 0x62, 0xc3, 0x60, 0xa8, 0x24, 0x38, - 0x2f, 0xb1, 0xa1, 0x4a, 0x6c, 0x78, 0x3e, 0xb1, 0x7f, 0x66, 0xa1, 0xf0, 0xda, 0xf2, 0xc6, 0x78, - 0xdb, 0x41, 0x30, 0xf6, 0x3c, 0xf3, 0x18, 0x7b, 0x94, 0xd0, 0x72, 0x2f, 0x63, 0x68, 0x68, 0x93, - 0x80, 0x45, 0xd0, 0xdc, 0x40, 0xa8, 0x71, 0xaa, 0x4f, 0xa8, 0x67, 0x37, 0x10, 0x72, 0xf8, 0x01, - 0x96, 0xb8, 0xf1, 0xc0, 0xe3, 0x0a, 0x81, 0xa9, 0xcb, 0xe2, 0xbe, 0x4a, 0x6b, 0x3a, 0x89, 0xc0, - 0x6b, 0x43, 0x42, 0x30, 0x3b, 0x1a, 0x4e, 0x82, 0xb6, 0x14, 0x30, 0xf0, 0xc2, 0x81, 0x02, 0xe0, - 0xbe, 0x57, 0x11, 0x80, 0x36, 0x02, 0xb4, 0x4b, 0x50, 0xa0, 0x31, 0xfd, 0xe7, 0x2c, 0x68, 0x69, - 0xd9, 0xc0, 0xf2, 0x18, 0xbf, 0x4b, 0xea, 0x2a, 0x36, 0xd9, 0x3a, 0x14, 0x47, 0x56, 0x64, 0xf9, - 0xf8, 0xd4, 0xc8, 0xcd, 0xdf, 0x4c, 0xf2, 0x6a, 0x28, 0x28, 0x5b, 0x87, 0xbc, 0x67, 0x05, 0x43, - 0x0a, 0xbe, 0x3e, 0xaf, 0x58, 0xed, 0x62, 0x7d, 0xea, 0x5b, 0xc1, 0xd0, 0x20, 0xb0, 0xde, 0x83, - 0x82, 0x54, 0xcd, 0x37, 0x00, 0x71, 0x12, 0x51, 0x72, 0x9b,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- 0x44, 0xd0, 0x8a, 0x4e, 0x47, 0x6a, 0xf7, 0xab, 0x86, 0xec, 0x30, 0x06, 0x79, 0x17, 0x35, 0x80, - 0xd2, 0x63, 0x06, 0xb5, 0x31, 0x53, 0xf2, 0x28, 0xe0, 0xac, 0xb9, 0xd5, 0xac, 0x91, 0x74, 0xf1, - 0x41, 0x47, 0xa7, 0x02, 0x57, 0x4c, 0x87, 0xa2, 0x6a, 0x94, 0xd1, 0xd0, 0xb1, 0x84, 0x95, 0x0e, - 0x72, 0x7c, 0x35, 0x17, 0x96, 0x73, 0xab, 0x35, 0x39, 0xd8, 0x0d, 0x1c, 0x62, 0xd2, 0x71, 0x21, - 0x66, 0x51, 0x32, 0xd1, 0x90, 0x30, 0x69, 0x90, 0x98, 0x25, 0xc9, 0x44, 0x03, 0x32, 0xf5, 0x37, - 0x50, 0x39, 0x53, 0xff, 0xd8, 0x93, 0x49, 0xcd, 0x95, 0xba, 0xbd, 0x77, 0x59, 0xcd, 0x9c, 0x14, - 0x5c, 0x06, 0xf9, 0x28, 0x7c, 0x9f, 0x6c, 0x38, 0xb5, 0x75, 0x17, 0x60, 0x52, 0x13, 0xd9, 0x03, - 0xa8, 0xa1, 0xd5, 0xb4, 0xde, 0xbe, 0xe5, 0xb6, 0xe0, 0x8e, 0x4a, 0x5d, 0x15, 0x8d, 0x1b, 0xca, - 0xc6, 0x3e, 0x81, 0x3a, 0x09, 0xcf, 0x0d, 0x62, 0x1e, 0x89, 0x44, 0x04, 0x39, 0xa3, 0x8a, 0xd6, - 0x2d, 0x32, 0x6e, 0x39, 0x33, 0xde, 0x40, 0x4f, 0x21, 0x8f, 0x05, 0x74, 0x86, 0x2a, 0x16, 0x01, - 0x44, 0x28, 0x2c, 0xcf, 0x4c, 0xc3, 0xcb, 0x1b, 0x1a, 0x59, 0x0c, 0x8c, 0xf1, 0x31, 0x14, 0xa8, - 0x8c, 0xe2, 0x02, 0xec, 0xd0, 0xe1, 0x4a, 0x90, 0xd4, 0x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a, 0xfe, 0xd9, 0xcf, - 0x36, 0x21, 0x8f, 0xcf, 0xf8, 0x19, 0x71, 0x9d, 0xf9, 0x0d, 0xcc, 0x88, 0xeb, 0xec, 0xdb, 0xbf, - 0xfd, 0xfc, 0x87, 0x07, 0x43, 0x57, 0x1c, 0x8e, 0x07, 0x2d, 0x3b, 0xf4, 0x1f, 0x2a, 0xe8, 0x43, - 0xfa, 0x52, 0xdb, 0xa1, 0x97, 0x18, 0xfe, 0x58, 0xa8, 0xf5, 0xdd, 0x63, 0xfe, 0xad, 0x2b, 0x5a, - 0x3b, 0x38, 0xf4, 0xef, 0x42, 0x5d, 0xf5, 0x9f, 0x3d, 0x23, 0xc3, 0xa0, 0x48, 0x94, 0xf5, 0xff, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x51, 0x89, 0xe7, 0x62, 0x9e, 0x0f, 0x00, 0x00, + // 1527 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x6e, 0x1b, 0x47, + 0x12, 0xe6, 0x68, 0x86, 0x3f, 0x53, 0x24, 0xb5, 0x44, 0x7b, 0xd7, 0x20, 0xc6, 0xd6, 0x4a, 0x96, + 0x17, 0x0b, 0xed, 0x61, 0x69, 0x43, 0x82, 0x6d, 0xac, 0xb1, 0xf0, 0x42, 0x14, 0xe5, 0xa5, 0x60, + 0xca, 0x96, 0x46, 0x72, 0xfe, 0x0e, 0x19, 0x0c, 0x67, 0xda, 0xd4, 0x40, 0xf3, 0x43, 0xcf, 0x34, + 0x65, 0xc9, 0xa7, 0xdc, 0xf2, 0x06, 0xb9, 0xe4, 0x0d, 0xf2, 0x02, 0xb9, 0xe6, 0x05, 0x72, 0x0a, + 0x90, 0x73, 0xce, 0x79, 0x8a, 0xa0, 0xaa, 0x7b, 0x86, 0x92, 0x49, 0x4a, 0xba, 0xe5, 0xd6, 0x5d, + 0xfd, 0x7d, 0xd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, 0x5b, + 0x50, 0x3e, 0xe1, 0x61, 0x98, 0xd0, 0x2c, 0xf5, 0xcd, 0x7b, 0x33, 0x09, 0x47, 0xb7, 0x9d, 0x3e, + 0x42, 0xfa, 0x25, 0x5b, 0x62, 0xd9, 0x13, 0x30, 0xf8, 0x39, 0xf7, 0x28, 0x82, 0xfa, 0xe6, 0xea, + 0x7c, 0xce, 0x91, 0x70, 0x05, 0x8f, 0x78, 0x2c, 0xfa, 0x25, 0x9b, 0xe0, 0xec, 0x19, 0x94, 0xdf, + 0x4f, 0x78, 0x7a, 0x41, 0x79, 0xb9, 0x15, 0x4f, 0xe2, 0x31, 0xc8, 0xa1, 0x2b, 0xbc, 0x13, 0x3a, + 0x08, 0x0b, 0x83, 0xec, 0x22, 0x04, 0x49, 0x84, 0x25, 0x12, 0x1f, 0x05, 0x71, 0xbb, 0x72, 0x2d, + 0x09, 0x21, 0x44, 0xc2, 0x06, 0x7b, 0x0a, 0x15, 0x2f, 0x89, 0xa2, 0x40, 0xb4, 0xab, 0xc4, 0xba, + 0x3f, 0x9f, 0xb5, 0x43, 0x98, 0x7e, 0xc9, 0x56, 0x68, 0xf6, 0x5f, 0xa8, 0xa5, 0x49, 0x18, 0x0e, + 0x5d, 0xef, 0xb4, 0x5d, 0x23, 0xe6, 0xdf, 0xe7, 0x33, 0x6d, 0x85, 0xea, 0x97, 0xec, 0x82, 0x41, + 0xb3, 0xba, 0xb1, 0xc7, 0xc3, 0xb6, 0x79, 0xed, 0xac, 0x84, 0xa1, 0x59, 0xa9, 0x45, 0xbc, 0x94, + 0xfb, 0x81, 0x68, 0xc3, 0xb5, 0x3c, 0xc2, 0x10, 0x8f, 0x5a, 0xec, 0x31, 0x18, 0xe3, 0x20, 0x1e, + 0xb5, 0xeb, 0xc4, 0xb2, 0xe6, 0xb3, 0x0e, 0x82, 0x78, 0x84, 0xa9, 0x43, 0x64, 0xd7, 0x84, 0x6a, + 0x24, 0x05, 0x65, 0xfd, 0xaa, 0x43, 0xf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9, 0xd3, 0x70, + 0x5f, 0xa5, 0xb5, 0x98, 0x44, 0xe0, 0xb5, 0x21, 0x21, 0x98, 0x1d, 0x13, 0x27, 0x41, 0x5b, 0x01, + 0x18, 0x86, 0xc9, 0x50, 0x01, 0x70, 0xdf, 0x1b, 0x08, 0x40, 0x1b, 0x01, 0xba, 0x55, 0x28, 0xd3, + 0x98, 0xf5, 0xad, 0x06, 0x66, 0x51, 0x36, 0xb0, 0x3c, 0x66, 0xef, 0xf3, 0xba, 0x8a, 0x4d, 0xb6, + 0x05, 0x95, 0xb1, 0x9b, 0xba, 0x11, 0x3e, 0x35, 0xf4, 0xc5, 0x9b, 0x49, 0x5e, 0x6d, 0x05, 0x65, + 0x5b, 0x60, 0x84, 0x6e, 0x3c, 0xa2, 0xe0, 0x97, 0x17, 0x15, 0xab, 0x43, 0xac, 0x4f, 0x03, 0x37, + 0x1e, 0xd9, 0x04, 0xb6, 0xfa, 0x50, 0x96, 0xaa, 0xf9, 0x1f, 0x40, 0x96, 0x47, 0x94, 0xdf, 0xa6, + 0x37, 0x15, 0x3c, 0xfb, 0x12, 0xc5, 0xaa, 0x42, 0x99, 0x6a, 0x93, 0x55, 0x83, 0x8a, 0x2c, 0x37, + 0x16, 0x40, 0x2d, 0x2f, 0x1f, 0x64, 0xa5, 0x22, 0x60, 0xad, 0x43, 0x45, 0x1e, 0x70, 0xd6, 0x86, + 0x2a, 0x49, 0x9d, 0xae, 0x6f, 0x3c, 0x84, 0x79, 0xd7, 0xfa, 0x17, 0x18, 0x78, 0x9c, 0xf1, 0xee, + 0x11, 0x41, 0xc4, 0x33, 0xe1, 0x46, 0x63, 0x27, 0x92, 0x30, 0xdd, 0xae, 0x17, 0xb6, 0xfd, 0xcc, + 0xfa, 0x1a, 0x0c, 0x14, 0x08, 0xdb, 0x82, 0xbb, 0xa1, 0x9b, 0x09, 0x07, 0x8f, 0xbf, 0x33, 0x87, + 0x74, 0x07, 0x47, 0xd1, 0xe9, 0xf1, 0x94, 0x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 0x76, 0x98, 0x7f, 0x89, 0x7a, 0xea, 0x2c, 0xb0, 0xd9, 0x17, 0xc6, 0x95, 0xdf, + 0x97, 0xb5, 0xba, 0x70, 0x5c, 0xbd, 0x44, 0xfb, 0xf4, 0xc7, 0x29, 0xfc, 0xcd, 0x56, 0xc5, 0xe9, + 0x8f, 0xc9, 0xba, 0x3f, 0x7f, 0x50, 0x79, 0x1a, 0x40, 0x13, 0xbf, 0x12, 0xbd, 0xe2, 0x4f, 0x30, + 0x0b, 0xbf, 0xf4, 0x6b, 0xb1, 0x56, 0x16, 0x8c, 0x2a, 0x6f, 0x87, 0xf9, 0x9b, 0xfb, 0x9a, 0xa5, + 0x5e, 0x79, 0xc6, 0xcf, 0x59, 0xea, 0xd5, 0x47, 0x3b, 0x7b, 0x25, 0x1f, 0xe1, 0x85, 0xc3, 0xd9, + 0xf8, 0x2e, 0xbd, 0xe9, 0xe7, 0xc4, 0x77, 0xf9, 0x05, 0xdf, 0x7d, 0xf9, 0xd5, 0xc3, 0x51, 0x20, + 0x4e, 0x26, 0xc3, 0x8e, 0x97, 0x44, 0x8f, 0x14, 0xf4, 0x11, 0x7d, 0x8c, 0xbd, 0x24, 0xcc, 0x0d, + 0x3f, 0x2c, 0x35, 0x07, 0xc1, 0x19, 0x7f, 0x15, 0x88, 0xce, 0x01, 0x0e, 0xfd, 0xbe, 0xb4, 0xac, + 0xfa, 0xcf, 0x9f, 0x93, 0x61, 0x58, 0x21, 0xca, 0xd6, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe7, + 0x6e, 0x8e, 0x83, 0x64, 0x0f, 0x00, 0x00, } diff --git a/protobufs/livekit_agentdb.proto b/protobufs/livekit_agentdb.proto index 81838cb61..6561eedb1 100644 --- a/protobufs/livekit_agentdb.proto +++ b/protobufs/livekit_agentdb.proto @@ -30,7 +30,7 @@ service AgentDBService { // Deletes the stored data, not just the metadata. rpc DeleteDatabase(AgentDB.DeleteRequest) returns (AgentDB.DeleteResponse); // Exports a consistent SQLite file as a time-limited download URL. - rpc Dump(AgentDB.DumpRequest) returns (AgentDB.DumpResponse); + rpc DumpDatabase(AgentDB.DumpRequest) returns (AgentDB.DumpResponse); } // Nested so that names like Value and Ping need not be unique across the @@ -128,7 +128,7 @@ message AgentDB { } enum QueryLang { - QUERY_LANG_SQL = 0; + SQL = 0; reserved 1; } @@ -187,11 +187,11 @@ message AgentDB { } enum ValueType { - VALUE_TYPE_NULL = 0; - VALUE_TYPE_INT = 1; - VALUE_TYPE_DOUBLE = 2; - VALUE_TYPE_TEXT = 3; - VALUE_TYPE_BLOB = 4; + NULL = 0; + INT = 1; + DOUBLE = 2; + TEXT = 3; + BLOB = 4; } // Values are typed per row, as SQLite types them, so a column may mix From d3e24c64fed64b9c94527071ba3d338a0a6828f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Wed, 5 Aug 2026 16:25:26 -0700 Subject: [PATCH 22/24] agentdb: one Database message, following Room GetResponse and Summary described the same thing with four duplicated fields, and Summary's missing tip was justified by a listing that reads each head anyway. They collapse into Database, which get and list both report, the way Room is one message that create and list both return. GetDatabase returns it directly rather than through a wrapper. --- livekit/livekit_agentdb.pb.go | 443 +++++++++++++------------------ livekit/livekit_agentdb.twirp.go | 239 +++++++++-------- protobufs/livekit_agentdb.proto | 17 +- 3 files changed, 307 insertions(+), 392 deletions(-) diff --git a/livekit/livekit_agentdb.pb.go b/livekit/livekit_agentdb.pb.go index 695e192e1..82218b81a 100644 --- a/livekit/livekit_agentdb.pb.go +++ b/livekit/livekit_agentdb.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.35.1 +// protoc v7.34.1 // source: livekit_agentdb.proto package livekit @@ -75,7 +75,7 @@ func (x AgentDB_Wire_QueryLang) Number() protoreflect.EnumNumber { // Deprecated: Use AgentDB_Wire_QueryLang.Descriptor instead. func (AgentDB_Wire_QueryLang) EnumDescriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 0} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 0} } type AgentDB_Wire_ValueType int32 @@ -130,7 +130,7 @@ func (x AgentDB_Wire_ValueType) Number() protoreflect.EnumNumber { // Deprecated: Use AgentDB_Wire_ValueType.Descriptor instead. func (AgentDB_Wire_ValueType) EnumDescriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 1} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 1} } // Nested so that names like Value and Ping need not be unique across the @@ -321,82 +321,6 @@ func (x *AgentDB_GetRequest) GetDatabaseId() string { return "" } -type AgentDB_GetResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` - Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` - CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - ExpiresAt int64 `protobuf:"varint,4,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` - Tip int64 `protobuf:"varint,5,opt,name=tip,proto3" json:"tip,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AgentDB_GetResponse) Reset() { - *x = AgentDB_GetResponse{} - mi := &file_livekit_agentdb_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AgentDB_GetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AgentDB_GetResponse) ProtoMessage() {} - -func (x *AgentDB_GetResponse) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AgentDB_GetResponse.ProtoReflect.Descriptor instead. -func (*AgentDB_GetResponse) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 3} -} - -func (x *AgentDB_GetResponse) GetDatabaseId() string { - if x != nil { - return x.DatabaseId - } - return "" -} - -func (x *AgentDB_GetResponse) GetRegion() string { - if x != nil { - return x.Region - } - return "" -} - -func (x *AgentDB_GetResponse) GetCreatedAt() int64 { - if x != nil { - return x.CreatedAt - } - return 0 -} - -func (x *AgentDB_GetResponse) GetExpiresAt() int64 { - if x != nil { - return x.ExpiresAt - } - return 0 -} - -func (x *AgentDB_GetResponse) GetTip() int64 { - if x != nil { - return x.Tip - } - return 0 -} - type AgentDB_ListRequest struct { state protoimpl.MessageState `protogen:"open.v1"` PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // server-clamped @@ -407,7 +331,7 @@ type AgentDB_ListRequest struct { func (x *AgentDB_ListRequest) Reset() { *x = AgentDB_ListRequest{} - mi := &file_livekit_agentdb_proto_msgTypes[5] + mi := &file_livekit_agentdb_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -419,7 +343,7 @@ func (x *AgentDB_ListRequest) String() string { func (*AgentDB_ListRequest) ProtoMessage() {} func (x *AgentDB_ListRequest) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[5] + mi := &file_livekit_agentdb_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -432,7 +356,7 @@ func (x *AgentDB_ListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_ListRequest.ProtoReflect.Descriptor instead. func (*AgentDB_ListRequest) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 4} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 3} } func (x *AgentDB_ListRequest) GetPageSize() int32 { @@ -451,7 +375,7 @@ func (x *AgentDB_ListRequest) GetPageToken() string { type AgentDB_ListResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - Databases []*AgentDB_Summary `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"` + Databases []*AgentDB_Database `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"` NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // empty when exhausted unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -459,7 +383,7 @@ type AgentDB_ListResponse struct { func (x *AgentDB_ListResponse) Reset() { *x = AgentDB_ListResponse{} - mi := &file_livekit_agentdb_proto_msgTypes[6] + mi := &file_livekit_agentdb_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -471,7 +395,7 @@ func (x *AgentDB_ListResponse) String() string { func (*AgentDB_ListResponse) ProtoMessage() {} func (x *AgentDB_ListResponse) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[6] + mi := &file_livekit_agentdb_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -484,10 +408,10 @@ func (x *AgentDB_ListResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_ListResponse.ProtoReflect.Descriptor instead. func (*AgentDB_ListResponse) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 5} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 4} } -func (x *AgentDB_ListResponse) GetDatabases() []*AgentDB_Summary { +func (x *AgentDB_ListResponse) GetDatabases() []*AgentDB_Database { if x != nil { return x.Databases } @@ -501,32 +425,33 @@ func (x *AgentDB_ListResponse) GetNextPageToken() string { return "" } -// Immutable fields only. No tip: it moves on every commit. -type AgentDB_Summary struct { +// One database, as get and list both report it. +type AgentDB_Database struct { state protoimpl.MessageState `protogen:"open.v1"` DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` CreatedAt int64 `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` ExpiresAt int64 `protobuf:"varint,4,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + Tip int64 `protobuf:"varint,5,opt,name=tip,proto3" json:"tip,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *AgentDB_Summary) Reset() { - *x = AgentDB_Summary{} - mi := &file_livekit_agentdb_proto_msgTypes[7] +func (x *AgentDB_Database) Reset() { + *x = AgentDB_Database{} + mi := &file_livekit_agentdb_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Summary) String() string { +func (x *AgentDB_Database) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Summary) ProtoMessage() {} +func (*AgentDB_Database) ProtoMessage() {} -func (x *AgentDB_Summary) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[7] +func (x *AgentDB_Database) ProtoReflect() protoreflect.Message { + mi := &file_livekit_agentdb_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -537,39 +462,46 @@ func (x *AgentDB_Summary) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Summary.ProtoReflect.Descriptor instead. -func (*AgentDB_Summary) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 6} +// Deprecated: Use AgentDB_Database.ProtoReflect.Descriptor instead. +func (*AgentDB_Database) Descriptor() ([]byte, []int) { + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 5} } -func (x *AgentDB_Summary) GetDatabaseId() string { +func (x *AgentDB_Database) GetDatabaseId() string { if x != nil { return x.DatabaseId } return "" } -func (x *AgentDB_Summary) GetRegion() string { +func (x *AgentDB_Database) GetRegion() string { if x != nil { return x.Region } return "" } -func (x *AgentDB_Summary) GetCreatedAt() int64 { +func (x *AgentDB_Database) GetCreatedAt() int64 { if x != nil { return x.CreatedAt } return 0 } -func (x *AgentDB_Summary) GetExpiresAt() int64 { +func (x *AgentDB_Database) GetExpiresAt() int64 { if x != nil { return x.ExpiresAt } return 0 } +func (x *AgentDB_Database) GetTip() int64 { + if x != nil { + return x.Tip + } + return 0 +} + type AgentDB_DeleteRequest struct { state protoimpl.MessageState `protogen:"open.v1"` DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` @@ -579,7 +511,7 @@ type AgentDB_DeleteRequest struct { func (x *AgentDB_DeleteRequest) Reset() { *x = AgentDB_DeleteRequest{} - mi := &file_livekit_agentdb_proto_msgTypes[8] + mi := &file_livekit_agentdb_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -591,7 +523,7 @@ func (x *AgentDB_DeleteRequest) String() string { func (*AgentDB_DeleteRequest) ProtoMessage() {} func (x *AgentDB_DeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[8] + mi := &file_livekit_agentdb_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -604,7 +536,7 @@ func (x *AgentDB_DeleteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_DeleteRequest.ProtoReflect.Descriptor instead. func (*AgentDB_DeleteRequest) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 7} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 6} } func (x *AgentDB_DeleteRequest) GetDatabaseId() string { @@ -622,7 +554,7 @@ type AgentDB_DeleteResponse struct { func (x *AgentDB_DeleteResponse) Reset() { *x = AgentDB_DeleteResponse{} - mi := &file_livekit_agentdb_proto_msgTypes[9] + mi := &file_livekit_agentdb_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -634,7 +566,7 @@ func (x *AgentDB_DeleteResponse) String() string { func (*AgentDB_DeleteResponse) ProtoMessage() {} func (x *AgentDB_DeleteResponse) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[9] + mi := &file_livekit_agentdb_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -647,7 +579,7 @@ func (x *AgentDB_DeleteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_DeleteResponse.ProtoReflect.Descriptor instead. func (*AgentDB_DeleteResponse) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 8} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 7} } type AgentDB_DumpRequest struct { @@ -659,7 +591,7 @@ type AgentDB_DumpRequest struct { func (x *AgentDB_DumpRequest) Reset() { *x = AgentDB_DumpRequest{} - mi := &file_livekit_agentdb_proto_msgTypes[10] + mi := &file_livekit_agentdb_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -671,7 +603,7 @@ func (x *AgentDB_DumpRequest) String() string { func (*AgentDB_DumpRequest) ProtoMessage() {} func (x *AgentDB_DumpRequest) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[10] + mi := &file_livekit_agentdb_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -684,7 +616,7 @@ func (x *AgentDB_DumpRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_DumpRequest.ProtoReflect.Descriptor instead. func (*AgentDB_DumpRequest) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 9} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 8} } func (x *AgentDB_DumpRequest) GetDatabaseId() string { @@ -705,7 +637,7 @@ type AgentDB_DumpResponse struct { func (x *AgentDB_DumpResponse) Reset() { *x = AgentDB_DumpResponse{} - mi := &file_livekit_agentdb_proto_msgTypes[11] + mi := &file_livekit_agentdb_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -717,7 +649,7 @@ func (x *AgentDB_DumpResponse) String() string { func (*AgentDB_DumpResponse) ProtoMessage() {} func (x *AgentDB_DumpResponse) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[11] + mi := &file_livekit_agentdb_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -730,7 +662,7 @@ func (x *AgentDB_DumpResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_DumpResponse.ProtoReflect.Descriptor instead. func (*AgentDB_DumpResponse) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 9} } func (x *AgentDB_DumpResponse) GetDownloadUrl() string { @@ -765,7 +697,7 @@ type AgentDB_Wire struct { func (x *AgentDB_Wire) Reset() { *x = AgentDB_Wire{} - mi := &file_livekit_agentdb_proto_msgTypes[12] + mi := &file_livekit_agentdb_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -777,7 +709,7 @@ func (x *AgentDB_Wire) String() string { func (*AgentDB_Wire) ProtoMessage() {} func (x *AgentDB_Wire) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[12] + mi := &file_livekit_agentdb_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -790,7 +722,7 @@ func (x *AgentDB_Wire) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire.ProtoReflect.Descriptor instead. func (*AgentDB_Wire) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10} } type AgentDB_Wire_ClientMessage struct { @@ -815,7 +747,7 @@ type AgentDB_Wire_ClientMessage struct { func (x *AgentDB_Wire_ClientMessage) Reset() { *x = AgentDB_Wire_ClientMessage{} - mi := &file_livekit_agentdb_proto_msgTypes[13] + mi := &file_livekit_agentdb_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -827,7 +759,7 @@ func (x *AgentDB_Wire_ClientMessage) String() string { func (*AgentDB_Wire_ClientMessage) ProtoMessage() {} func (x *AgentDB_Wire_ClientMessage) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[13] + mi := &file_livekit_agentdb_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -840,7 +772,7 @@ func (x *AgentDB_Wire_ClientMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_ClientMessage.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_ClientMessage) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 0} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 0} } func (x *AgentDB_Wire_ClientMessage) GetRequestId() uint32 { @@ -1030,7 +962,7 @@ type AgentDB_Wire_ServerMessage struct { func (x *AgentDB_Wire_ServerMessage) Reset() { *x = AgentDB_Wire_ServerMessage{} - mi := &file_livekit_agentdb_proto_msgTypes[14] + mi := &file_livekit_agentdb_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1042,7 +974,7 @@ func (x *AgentDB_Wire_ServerMessage) String() string { func (*AgentDB_Wire_ServerMessage) ProtoMessage() {} func (x *AgentDB_Wire_ServerMessage) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[14] + mi := &file_livekit_agentdb_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1055,7 +987,7 @@ func (x *AgentDB_Wire_ServerMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_ServerMessage.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_ServerMessage) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 1} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 1} } func (x *AgentDB_Wire_ServerMessage) GetRequestId() uint32 { @@ -1198,7 +1130,7 @@ type AgentDB_Wire_Value struct { func (x *AgentDB_Wire_Value) Reset() { *x = AgentDB_Wire_Value{} - mi := &file_livekit_agentdb_proto_msgTypes[15] + mi := &file_livekit_agentdb_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1210,7 +1142,7 @@ func (x *AgentDB_Wire_Value) String() string { func (*AgentDB_Wire_Value) ProtoMessage() {} func (x *AgentDB_Wire_Value) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[15] + mi := &file_livekit_agentdb_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1223,7 +1155,7 @@ func (x *AgentDB_Wire_Value) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Value.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Value) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 2} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 2} } func (x *AgentDB_Wire_Value) GetValue() isAgentDB_Wire_Value_Value { @@ -1323,7 +1255,7 @@ type AgentDB_Wire_Statement struct { func (x *AgentDB_Wire_Statement) Reset() { *x = AgentDB_Wire_Statement{} - mi := &file_livekit_agentdb_proto_msgTypes[16] + mi := &file_livekit_agentdb_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1335,7 +1267,7 @@ func (x *AgentDB_Wire_Statement) String() string { func (*AgentDB_Wire_Statement) ProtoMessage() {} func (x *AgentDB_Wire_Statement) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[16] + mi := &file_livekit_agentdb_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1348,7 +1280,7 @@ func (x *AgentDB_Wire_Statement) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Statement.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Statement) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 3} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 3} } func (x *AgentDB_Wire_Statement) GetSql() string { @@ -1381,7 +1313,7 @@ type AgentDB_Wire_Batch struct { func (x *AgentDB_Wire_Batch) Reset() { *x = AgentDB_Wire_Batch{} - mi := &file_livekit_agentdb_proto_msgTypes[17] + mi := &file_livekit_agentdb_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1393,7 +1325,7 @@ func (x *AgentDB_Wire_Batch) String() string { func (*AgentDB_Wire_Batch) ProtoMessage() {} func (x *AgentDB_Wire_Batch) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[17] + mi := &file_livekit_agentdb_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1406,7 +1338,7 @@ func (x *AgentDB_Wire_Batch) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Batch.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Batch) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 4} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 4} } func (x *AgentDB_Wire_Batch) GetStatements() []*AgentDB_Wire_Statement { @@ -1424,7 +1356,7 @@ type AgentDB_Wire_Begin struct { func (x *AgentDB_Wire_Begin) Reset() { *x = AgentDB_Wire_Begin{} - mi := &file_livekit_agentdb_proto_msgTypes[18] + mi := &file_livekit_agentdb_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1436,7 +1368,7 @@ func (x *AgentDB_Wire_Begin) String() string { func (*AgentDB_Wire_Begin) ProtoMessage() {} func (x *AgentDB_Wire_Begin) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[18] + mi := &file_livekit_agentdb_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1449,7 +1381,7 @@ func (x *AgentDB_Wire_Begin) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Begin.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Begin) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 5} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 5} } type AgentDB_Wire_Commit struct { @@ -1460,7 +1392,7 @@ type AgentDB_Wire_Commit struct { func (x *AgentDB_Wire_Commit) Reset() { *x = AgentDB_Wire_Commit{} - mi := &file_livekit_agentdb_proto_msgTypes[19] + mi := &file_livekit_agentdb_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1472,7 +1404,7 @@ func (x *AgentDB_Wire_Commit) String() string { func (*AgentDB_Wire_Commit) ProtoMessage() {} func (x *AgentDB_Wire_Commit) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[19] + mi := &file_livekit_agentdb_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1485,7 +1417,7 @@ func (x *AgentDB_Wire_Commit) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Commit.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Commit) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 6} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 6} } type AgentDB_Wire_Rollback struct { @@ -1496,7 +1428,7 @@ type AgentDB_Wire_Rollback struct { func (x *AgentDB_Wire_Rollback) Reset() { *x = AgentDB_Wire_Rollback{} - mi := &file_livekit_agentdb_proto_msgTypes[20] + mi := &file_livekit_agentdb_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1508,7 +1440,7 @@ func (x *AgentDB_Wire_Rollback) String() string { func (*AgentDB_Wire_Rollback) ProtoMessage() {} func (x *AgentDB_Wire_Rollback) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[20] + mi := &file_livekit_agentdb_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1521,7 +1453,7 @@ func (x *AgentDB_Wire_Rollback) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Rollback.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Rollback) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 7} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 7} } type AgentDB_Wire_Cancel struct { @@ -1532,7 +1464,7 @@ type AgentDB_Wire_Cancel struct { func (x *AgentDB_Wire_Cancel) Reset() { *x = AgentDB_Wire_Cancel{} - mi := &file_livekit_agentdb_proto_msgTypes[21] + mi := &file_livekit_agentdb_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1544,7 +1476,7 @@ func (x *AgentDB_Wire_Cancel) String() string { func (*AgentDB_Wire_Cancel) ProtoMessage() {} func (x *AgentDB_Wire_Cancel) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[21] + mi := &file_livekit_agentdb_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1557,7 +1489,7 @@ func (x *AgentDB_Wire_Cancel) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Cancel.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Cancel) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 8} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 8} } type AgentDB_Wire_Credit struct { @@ -1569,7 +1501,7 @@ type AgentDB_Wire_Credit struct { func (x *AgentDB_Wire_Credit) Reset() { *x = AgentDB_Wire_Credit{} - mi := &file_livekit_agentdb_proto_msgTypes[22] + mi := &file_livekit_agentdb_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1581,7 +1513,7 @@ func (x *AgentDB_Wire_Credit) String() string { func (*AgentDB_Wire_Credit) ProtoMessage() {} func (x *AgentDB_Wire_Credit) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[22] + mi := &file_livekit_agentdb_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1594,7 +1526,7 @@ func (x *AgentDB_Wire_Credit) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Credit.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Credit) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 9} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 9} } func (x *AgentDB_Wire_Credit) GetBatches() uint32 { @@ -1613,7 +1545,7 @@ type AgentDB_Wire_Ping struct { func (x *AgentDB_Wire_Ping) Reset() { *x = AgentDB_Wire_Ping{} - mi := &file_livekit_agentdb_proto_msgTypes[23] + mi := &file_livekit_agentdb_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1625,7 +1557,7 @@ func (x *AgentDB_Wire_Ping) String() string { func (*AgentDB_Wire_Ping) ProtoMessage() {} func (x *AgentDB_Wire_Ping) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[23] + mi := &file_livekit_agentdb_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1638,7 +1570,7 @@ func (x *AgentDB_Wire_Ping) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Ping.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Ping) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 10} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 10} } func (x *AgentDB_Wire_Ping) GetTimestampMs() int64 { @@ -1658,7 +1590,7 @@ type AgentDB_Wire_Pong struct { func (x *AgentDB_Wire_Pong) Reset() { *x = AgentDB_Wire_Pong{} - mi := &file_livekit_agentdb_proto_msgTypes[24] + mi := &file_livekit_agentdb_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1670,7 +1602,7 @@ func (x *AgentDB_Wire_Pong) String() string { func (*AgentDB_Wire_Pong) ProtoMessage() {} func (x *AgentDB_Wire_Pong) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[24] + mi := &file_livekit_agentdb_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1683,7 +1615,7 @@ func (x *AgentDB_Wire_Pong) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Pong.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Pong) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 11} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 11} } func (x *AgentDB_Wire_Pong) GetLastPingTimestampMs() int64 { @@ -1710,7 +1642,7 @@ type AgentDB_Wire_Hello struct { func (x *AgentDB_Wire_Hello) Reset() { *x = AgentDB_Wire_Hello{} - mi := &file_livekit_agentdb_proto_msgTypes[25] + mi := &file_livekit_agentdb_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1722,7 +1654,7 @@ func (x *AgentDB_Wire_Hello) String() string { func (*AgentDB_Wire_Hello) ProtoMessage() {} func (x *AgentDB_Wire_Hello) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[25] + mi := &file_livekit_agentdb_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1735,7 +1667,7 @@ func (x *AgentDB_Wire_Hello) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Hello.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Hello) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 12} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 12} } func (x *AgentDB_Wire_Hello) GetToken() string { @@ -1763,7 +1695,7 @@ type AgentDB_Wire_HelloOk struct { func (x *AgentDB_Wire_HelloOk) Reset() { *x = AgentDB_Wire_HelloOk{} - mi := &file_livekit_agentdb_proto_msgTypes[26] + mi := &file_livekit_agentdb_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1775,7 +1707,7 @@ func (x *AgentDB_Wire_HelloOk) String() string { func (*AgentDB_Wire_HelloOk) ProtoMessage() {} func (x *AgentDB_Wire_HelloOk) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[26] + mi := &file_livekit_agentdb_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1788,7 +1720,7 @@ func (x *AgentDB_Wire_HelloOk) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_HelloOk.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_HelloOk) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 13} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 13} } func (x *AgentDB_Wire_HelloOk) GetTip() int64 { @@ -1821,7 +1753,7 @@ type AgentDB_Wire_Columns struct { func (x *AgentDB_Wire_Columns) Reset() { *x = AgentDB_Wire_Columns{} - mi := &file_livekit_agentdb_proto_msgTypes[27] + mi := &file_livekit_agentdb_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1833,7 +1765,7 @@ func (x *AgentDB_Wire_Columns) String() string { func (*AgentDB_Wire_Columns) ProtoMessage() {} func (x *AgentDB_Wire_Columns) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[27] + mi := &file_livekit_agentdb_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1846,7 +1778,7 @@ func (x *AgentDB_Wire_Columns) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Columns.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Columns) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 14} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 14} } func (x *AgentDB_Wire_Columns) GetNames() []string { @@ -1876,7 +1808,7 @@ type AgentDB_Wire_Column struct { func (x *AgentDB_Wire_Column) Reset() { *x = AgentDB_Wire_Column{} - mi := &file_livekit_agentdb_proto_msgTypes[28] + mi := &file_livekit_agentdb_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1888,7 +1820,7 @@ func (x *AgentDB_Wire_Column) String() string { func (*AgentDB_Wire_Column) ProtoMessage() {} func (x *AgentDB_Wire_Column) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[28] + mi := &file_livekit_agentdb_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1901,7 +1833,7 @@ func (x *AgentDB_Wire_Column) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Column.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Column) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 15} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 15} } func (x *AgentDB_Wire_Column) GetTypes() []byte { @@ -1963,7 +1895,7 @@ type AgentDB_Wire_ColumnBatch struct { func (x *AgentDB_Wire_ColumnBatch) Reset() { *x = AgentDB_Wire_ColumnBatch{} - mi := &file_livekit_agentdb_proto_msgTypes[29] + mi := &file_livekit_agentdb_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1975,7 +1907,7 @@ func (x *AgentDB_Wire_ColumnBatch) String() string { func (*AgentDB_Wire_ColumnBatch) ProtoMessage() {} func (x *AgentDB_Wire_ColumnBatch) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[29] + mi := &file_livekit_agentdb_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1988,7 +1920,7 @@ func (x *AgentDB_Wire_ColumnBatch) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_ColumnBatch.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_ColumnBatch) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 16} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 16} } func (x *AgentDB_Wire_ColumnBatch) GetColumns() []*AgentDB_Wire_Column { @@ -2016,7 +1948,7 @@ type AgentDB_Wire_ExecResult struct { func (x *AgentDB_Wire_ExecResult) Reset() { *x = AgentDB_Wire_ExecResult{} - mi := &file_livekit_agentdb_proto_msgTypes[30] + mi := &file_livekit_agentdb_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2028,7 +1960,7 @@ func (x *AgentDB_Wire_ExecResult) String() string { func (*AgentDB_Wire_ExecResult) ProtoMessage() {} func (x *AgentDB_Wire_ExecResult) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[30] + mi := &file_livekit_agentdb_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2041,7 +1973,7 @@ func (x *AgentDB_Wire_ExecResult) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_ExecResult.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_ExecResult) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 17} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 17} } func (x *AgentDB_Wire_ExecResult) GetRowsAffected() int64 { @@ -2075,7 +2007,7 @@ type AgentDB_Wire_Done struct { func (x *AgentDB_Wire_Done) Reset() { *x = AgentDB_Wire_Done{} - mi := &file_livekit_agentdb_proto_msgTypes[31] + mi := &file_livekit_agentdb_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2087,7 +2019,7 @@ func (x *AgentDB_Wire_Done) String() string { func (*AgentDB_Wire_Done) ProtoMessage() {} func (x *AgentDB_Wire_Done) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[31] + mi := &file_livekit_agentdb_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2100,7 +2032,7 @@ func (x *AgentDB_Wire_Done) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Done.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Done) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 18} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 18} } func (x *AgentDB_Wire_Done) GetTip() int64 { @@ -2127,7 +2059,7 @@ type AgentDB_Wire_Error struct { func (x *AgentDB_Wire_Error) Reset() { *x = AgentDB_Wire_Error{} - mi := &file_livekit_agentdb_proto_msgTypes[32] + mi := &file_livekit_agentdb_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2139,7 +2071,7 @@ func (x *AgentDB_Wire_Error) String() string { func (*AgentDB_Wire_Error) ProtoMessage() {} func (x *AgentDB_Wire_Error) ProtoReflect() protoreflect.Message { - mi := &file_livekit_agentdb_proto_msgTypes[32] + mi := &file_livekit_agentdb_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2152,7 +2084,7 @@ func (x *AgentDB_Wire_Error) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentDB_Wire_Error.ProtoReflect.Descriptor instead. func (*AgentDB_Wire_Error) Descriptor() ([]byte, []int) { - return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 11, 19} + return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 10, 19} } func (x *AgentDB_Wire_Error) GetCode() string { @@ -2173,7 +2105,7 @@ var File_livekit_agentdb_proto protoreflect.FileDescriptor const file_livekit_agentdb_proto_rawDesc = "" + "\n" + - "\x15livekit_agentdb.proto\x12\alivekit\"\xd3\x1a\n" + + "\x15livekit_agentdb.proto\x12\alivekit\"\xce\x19\n" + "\aAgentDB\x1aH\n" + "\rCreateRequest\x12\x16\n" + "\x06region\x18\x01 \x01(\tR\x06region\x12\x1f\n" + @@ -2187,31 +2119,23 @@ const file_livekit_agentdb_proto_rawDesc = "" + "\n" + "GetRequest\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + - "databaseId\x1a\x96\x01\n" + - "\vGetResponse\x12\x1f\n" + - "\vdatabase_id\x18\x01 \x01(\tR\n" + - "databaseId\x12\x16\n" + - "\x06region\x18\x02 \x01(\tR\x06region\x12\x1d\n" + - "\n" + - "created_at\x18\x03 \x01(\x03R\tcreatedAt\x12\x1d\n" + - "\n" + - "expires_at\x18\x04 \x01(\x03R\texpiresAt\x12\x10\n" + - "\x03tip\x18\x05 \x01(\x03R\x03tip\x1aI\n" + + "databaseId\x1aI\n" + "\vListRequest\x12\x1b\n" + "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + "\n" + - "page_token\x18\x02 \x01(\tR\tpageToken\x1an\n" + - "\fListResponse\x126\n" + - "\tdatabases\x18\x01 \x03(\v2\x18.livekit.AgentDB.SummaryR\tdatabases\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x1a\x80\x01\n" + - "\aSummary\x12\x1f\n" + + "page_token\x18\x02 \x01(\tR\tpageToken\x1ao\n" + + "\fListResponse\x127\n" + + "\tdatabases\x18\x01 \x03(\v2\x19.livekit.AgentDB.DatabaseR\tdatabases\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x1a\x93\x01\n" + + "\bDatabase\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + "databaseId\x12\x16\n" + "\x06region\x18\x02 \x01(\tR\x06region\x12\x1d\n" + "\n" + "created_at\x18\x03 \x01(\x03R\tcreatedAt\x12\x1d\n" + "\n" + - "expires_at\x18\x04 \x01(\x03R\texpiresAt\x1a0\n" + + "expires_at\x18\x04 \x01(\x03R\texpiresAt\x12\x10\n" + + "\x03tip\x18\x05 \x01(\x03R\x03tip\x1a0\n" + "\rDeleteRequest\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + "databaseId\x1a\x10\n" + @@ -2323,10 +2247,10 @@ const file_livekit_agentdb_proto_rawDesc = "" + "\n" + "\x06DOUBLE\x10\x02\x12\b\n" + "\x04TEXT\x10\x03\x12\b\n" + - "\x04BLOB\x10\x042\x9b\x03\n" + + "\x04BLOB\x10\x042\x98\x03\n" + "\x0eAgentDBService\x12Q\n" + - "\x0eCreateDatabase\x12\x1e.livekit.AgentDB.CreateRequest\x1a\x1f.livekit.AgentDB.CreateResponse\x12H\n" + - "\vGetDatabase\x12\x1b.livekit.AgentDB.GetRequest\x1a\x1c.livekit.AgentDB.GetResponse\x12L\n" + + "\x0eCreateDatabase\x12\x1e.livekit.AgentDB.CreateRequest\x1a\x1f.livekit.AgentDB.CreateResponse\x12E\n" + + "\vGetDatabase\x12\x1b.livekit.AgentDB.GetRequest\x1a\x19.livekit.AgentDB.Database\x12L\n" + "\rListDatabases\x12\x1c.livekit.AgentDB.ListRequest\x1a\x1d.livekit.AgentDB.ListResponse\x12Q\n" + "\x0eDeleteDatabase\x12\x1e.livekit.AgentDB.DeleteRequest\x1a\x1f.livekit.AgentDB.DeleteResponse\x12K\n" + "\fDumpDatabase\x12\x1c.livekit.AgentDB.DumpRequest\x1a\x1d.livekit.AgentDB.DumpResponseBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" @@ -2344,7 +2268,7 @@ func file_livekit_agentdb_proto_rawDescGZIP() []byte { } var file_livekit_agentdb_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_livekit_agentdb_proto_msgTypes = make([]protoimpl.MessageInfo, 33) +var file_livekit_agentdb_proto_msgTypes = make([]protoimpl.MessageInfo, 32) var file_livekit_agentdb_proto_goTypes = []any{ (AgentDB_Wire_QueryLang)(0), // 0: livekit.AgentDB.Wire.QueryLang (AgentDB_Wire_ValueType)(0), // 1: livekit.AgentDB.Wire.ValueType @@ -2352,69 +2276,68 @@ var file_livekit_agentdb_proto_goTypes = []any{ (*AgentDB_CreateRequest)(nil), // 3: livekit.AgentDB.CreateRequest (*AgentDB_CreateResponse)(nil), // 4: livekit.AgentDB.CreateResponse (*AgentDB_GetRequest)(nil), // 5: livekit.AgentDB.GetRequest - (*AgentDB_GetResponse)(nil), // 6: livekit.AgentDB.GetResponse - (*AgentDB_ListRequest)(nil), // 7: livekit.AgentDB.ListRequest - (*AgentDB_ListResponse)(nil), // 8: livekit.AgentDB.ListResponse - (*AgentDB_Summary)(nil), // 9: livekit.AgentDB.Summary - (*AgentDB_DeleteRequest)(nil), // 10: livekit.AgentDB.DeleteRequest - (*AgentDB_DeleteResponse)(nil), // 11: livekit.AgentDB.DeleteResponse - (*AgentDB_DumpRequest)(nil), // 12: livekit.AgentDB.DumpRequest - (*AgentDB_DumpResponse)(nil), // 13: livekit.AgentDB.DumpResponse - (*AgentDB_Wire)(nil), // 14: livekit.AgentDB.Wire - (*AgentDB_Wire_ClientMessage)(nil), // 15: livekit.AgentDB.Wire.ClientMessage - (*AgentDB_Wire_ServerMessage)(nil), // 16: livekit.AgentDB.Wire.ServerMessage - (*AgentDB_Wire_Value)(nil), // 17: livekit.AgentDB.Wire.Value - (*AgentDB_Wire_Statement)(nil), // 18: livekit.AgentDB.Wire.Statement - (*AgentDB_Wire_Batch)(nil), // 19: livekit.AgentDB.Wire.Batch - (*AgentDB_Wire_Begin)(nil), // 20: livekit.AgentDB.Wire.Begin - (*AgentDB_Wire_Commit)(nil), // 21: livekit.AgentDB.Wire.Commit - (*AgentDB_Wire_Rollback)(nil), // 22: livekit.AgentDB.Wire.Rollback - (*AgentDB_Wire_Cancel)(nil), // 23: livekit.AgentDB.Wire.Cancel - (*AgentDB_Wire_Credit)(nil), // 24: livekit.AgentDB.Wire.Credit - (*AgentDB_Wire_Ping)(nil), // 25: livekit.AgentDB.Wire.Ping - (*AgentDB_Wire_Pong)(nil), // 26: livekit.AgentDB.Wire.Pong - (*AgentDB_Wire_Hello)(nil), // 27: livekit.AgentDB.Wire.Hello - (*AgentDB_Wire_HelloOk)(nil), // 28: livekit.AgentDB.Wire.HelloOk - (*AgentDB_Wire_Columns)(nil), // 29: livekit.AgentDB.Wire.Columns - (*AgentDB_Wire_Column)(nil), // 30: livekit.AgentDB.Wire.Column - (*AgentDB_Wire_ColumnBatch)(nil), // 31: livekit.AgentDB.Wire.ColumnBatch - (*AgentDB_Wire_ExecResult)(nil), // 32: livekit.AgentDB.Wire.ExecResult - (*AgentDB_Wire_Done)(nil), // 33: livekit.AgentDB.Wire.Done - (*AgentDB_Wire_Error)(nil), // 34: livekit.AgentDB.Wire.Error + (*AgentDB_ListRequest)(nil), // 6: livekit.AgentDB.ListRequest + (*AgentDB_ListResponse)(nil), // 7: livekit.AgentDB.ListResponse + (*AgentDB_Database)(nil), // 8: livekit.AgentDB.Database + (*AgentDB_DeleteRequest)(nil), // 9: livekit.AgentDB.DeleteRequest + (*AgentDB_DeleteResponse)(nil), // 10: livekit.AgentDB.DeleteResponse + (*AgentDB_DumpRequest)(nil), // 11: livekit.AgentDB.DumpRequest + (*AgentDB_DumpResponse)(nil), // 12: livekit.AgentDB.DumpResponse + (*AgentDB_Wire)(nil), // 13: livekit.AgentDB.Wire + (*AgentDB_Wire_ClientMessage)(nil), // 14: livekit.AgentDB.Wire.ClientMessage + (*AgentDB_Wire_ServerMessage)(nil), // 15: livekit.AgentDB.Wire.ServerMessage + (*AgentDB_Wire_Value)(nil), // 16: livekit.AgentDB.Wire.Value + (*AgentDB_Wire_Statement)(nil), // 17: livekit.AgentDB.Wire.Statement + (*AgentDB_Wire_Batch)(nil), // 18: livekit.AgentDB.Wire.Batch + (*AgentDB_Wire_Begin)(nil), // 19: livekit.AgentDB.Wire.Begin + (*AgentDB_Wire_Commit)(nil), // 20: livekit.AgentDB.Wire.Commit + (*AgentDB_Wire_Rollback)(nil), // 21: livekit.AgentDB.Wire.Rollback + (*AgentDB_Wire_Cancel)(nil), // 22: livekit.AgentDB.Wire.Cancel + (*AgentDB_Wire_Credit)(nil), // 23: livekit.AgentDB.Wire.Credit + (*AgentDB_Wire_Ping)(nil), // 24: livekit.AgentDB.Wire.Ping + (*AgentDB_Wire_Pong)(nil), // 25: livekit.AgentDB.Wire.Pong + (*AgentDB_Wire_Hello)(nil), // 26: livekit.AgentDB.Wire.Hello + (*AgentDB_Wire_HelloOk)(nil), // 27: livekit.AgentDB.Wire.HelloOk + (*AgentDB_Wire_Columns)(nil), // 28: livekit.AgentDB.Wire.Columns + (*AgentDB_Wire_Column)(nil), // 29: livekit.AgentDB.Wire.Column + (*AgentDB_Wire_ColumnBatch)(nil), // 30: livekit.AgentDB.Wire.ColumnBatch + (*AgentDB_Wire_ExecResult)(nil), // 31: livekit.AgentDB.Wire.ExecResult + (*AgentDB_Wire_Done)(nil), // 32: livekit.AgentDB.Wire.Done + (*AgentDB_Wire_Error)(nil), // 33: livekit.AgentDB.Wire.Error } var file_livekit_agentdb_proto_depIdxs = []int32{ - 9, // 0: livekit.AgentDB.ListResponse.databases:type_name -> livekit.AgentDB.Summary - 27, // 1: livekit.AgentDB.Wire.ClientMessage.hello:type_name -> livekit.AgentDB.Wire.Hello - 18, // 2: livekit.AgentDB.Wire.ClientMessage.exec:type_name -> livekit.AgentDB.Wire.Statement - 18, // 3: livekit.AgentDB.Wire.ClientMessage.query:type_name -> livekit.AgentDB.Wire.Statement - 19, // 4: livekit.AgentDB.Wire.ClientMessage.batch:type_name -> livekit.AgentDB.Wire.Batch - 20, // 5: livekit.AgentDB.Wire.ClientMessage.begin:type_name -> livekit.AgentDB.Wire.Begin - 21, // 6: livekit.AgentDB.Wire.ClientMessage.commit:type_name -> livekit.AgentDB.Wire.Commit - 22, // 7: livekit.AgentDB.Wire.ClientMessage.rollback:type_name -> livekit.AgentDB.Wire.Rollback - 23, // 8: livekit.AgentDB.Wire.ClientMessage.cancel:type_name -> livekit.AgentDB.Wire.Cancel - 24, // 9: livekit.AgentDB.Wire.ClientMessage.credit:type_name -> livekit.AgentDB.Wire.Credit - 25, // 10: livekit.AgentDB.Wire.ClientMessage.ping:type_name -> livekit.AgentDB.Wire.Ping - 28, // 11: livekit.AgentDB.Wire.ServerMessage.hello_ok:type_name -> livekit.AgentDB.Wire.HelloOk - 29, // 12: livekit.AgentDB.Wire.ServerMessage.columns:type_name -> livekit.AgentDB.Wire.Columns - 31, // 13: livekit.AgentDB.Wire.ServerMessage.column_batch:type_name -> livekit.AgentDB.Wire.ColumnBatch - 32, // 14: livekit.AgentDB.Wire.ServerMessage.exec_result:type_name -> livekit.AgentDB.Wire.ExecResult - 33, // 15: livekit.AgentDB.Wire.ServerMessage.done:type_name -> livekit.AgentDB.Wire.Done - 34, // 16: livekit.AgentDB.Wire.ServerMessage.error:type_name -> livekit.AgentDB.Wire.Error - 26, // 17: livekit.AgentDB.Wire.ServerMessage.pong:type_name -> livekit.AgentDB.Wire.Pong - 17, // 18: livekit.AgentDB.Wire.Statement.params:type_name -> livekit.AgentDB.Wire.Value + 8, // 0: livekit.AgentDB.ListResponse.databases:type_name -> livekit.AgentDB.Database + 26, // 1: livekit.AgentDB.Wire.ClientMessage.hello:type_name -> livekit.AgentDB.Wire.Hello + 17, // 2: livekit.AgentDB.Wire.ClientMessage.exec:type_name -> livekit.AgentDB.Wire.Statement + 17, // 3: livekit.AgentDB.Wire.ClientMessage.query:type_name -> livekit.AgentDB.Wire.Statement + 18, // 4: livekit.AgentDB.Wire.ClientMessage.batch:type_name -> livekit.AgentDB.Wire.Batch + 19, // 5: livekit.AgentDB.Wire.ClientMessage.begin:type_name -> livekit.AgentDB.Wire.Begin + 20, // 6: livekit.AgentDB.Wire.ClientMessage.commit:type_name -> livekit.AgentDB.Wire.Commit + 21, // 7: livekit.AgentDB.Wire.ClientMessage.rollback:type_name -> livekit.AgentDB.Wire.Rollback + 22, // 8: livekit.AgentDB.Wire.ClientMessage.cancel:type_name -> livekit.AgentDB.Wire.Cancel + 23, // 9: livekit.AgentDB.Wire.ClientMessage.credit:type_name -> livekit.AgentDB.Wire.Credit + 24, // 10: livekit.AgentDB.Wire.ClientMessage.ping:type_name -> livekit.AgentDB.Wire.Ping + 27, // 11: livekit.AgentDB.Wire.ServerMessage.hello_ok:type_name -> livekit.AgentDB.Wire.HelloOk + 28, // 12: livekit.AgentDB.Wire.ServerMessage.columns:type_name -> livekit.AgentDB.Wire.Columns + 30, // 13: livekit.AgentDB.Wire.ServerMessage.column_batch:type_name -> livekit.AgentDB.Wire.ColumnBatch + 31, // 14: livekit.AgentDB.Wire.ServerMessage.exec_result:type_name -> livekit.AgentDB.Wire.ExecResult + 32, // 15: livekit.AgentDB.Wire.ServerMessage.done:type_name -> livekit.AgentDB.Wire.Done + 33, // 16: livekit.AgentDB.Wire.ServerMessage.error:type_name -> livekit.AgentDB.Wire.Error + 25, // 17: livekit.AgentDB.Wire.ServerMessage.pong:type_name -> livekit.AgentDB.Wire.Pong + 16, // 18: livekit.AgentDB.Wire.Statement.params:type_name -> livekit.AgentDB.Wire.Value 0, // 19: livekit.AgentDB.Wire.Statement.lang:type_name -> livekit.AgentDB.Wire.QueryLang - 18, // 20: livekit.AgentDB.Wire.Batch.statements:type_name -> livekit.AgentDB.Wire.Statement - 30, // 21: livekit.AgentDB.Wire.ColumnBatch.columns:type_name -> livekit.AgentDB.Wire.Column + 17, // 20: livekit.AgentDB.Wire.Batch.statements:type_name -> livekit.AgentDB.Wire.Statement + 29, // 21: livekit.AgentDB.Wire.ColumnBatch.columns:type_name -> livekit.AgentDB.Wire.Column 3, // 22: livekit.AgentDBService.CreateDatabase:input_type -> livekit.AgentDB.CreateRequest 5, // 23: livekit.AgentDBService.GetDatabase:input_type -> livekit.AgentDB.GetRequest - 7, // 24: livekit.AgentDBService.ListDatabases:input_type -> livekit.AgentDB.ListRequest - 10, // 25: livekit.AgentDBService.DeleteDatabase:input_type -> livekit.AgentDB.DeleteRequest - 12, // 26: livekit.AgentDBService.DumpDatabase:input_type -> livekit.AgentDB.DumpRequest + 6, // 24: livekit.AgentDBService.ListDatabases:input_type -> livekit.AgentDB.ListRequest + 9, // 25: livekit.AgentDBService.DeleteDatabase:input_type -> livekit.AgentDB.DeleteRequest + 11, // 26: livekit.AgentDBService.DumpDatabase:input_type -> livekit.AgentDB.DumpRequest 4, // 27: livekit.AgentDBService.CreateDatabase:output_type -> livekit.AgentDB.CreateResponse - 6, // 28: livekit.AgentDBService.GetDatabase:output_type -> livekit.AgentDB.GetResponse - 8, // 29: livekit.AgentDBService.ListDatabases:output_type -> livekit.AgentDB.ListResponse - 11, // 30: livekit.AgentDBService.DeleteDatabase:output_type -> livekit.AgentDB.DeleteResponse - 13, // 31: livekit.AgentDBService.DumpDatabase:output_type -> livekit.AgentDB.DumpResponse + 8, // 28: livekit.AgentDBService.GetDatabase:output_type -> livekit.AgentDB.Database + 7, // 29: livekit.AgentDBService.ListDatabases:output_type -> livekit.AgentDB.ListResponse + 10, // 30: livekit.AgentDBService.DeleteDatabase:output_type -> livekit.AgentDB.DeleteResponse + 12, // 31: livekit.AgentDBService.DumpDatabase:output_type -> livekit.AgentDB.DumpResponse 27, // [27:32] is the sub-list for method output_type 22, // [22:27] is the sub-list for method input_type 22, // [22:22] is the sub-list for extension type_name @@ -2427,7 +2350,7 @@ func file_livekit_agentdb_proto_init() { if File_livekit_agentdb_proto != nil { return } - file_livekit_agentdb_proto_msgTypes[13].OneofWrappers = []any{ + file_livekit_agentdb_proto_msgTypes[12].OneofWrappers = []any{ (*AgentDB_Wire_ClientMessage_Hello)(nil), (*AgentDB_Wire_ClientMessage_Exec)(nil), (*AgentDB_Wire_ClientMessage_Query)(nil), @@ -2439,7 +2362,7 @@ func file_livekit_agentdb_proto_init() { (*AgentDB_Wire_ClientMessage_Credit)(nil), (*AgentDB_Wire_ClientMessage_Ping)(nil), } - file_livekit_agentdb_proto_msgTypes[14].OneofWrappers = []any{ + file_livekit_agentdb_proto_msgTypes[13].OneofWrappers = []any{ (*AgentDB_Wire_ServerMessage_HelloOk)(nil), (*AgentDB_Wire_ServerMessage_Columns)(nil), (*AgentDB_Wire_ServerMessage_ColumnBatch)(nil), @@ -2448,7 +2371,7 @@ func file_livekit_agentdb_proto_init() { (*AgentDB_Wire_ServerMessage_Error)(nil), (*AgentDB_Wire_ServerMessage_Pong)(nil), } - file_livekit_agentdb_proto_msgTypes[15].OneofWrappers = []any{ + file_livekit_agentdb_proto_msgTypes[14].OneofWrappers = []any{ (*AgentDB_Wire_Value_NullValue)(nil), (*AgentDB_Wire_Value_IntValue)(nil), (*AgentDB_Wire_Value_DoubleValue)(nil), @@ -2461,7 +2384,7 @@ func file_livekit_agentdb_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_agentdb_proto_rawDesc), len(file_livekit_agentdb_proto_rawDesc)), NumEnums: 2, - NumMessages: 33, + NumMessages: 32, NumExtensions: 0, NumServices: 1, }, diff --git a/livekit/livekit_agentdb.twirp.go b/livekit/livekit_agentdb.twirp.go index 1d76e8fd4..349933235 100644 --- a/livekit/livekit_agentdb.twirp.go +++ b/livekit/livekit_agentdb.twirp.go @@ -31,7 +31,7 @@ const _ = twirp.TwirpPackageMinVersion_8_1_0 type AgentDBService interface { CreateDatabase(context.Context, *AgentDB_CreateRequest) (*AgentDB_CreateResponse, error) - GetDatabase(context.Context, *AgentDB_GetRequest) (*AgentDB_GetResponse, error) + GetDatabase(context.Context, *AgentDB_GetRequest) (*AgentDB_Database, error) ListDatabases(context.Context, *AgentDB_ListRequest) (*AgentDB_ListResponse, error) @@ -138,13 +138,13 @@ func (c *agentDBServiceProtobufClient) callCreateDatabase(ctx context.Context, i return out, nil } -func (c *agentDBServiceProtobufClient) GetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { +func (c *agentDBServiceProtobufClient) GetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_Database, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") caller := c.callGetDatabase if c.interceptor != nil { - caller = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { + caller = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_Database, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*AgentDB_GetRequest) @@ -155,9 +155,9 @@ func (c *agentDBServiceProtobufClient) GetDatabase(ctx context.Context, in *Agen }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*AgentDB_GetResponse) + typedResp, ok := resp.(*AgentDB_Database) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_GetResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_Database) when calling interceptor") } return typedResp, err } @@ -167,8 +167,8 @@ func (c *agentDBServiceProtobufClient) GetDatabase(ctx context.Context, in *Agen return caller(ctx, in) } -func (c *agentDBServiceProtobufClient) callGetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { - out := new(AgentDB_GetResponse) +func (c *agentDBServiceProtobufClient) callGetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_Database, error) { + out := new(AgentDB_Database) ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -418,13 +418,13 @@ func (c *agentDBServiceJSONClient) callCreateDatabase(ctx context.Context, in *A return out, nil } -func (c *agentDBServiceJSONClient) GetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { +func (c *agentDBServiceJSONClient) GetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_Database, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") caller := c.callGetDatabase if c.interceptor != nil { - caller = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { + caller = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_Database, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*AgentDB_GetRequest) @@ -435,9 +435,9 @@ func (c *agentDBServiceJSONClient) GetDatabase(ctx context.Context, in *AgentDB_ }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*AgentDB_GetResponse) + typedResp, ok := resp.(*AgentDB_Database) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_GetResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_Database) when calling interceptor") } return typedResp, err } @@ -447,8 +447,8 @@ func (c *agentDBServiceJSONClient) GetDatabase(ctx context.Context, in *AgentDB_ return caller(ctx, in) } -func (c *agentDBServiceJSONClient) callGetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { - out := new(AgentDB_GetResponse) +func (c *agentDBServiceJSONClient) callGetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_Database, error) { + out := new(AgentDB_Database) ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -943,7 +943,7 @@ func (s *agentDBServiceServer) serveGetDatabaseJSON(ctx context.Context, resp ht handler := s.AgentDBService.GetDatabase if s.interceptor != nil { - handler = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { + handler = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_Database, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*AgentDB_GetRequest) @@ -954,9 +954,9 @@ func (s *agentDBServiceServer) serveGetDatabaseJSON(ctx context.Context, resp ht }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*AgentDB_GetResponse) + typedResp, ok := resp.(*AgentDB_Database) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_GetResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_Database) when calling interceptor") } return typedResp, err } @@ -965,7 +965,7 @@ func (s *agentDBServiceServer) serveGetDatabaseJSON(ctx context.Context, resp ht } // Call service method - var respContent *AgentDB_GetResponse + var respContent *AgentDB_Database func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -976,7 +976,7 @@ func (s *agentDBServiceServer) serveGetDatabaseJSON(ctx context.Context, resp ht return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_GetResponse and nil error while calling GetDatabase. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_Database and nil error while calling GetDatabase. nil responses are not supported")) return } @@ -1024,7 +1024,7 @@ func (s *agentDBServiceServer) serveGetDatabaseProtobuf(ctx context.Context, res handler := s.AgentDBService.GetDatabase if s.interceptor != nil { - handler = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_GetResponse, error) { + handler = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_Database, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*AgentDB_GetRequest) @@ -1035,9 +1035,9 @@ func (s *agentDBServiceServer) serveGetDatabaseProtobuf(ctx context.Context, res }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*AgentDB_GetResponse) + typedResp, ok := resp.(*AgentDB_Database) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_GetResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_Database) when calling interceptor") } return typedResp, err } @@ -1046,7 +1046,7 @@ func (s *agentDBServiceServer) serveGetDatabaseProtobuf(ctx context.Context, res } // Call service method - var respContent *AgentDB_GetResponse + var respContent *AgentDB_Database func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -1057,7 +1057,7 @@ func (s *agentDBServiceServer) serveGetDatabaseProtobuf(ctx context.Context, res return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_GetResponse and nil error while calling GetDatabase. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_Database and nil error while calling GetDatabase. nil responses are not supported")) return } @@ -1637,101 +1637,100 @@ func (s *agentDBServiceServer) PathPrefix() string { } var twirpFileDescriptor2 = []byte{ - // 1527 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x6e, 0x1b, 0x47, - 0x12, 0xe6, 0x68, 0x86, 0x3f, 0x53, 0x24, 0xb5, 0x44, 0x7b, 0xd7, 0x20, 0xc6, 0xd6, 0x4a, 0x96, - 0x17, 0x0b, 0xed, 0x61, 0x69, 0x43, 0x82, 0x6d, 0xac, 0xb1, 0xf0, 0x42, 0x14, 0xe5, 0xa5, 0x60, - 0xca, 0x96, 0x46, 0x72, 0xfe, 0x0e, 0x19, 0x0c, 0x67, 0xda, 0xd4, 0x40, 0xf3, 0x43, 0xcf, 0x34, - 0x65, 0xc9, 0xa7, 0xdc, 0xf2, 0x06, 0xb9, 0xe4, 0x0d, 0xf2, 0x02, 0xb9, 0xe6, 0x05, 0x72, 0x0a, - 0x90, 0x73, 0xce, 0x79, 0x8a, 0xa0, 0xaa, 0x7b, 0x86, 0x92, 0x49, 0x4a, 0xba, 0xe5, 0xd6, 0x5d, - 0xfd, 0x7d, 0xd5, 0xd5, 0x5d, 0x5f, 0x57, 0x77, 0xc3, 0xdf, 0xc2, 0xe0, 0x8c, 0x9f, 0x06, 0xc2, - 0x71, 0x47, 0x3c, 0x16, 0xfe, 0xb0, 0x33, 0x4e, 0x13, 0x91, 0xb0, 0xaa, 0x32, 0xaf, 0xff, 0x62, - 0x41, 0x75, 0x1b, 0x87, 0x7a, 0x5d, 0xab, 0x0f, 0xcd, 0x9d, 0x94, 0xbb, 0x82, 0xdb, 0xfc, 0xfd, - 0x84, 0x67, 0x82, 0xdd, 0x85, 0x4a, 0xca, 0x47, 0x41, 0x12, 0xb7, 0xb5, 0x35, 0x6d, 0xc3, 0xb4, - 0x55, 0x8f, 0xad, 0x42, 0x5d, 0x88, 0xd0, 0xc9, 0xb8, 0x97, 0xc4, 0x7e, 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0x92, 0xe0, 0xda, 0x7c, 0x37, 0xbb, 0xe7, 0xdc, 0xb3, 0x09, 0xd7, 0x2f, 0xd9, 0xc0, 0x8b, 0x1e, - 0xee, 0xb8, 0x9f, 0xc4, 0x5c, 0x69, 0x71, 0xc1, 0x8e, 0xf7, 0x92, 0x98, 0xe3, 0x8e, 0x23, 0x12, - 0xe5, 0xcb, 0xd3, 0x34, 0x49, 0x95, 0x10, 0x17, 0xc8, 0x77, 0x17, 0x21, 0x28, 0x5f, 0xc2, 0x52, - 0x62, 0x93, 0x78, 0xa4, 0x24, 0xb8, 0x28, 0xb1, 0x89, 0x4a, 0x6c, 0x72, 0x35, 0xb1, 0x3f, 0x6a, - 0x50, 0xfe, 0xcc, 0x0d, 0x27, 0x78, 0xdb, 0x41, 0x3c, 0x09, 0x43, 0xe7, 0x0c, 0x7b, 0x94, 0xd0, - 0x5a, 0xbf, 0x64, 0x9b, 0x68, 0x93, 0x80, 0x15, 0x30, 0x83, 0x58, 0xa8, 0x71, 0xaa, 0x4f, 0xa8, - 0xe7, 0x20, 0x16, 0x72, 0xf8, 0x21, 0x96, 0xb8, 0xc9, 0x30, 0xe4, 0x0a, 0x81, 0xa9, 0xd3, 0x70, - 0x5f, 0xa5, 0xb5, 0x98, 0x44, 0xe0, 0xb5, 0x21, 0x21, 0x98, 0x1d, 0x13, 0x27, 0x41, 0x5b, 0x01, - 0x18, 0x86, 0xc9, 0x50, 0x01, 0x70, 0xdf, 0x1b, 0x08, 0x40, 0x1b, 0x01, 0xba, 0x55, 0x28, 0xd3, - 0x98, 0xf5, 0xad, 0x06, 0x66, 0x51, 0x36, 0xb0, 0x3c, 0x66, 0xef, 0xf3, 0xba, 0x8a, 0x4d, 0xb6, - 0x05, 0x95, 0xb1, 0x9b, 0xba, 0x11, 0x3e, 0x35, 0xf4, 0xc5, 0x9b, 0x49, 0x5e, 0x6d, 0x05, 0x65, - 0x5b, 0x60, 0x84, 0x6e, 0x3c, 0xa2, 0xe0, 0x97, 0x17, 0x15, 0xab, 0x43, 0xac, 0x4f, 0x03, 0x37, - 0x1e, 0xd9, 0x04, 0xb6, 0xfa, 0x50, 0x96, 0xaa, 0xf9, 0x1f, 0x40, 0x96, 0x47, 0x94, 0xdf, 0xa6, - 0x37, 0x15, 0x3c, 0xfb, 0x12, 0xc5, 0xaa, 0x42, 0x99, 0x6a, 0x93, 0x55, 0x83, 0x8a, 0x2c, 0x37, - 0x16, 0x40, 0x2d, 0x2f, 0x1f, 0x64, 0xa5, 0x22, 0x60, 0xad, 0x43, 0x45, 0x1e, 0x70, 0xd6, 0x86, - 0x2a, 0x49, 0x9d, 0xae, 0x6f, 0x3c, 0x84, 0x79, 0xd7, 0xfa, 0x17, 0x18, 0x78, 0x9c, 0xf1, 0xee, - 0x11, 0x41, 0xc4, 0x33, 0xe1, 0x46, 0x63, 0x27, 0x92, 0x30, 0xdd, 0xae, 0x17, 0xb6, 0xfd, 0xcc, - 0xfa, 0x1a, 0x0c, 0x14, 0x08, 0xdb, 0x82, 0xbb, 0xa1, 0x9b, 0x09, 0x07, 0x8f, 0xbf, 0x33, 0x87, - 0x74, 0x07, 0x47, 0xd1, 0xe9, 0xf1, 0x94, 0x3c, 0xe3, 0x7f, 0x69, 0xd6, 0xff, 0x0b, 0x28, 0xd3, - 0x39, 0x67, 0x7f, 0x85, 0xb2, 0x7c, 0x2c, 0xc8, 0x44, 0xc9, 0xce, 0xa7, 0xd7, 0xe9, 0xd2, 0xcc, - 0x75, 0x1a, 0x41, 0x55, 0xd5, 0x89, 0xfc, 0x1e, 0xd4, 0x8a, 0x7b, 0x90, 0x6d, 0x40, 0x8b, 0xe2, - 0x0d, 0x62, 0xc1, 0xd3, 0x33, 0x37, 0xcc, 0x63, 0x68, 0xda, 0xcb, 0x68, 0xdf, 0x53, 0xe6, 0x7d, - 0x7a, 0xb4, 0x14, 0x2b, 0x4b, 0x26, 0x02, 0x81, 0x3a, 0x01, 0x9b, 0x63, 0xb5, 0xa6, 0x64, 0x22, - 0x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f, 0xe1, 0x85, 0xc3, 0xd9, - 0xf8, 0x2e, 0xbd, 0xe9, 0xe7, 0xc4, 0x77, 0xf9, 0x05, 0xdf, 0x7d, 0xf9, 0xd5, 0xc3, 0x51, 0x20, - 0x4e, 0x26, 0xc3, 0x8e, 0x97, 0x44, 0x8f, 0x14, 0xf4, 0x11, 0x7d, 0x8c, 0xbd, 0x24, 0xcc, 0x0d, - 0x3f, 0x2c, 0x35, 0x07, 0xc1, 0x19, 0x7f, 0x15, 0x88, 0xce, 0x01, 0x0e, 0xfd, 0xbe, 0xb4, 0xac, - 0xfa, 0xcf, 0x9f, 0x93, 0x61, 0x58, 0x21, 0xca, 0xd6, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe7, - 0x6e, 0x8e, 0x83, 0x64, 0x0f, 0x00, 0x00, + // 1511 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0xcb, 0x72, 0xdb, 0xc6, + 0x12, 0x25, 0x05, 0xf0, 0x81, 0x26, 0xa9, 0xcb, 0x1a, 0xdf, 0xeb, 0xa2, 0x61, 0xeb, 0x4a, 0x96, + 0x6f, 0xdd, 0x52, 0x16, 0xa1, 0x5d, 0x52, 0xd9, 0xae, 0xb8, 0x52, 0x4e, 0x89, 0x92, 0x6c, 0xaa, + 0x4c, 0xd9, 0x12, 0x24, 0xe7, 0xb5, 0x08, 0x0a, 0x04, 0xc6, 0x14, 0x4a, 0x20, 0x86, 0x06, 0x86, + 0xb2, 0xec, 0x1f, 0xc8, 0x07, 0x64, 0x93, 0x6f, 0xc8, 0x0f, 0x64, 0x9b, 0x1f, 0x48, 0x96, 0x59, + 0x67, 0x9d, 0xaf, 0x48, 0x75, 0xcf, 0x00, 0x94, 0xcc, 0x87, 0xbc, 0x9b, 0xe9, 0x39, 0x67, 0x1e, + 0xdd, 0x67, 0x7a, 0x7a, 0xe0, 0x3f, 0x51, 0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b, 0x8b, 0x90, 0x6e, 0xc1, 0x51, 0x58, 0xf6, 0x10, 0x4c, 0x7e, 0xc1, 0x7d, 0xda, 0x41, + 0x6d, 0x73, 0x75, 0x36, 0xe7, 0x58, 0x7a, 0x92, 0x0f, 0x79, 0x2c, 0xbb, 0x05, 0x87, 0xe0, 0xec, + 0x31, 0x94, 0xde, 0x8e, 0x79, 0xf2, 0x9e, 0x22, 0xf5, 0x49, 0x3c, 0x85, 0xc7, 0x4d, 0xf6, 0x3d, + 0xe9, 0x9f, 0x52, 0x28, 0xe7, 0x6e, 0xb2, 0x83, 0x10, 0x24, 0x11, 0x96, 0x48, 0x7c, 0x10, 0xc6, + 0xad, 0xf2, 0x42, 0x12, 0x42, 0x88, 0x84, 0x0d, 0xf6, 0x08, 0xca, 0xbe, 0x18, 0x0e, 0x43, 0xd9, + 0xaa, 0x10, 0xeb, 0xce, 0x6c, 0xd6, 0x0e, 0x61, 0xba, 0x05, 0x47, 0xa3, 0xd9, 0x97, 0x50, 0x4d, + 0x44, 0x14, 0xf5, 0x3d, 0xff, 0xac, 0x55, 0x25, 0xe6, 0x7f, 0x67, 0x33, 0x1d, 0x8d, 0xea, 0x16, + 0x9c, 0x9c, 0x41, 0xab, 0x7a, 0xb1, 0xcf, 0xa3, 0x96, 0xb5, 0x70, 0x55, 0xc2, 0xd0, 0xaa, 0xd4, + 0x22, 0x5e, 0xc2, 0x83, 0x50, 0xb6, 0x60, 0x21, 0x8f, 0x30, 0xc4, 0xa3, 0x16, 0x7b, 0x00, 0xe6, + 0x28, 0x8c, 0x07, 0xad, 0x1a, 0xb1, 0xec, 0xd9, 0xac, 0xc3, 0x30, 0x1e, 0x60, 0xe8, 0x10, 0xd9, + 0xb1, 0xa0, 0x32, 0x54, 0x82, 0xb2, 0xff, 0x34, 0xa0, 0x71, 0xcc, 0x93, 0x73, 0x9e, 0x7c, 0xa2, + 0xc4, 0x9e, 0x40, 0x95, 0x64, 0xe3, 0x8a, 0x33, 0xad, 0xb2, 0x95, 0x05, 0x2a, 0x7b, 0x85, 0xae, + 0xa9, 0x9c, 0xaa, 0x26, 0xfb, 0x02, 0x2a, 0xbe, 0x88, 0xc6, 0xc3, 0x38, 0xd5, 0x62, 0x5b, 0x99, + 0x17, 0x10, 0x02, 0x21, 0x55, 0xe3, 0xd9, 0x33, 0xa8, 0xab, 0xa6, 0xab, 0xb4, 0xa3, 0x44, 0x77, + 0x77, 0x11, 0x3f, 0x53, 0x50, 0xcd, 0x9f, 0x74, 0xd9, 0x0e, 0xd4, 0x50, 0xbd, 0x6e, 0xc2, 0xd3, + 0x71, 0x24, 0xb5, 0x04, 0xd7, 0x66, 0x4f, 0xb3, 0x77, 0xc1, 0x7d, 0x87, 0x70, 0xdd, 0x82, 0x03, + 0x3c, 0xef, 0xa1, 0xc7, 0x03, 0x11, 0x73, 0xad, 0xc5, 0x39, 0x1e, 0xdf, 0x15, 0x31, 0x47, 0x8f, + 0x23, 0x12, 0xe5, 0xcb, 0x93, 0x44, 0x24, 0x5a, 0x88, 0x73, 0xe4, 0xbb, 0x87, 0x10, 0x94, 0x2f, + 0x61, 0x29, 0xb0, 0x22, 0x1e, 0x68, 0x09, 0xce, 0x0b, 0xac, 0xd0, 0x81, 0x15, 0x57, 0x03, 0xfb, + 0x6b, 0x11, 0x4a, 0x5f, 0x7b, 0xd1, 0x18, 0xf3, 0x35, 0xc4, 0xe3, 0x28, 0x72, 0xcf, 0xb1, 0x47, + 0x01, 0xad, 0x76, 0x0b, 0x8e, 0x85, 0x36, 0x05, 0x58, 0x01, 0x2b, 0x8c, 0xa5, 0x1e, 0xa7, 0xfc, + 0x84, 0x7a, 0x0e, 0x63, 0xa9, 0x86, 0xef, 0x61, 0x8a, 0x1b, 0xf7, 0x23, 0xae, 0x11, 0x18, 0xba, + 0x22, 0xfa, 0x55, 0x59, 0xf3, 0x45, 0x24, 0xbe, 0x24, 0x0a, 0x82, 0xd1, 0xb1, 0x70, 0x11, 0xb4, + 0xe5, 0x80, 0x7e, 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7b, 0x75, 0xee, 0xb8, 0xae, 0x44, 0xf7, 0xa0, 0xf6, 0x9c, 0xcb, 0x7c, 0xbe, 0xe9, 0xac, + 0x38, 0xf9, 0xac, 0xd8, 0xf3, 0x7f, 0x07, 0xac, 0x07, 0x0d, 0xfc, 0x5b, 0xec, 0xe6, 0x7f, 0x84, + 0x69, 0xbd, 0x5c, 0xfa, 0xc6, 0xd8, 0x2b, 0x73, 0x46, 0xf5, 0xa6, 0x8e, 0xb2, 0x82, 0x7b, 0xc1, + 0x39, 0xaf, 0xd4, 0xf0, 0x33, 0xce, 0x79, 0xb5, 0x62, 0x67, 0x2f, 0x54, 0x05, 0x9e, 0x4f, 0x38, + 0xbd, 0xbf, 0x4b, 0x05, 0xfd, 0x8c, 0xfd, 0x5d, 0x2e, 0xdf, 0x3b, 0xcf, 0xbe, 0xbf, 0x37, 0x08, + 0xe5, 0xe9, 0xb8, 0xdf, 0xf6, 0xc5, 0xf0, 0xbe, 0x86, 0xde, 0xa7, 0x0f, 0xa9, 0x2f, 0xa2, 0xcc, + 0xf0, 0xcb, 0x52, 0xa3, 0x17, 0x9e, 0xf3, 0x17, 0xa1, 0x6c, 0x1f, 0xe2, 0xd0, 0xdf, 0x4b, 0xcb, + 0xba, 0xff, 0xe4, 0x09, 0x19, 0xfa, 0x65, 0xa2, 0x6c, 0xfd, 0x13, 0x00, 0x00, 0xff, 0xff, 0xad, + 0x8c, 0x58, 0x7a, 0xdc, 0x0e, 0x00, 0x00, } diff --git a/protobufs/livekit_agentdb.proto b/protobufs/livekit_agentdb.proto index 6561eedb1..b849049f2 100644 --- a/protobufs/livekit_agentdb.proto +++ b/protobufs/livekit_agentdb.proto @@ -25,7 +25,7 @@ option ruby_package = "LiveKit::Proto"; // run over the data plane below. The project comes from the access token. service AgentDBService { rpc CreateDatabase(AgentDB.CreateRequest) returns (AgentDB.CreateResponse); - rpc GetDatabase(AgentDB.GetRequest) returns (AgentDB.GetResponse); + rpc GetDatabase(AgentDB.GetRequest) returns (AgentDB.Database); rpc ListDatabases(AgentDB.ListRequest) returns (AgentDB.ListResponse); // Deletes the stored data, not just the metadata. rpc DeleteDatabase(AgentDB.DeleteRequest) returns (AgentDB.DeleteResponse); @@ -52,30 +52,23 @@ message AgentDB { string database_id = 1; } - message GetResponse { - string database_id = 1; - string region = 2; - int64 created_at = 3; - int64 expires_at = 4; - int64 tip = 5; - } - message ListRequest { int32 page_size = 1; // server-clamped string page_token = 2; } message ListResponse { - repeated Summary databases = 1; + repeated Database databases = 1; string next_page_token = 2; // empty when exhausted } - // Immutable fields only. No tip: it moves on every commit. - message Summary { + // One database, as get and list both report it. + message Database { string database_id = 1; string region = 2; int64 created_at = 3; int64 expires_at = 4; + int64 tip = 5; } message DeleteRequest { From ae8092fce4a2a8837d9dc752d7c533ecdf390c4e Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 23:26:22 +0000 Subject: [PATCH 23/24] generated protobuf --- livekit/livekit_agentdb.pb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livekit/livekit_agentdb.pb.go b/livekit/livekit_agentdb.pb.go index 82218b81a..d0a47591b 100644 --- a/livekit/livekit_agentdb.pb.go +++ b/livekit/livekit_agentdb.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v7.35.1 // source: livekit_agentdb.proto package livekit From 2ea22eea3dc8db8523677fadfb4523a457872da4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Wed, 5 Aug 2026 16:29:20 -0700 Subject: [PATCH 24/24] agentdb: the entity message is AgentDatabase --- livekit/livekit_agentdb.pb.go | 58 ++++---- livekit/livekit_agentdb.twirp.go | 238 +++++++++++++++---------------- protobufs/livekit_agentdb.proto | 6 +- 3 files changed, 151 insertions(+), 151 deletions(-) diff --git a/livekit/livekit_agentdb.pb.go b/livekit/livekit_agentdb.pb.go index d0a47591b..f488400ac 100644 --- a/livekit/livekit_agentdb.pb.go +++ b/livekit/livekit_agentdb.pb.go @@ -374,9 +374,9 @@ func (x *AgentDB_ListRequest) GetPageToken() string { } type AgentDB_ListResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Databases []*AgentDB_Database `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"` - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // empty when exhausted + state protoimpl.MessageState `protogen:"open.v1"` + Databases []*AgentDB_AgentDatabase `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // empty when exhausted unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -411,7 +411,7 @@ func (*AgentDB_ListResponse) Descriptor() ([]byte, []int) { return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 4} } -func (x *AgentDB_ListResponse) GetDatabases() []*AgentDB_Database { +func (x *AgentDB_ListResponse) GetDatabases() []*AgentDB_AgentDatabase { if x != nil { return x.Databases } @@ -426,7 +426,7 @@ func (x *AgentDB_ListResponse) GetNextPageToken() string { } // One database, as get and list both report it. -type AgentDB_Database struct { +type AgentDB_AgentDatabase struct { state protoimpl.MessageState `protogen:"open.v1"` DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` @@ -437,20 +437,20 @@ type AgentDB_Database struct { sizeCache protoimpl.SizeCache } -func (x *AgentDB_Database) Reset() { - *x = AgentDB_Database{} +func (x *AgentDB_AgentDatabase) Reset() { + *x = AgentDB_AgentDatabase{} mi := &file_livekit_agentdb_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *AgentDB_Database) String() string { +func (x *AgentDB_AgentDatabase) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AgentDB_Database) ProtoMessage() {} +func (*AgentDB_AgentDatabase) ProtoMessage() {} -func (x *AgentDB_Database) ProtoReflect() protoreflect.Message { +func (x *AgentDB_AgentDatabase) ProtoReflect() protoreflect.Message { mi := &file_livekit_agentdb_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -462,40 +462,40 @@ func (x *AgentDB_Database) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AgentDB_Database.ProtoReflect.Descriptor instead. -func (*AgentDB_Database) Descriptor() ([]byte, []int) { +// Deprecated: Use AgentDB_AgentDatabase.ProtoReflect.Descriptor instead. +func (*AgentDB_AgentDatabase) Descriptor() ([]byte, []int) { return file_livekit_agentdb_proto_rawDescGZIP(), []int{0, 5} } -func (x *AgentDB_Database) GetDatabaseId() string { +func (x *AgentDB_AgentDatabase) GetDatabaseId() string { if x != nil { return x.DatabaseId } return "" } -func (x *AgentDB_Database) GetRegion() string { +func (x *AgentDB_AgentDatabase) GetRegion() string { if x != nil { return x.Region } return "" } -func (x *AgentDB_Database) GetCreatedAt() int64 { +func (x *AgentDB_AgentDatabase) GetCreatedAt() int64 { if x != nil { return x.CreatedAt } return 0 } -func (x *AgentDB_Database) GetExpiresAt() int64 { +func (x *AgentDB_AgentDatabase) GetExpiresAt() int64 { if x != nil { return x.ExpiresAt } return 0 } -func (x *AgentDB_Database) GetTip() int64 { +func (x *AgentDB_AgentDatabase) GetTip() int64 { if x != nil { return x.Tip } @@ -2105,7 +2105,7 @@ var File_livekit_agentdb_proto protoreflect.FileDescriptor const file_livekit_agentdb_proto_rawDesc = "" + "\n" + - "\x15livekit_agentdb.proto\x12\alivekit\"\xce\x19\n" + + "\x15livekit_agentdb.proto\x12\alivekit\"\xd8\x19\n" + "\aAgentDB\x1aH\n" + "\rCreateRequest\x12\x16\n" + "\x06region\x18\x01 \x01(\tR\x06region\x12\x1f\n" + @@ -2123,11 +2123,11 @@ const file_livekit_agentdb_proto_rawDesc = "" + "\vListRequest\x12\x1b\n" + "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + "\n" + - "page_token\x18\x02 \x01(\tR\tpageToken\x1ao\n" + - "\fListResponse\x127\n" + - "\tdatabases\x18\x01 \x03(\v2\x19.livekit.AgentDB.DatabaseR\tdatabases\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x1a\x93\x01\n" + - "\bDatabase\x12\x1f\n" + + "page_token\x18\x02 \x01(\tR\tpageToken\x1at\n" + + "\fListResponse\x12<\n" + + "\tdatabases\x18\x01 \x03(\v2\x1e.livekit.AgentDB.AgentDatabaseR\tdatabases\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x1a\x98\x01\n" + + "\rAgentDatabase\x12\x1f\n" + "\vdatabase_id\x18\x01 \x01(\tR\n" + "databaseId\x12\x16\n" + "\x06region\x18\x02 \x01(\tR\x06region\x12\x1d\n" + @@ -2247,10 +2247,10 @@ const file_livekit_agentdb_proto_rawDesc = "" + "\n" + "\x06DOUBLE\x10\x02\x12\b\n" + "\x04TEXT\x10\x03\x12\b\n" + - "\x04BLOB\x10\x042\x98\x03\n" + + "\x04BLOB\x10\x042\x9d\x03\n" + "\x0eAgentDBService\x12Q\n" + - "\x0eCreateDatabase\x12\x1e.livekit.AgentDB.CreateRequest\x1a\x1f.livekit.AgentDB.CreateResponse\x12E\n" + - "\vGetDatabase\x12\x1b.livekit.AgentDB.GetRequest\x1a\x19.livekit.AgentDB.Database\x12L\n" + + "\x0eCreateDatabase\x12\x1e.livekit.AgentDB.CreateRequest\x1a\x1f.livekit.AgentDB.CreateResponse\x12J\n" + + "\vGetDatabase\x12\x1b.livekit.AgentDB.GetRequest\x1a\x1e.livekit.AgentDB.AgentDatabase\x12L\n" + "\rListDatabases\x12\x1c.livekit.AgentDB.ListRequest\x1a\x1d.livekit.AgentDB.ListResponse\x12Q\n" + "\x0eDeleteDatabase\x12\x1e.livekit.AgentDB.DeleteRequest\x1a\x1f.livekit.AgentDB.DeleteResponse\x12K\n" + "\fDumpDatabase\x12\x1c.livekit.AgentDB.DumpRequest\x1a\x1d.livekit.AgentDB.DumpResponseBFZ#github.com/livekit/protocol/livekit\xaa\x02\rLiveKit.Proto\xea\x02\x0eLiveKit::Protob\x06proto3" @@ -2278,7 +2278,7 @@ var file_livekit_agentdb_proto_goTypes = []any{ (*AgentDB_GetRequest)(nil), // 5: livekit.AgentDB.GetRequest (*AgentDB_ListRequest)(nil), // 6: livekit.AgentDB.ListRequest (*AgentDB_ListResponse)(nil), // 7: livekit.AgentDB.ListResponse - (*AgentDB_Database)(nil), // 8: livekit.AgentDB.Database + (*AgentDB_AgentDatabase)(nil), // 8: livekit.AgentDB.AgentDatabase (*AgentDB_DeleteRequest)(nil), // 9: livekit.AgentDB.DeleteRequest (*AgentDB_DeleteResponse)(nil), // 10: livekit.AgentDB.DeleteResponse (*AgentDB_DumpRequest)(nil), // 11: livekit.AgentDB.DumpRequest @@ -2306,7 +2306,7 @@ var file_livekit_agentdb_proto_goTypes = []any{ (*AgentDB_Wire_Error)(nil), // 33: livekit.AgentDB.Wire.Error } var file_livekit_agentdb_proto_depIdxs = []int32{ - 8, // 0: livekit.AgentDB.ListResponse.databases:type_name -> livekit.AgentDB.Database + 8, // 0: livekit.AgentDB.ListResponse.databases:type_name -> livekit.AgentDB.AgentDatabase 26, // 1: livekit.AgentDB.Wire.ClientMessage.hello:type_name -> livekit.AgentDB.Wire.Hello 17, // 2: livekit.AgentDB.Wire.ClientMessage.exec:type_name -> livekit.AgentDB.Wire.Statement 17, // 3: livekit.AgentDB.Wire.ClientMessage.query:type_name -> livekit.AgentDB.Wire.Statement @@ -2334,7 +2334,7 @@ var file_livekit_agentdb_proto_depIdxs = []int32{ 9, // 25: livekit.AgentDBService.DeleteDatabase:input_type -> livekit.AgentDB.DeleteRequest 11, // 26: livekit.AgentDBService.DumpDatabase:input_type -> livekit.AgentDB.DumpRequest 4, // 27: livekit.AgentDBService.CreateDatabase:output_type -> livekit.AgentDB.CreateResponse - 8, // 28: livekit.AgentDBService.GetDatabase:output_type -> livekit.AgentDB.Database + 8, // 28: livekit.AgentDBService.GetDatabase:output_type -> livekit.AgentDB.AgentDatabase 7, // 29: livekit.AgentDBService.ListDatabases:output_type -> livekit.AgentDB.ListResponse 10, // 30: livekit.AgentDBService.DeleteDatabase:output_type -> livekit.AgentDB.DeleteResponse 12, // 31: livekit.AgentDBService.DumpDatabase:output_type -> livekit.AgentDB.DumpResponse diff --git a/livekit/livekit_agentdb.twirp.go b/livekit/livekit_agentdb.twirp.go index 349933235..9c7625944 100644 --- a/livekit/livekit_agentdb.twirp.go +++ b/livekit/livekit_agentdb.twirp.go @@ -31,7 +31,7 @@ const _ = twirp.TwirpPackageMinVersion_8_1_0 type AgentDBService interface { CreateDatabase(context.Context, *AgentDB_CreateRequest) (*AgentDB_CreateResponse, error) - GetDatabase(context.Context, *AgentDB_GetRequest) (*AgentDB_Database, error) + GetDatabase(context.Context, *AgentDB_GetRequest) (*AgentDB_AgentDatabase, error) ListDatabases(context.Context, *AgentDB_ListRequest) (*AgentDB_ListResponse, error) @@ -138,13 +138,13 @@ func (c *agentDBServiceProtobufClient) callCreateDatabase(ctx context.Context, i return out, nil } -func (c *agentDBServiceProtobufClient) GetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_Database, error) { +func (c *agentDBServiceProtobufClient) GetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_AgentDatabase, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") caller := c.callGetDatabase if c.interceptor != nil { - caller = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_Database, error) { + caller = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_AgentDatabase, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*AgentDB_GetRequest) @@ -155,9 +155,9 @@ func (c *agentDBServiceProtobufClient) GetDatabase(ctx context.Context, in *Agen }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*AgentDB_Database) + typedResp, ok := resp.(*AgentDB_AgentDatabase) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_Database) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_AgentDatabase) when calling interceptor") } return typedResp, err } @@ -167,8 +167,8 @@ func (c *agentDBServiceProtobufClient) GetDatabase(ctx context.Context, in *Agen return caller(ctx, in) } -func (c *agentDBServiceProtobufClient) callGetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_Database, error) { - out := new(AgentDB_Database) +func (c *agentDBServiceProtobufClient) callGetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_AgentDatabase, error) { + out := new(AgentDB_AgentDatabase) ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -418,13 +418,13 @@ func (c *agentDBServiceJSONClient) callCreateDatabase(ctx context.Context, in *A return out, nil } -func (c *agentDBServiceJSONClient) GetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_Database, error) { +func (c *agentDBServiceJSONClient) GetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_AgentDatabase, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "AgentDBService") ctx = ctxsetters.WithMethodName(ctx, "GetDatabase") caller := c.callGetDatabase if c.interceptor != nil { - caller = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_Database, error) { + caller = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_AgentDatabase, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*AgentDB_GetRequest) @@ -435,9 +435,9 @@ func (c *agentDBServiceJSONClient) GetDatabase(ctx context.Context, in *AgentDB_ }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*AgentDB_Database) + typedResp, ok := resp.(*AgentDB_AgentDatabase) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_Database) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_AgentDatabase) when calling interceptor") } return typedResp, err } @@ -447,8 +447,8 @@ func (c *agentDBServiceJSONClient) GetDatabase(ctx context.Context, in *AgentDB_ return caller(ctx, in) } -func (c *agentDBServiceJSONClient) callGetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_Database, error) { - out := new(AgentDB_Database) +func (c *agentDBServiceJSONClient) callGetDatabase(ctx context.Context, in *AgentDB_GetRequest) (*AgentDB_AgentDatabase, error) { + out := new(AgentDB_AgentDatabase) ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[1], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -943,7 +943,7 @@ func (s *agentDBServiceServer) serveGetDatabaseJSON(ctx context.Context, resp ht handler := s.AgentDBService.GetDatabase if s.interceptor != nil { - handler = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_Database, error) { + handler = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_AgentDatabase, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*AgentDB_GetRequest) @@ -954,9 +954,9 @@ func (s *agentDBServiceServer) serveGetDatabaseJSON(ctx context.Context, resp ht }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*AgentDB_Database) + typedResp, ok := resp.(*AgentDB_AgentDatabase) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_Database) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_AgentDatabase) when calling interceptor") } return typedResp, err } @@ -965,7 +965,7 @@ func (s *agentDBServiceServer) serveGetDatabaseJSON(ctx context.Context, resp ht } // Call service method - var respContent *AgentDB_Database + var respContent *AgentDB_AgentDatabase func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -976,7 +976,7 @@ func (s *agentDBServiceServer) serveGetDatabaseJSON(ctx context.Context, resp ht return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_Database and nil error while calling GetDatabase. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_AgentDatabase and nil error while calling GetDatabase. nil responses are not supported")) return } @@ -1024,7 +1024,7 @@ func (s *agentDBServiceServer) serveGetDatabaseProtobuf(ctx context.Context, res handler := s.AgentDBService.GetDatabase if s.interceptor != nil { - handler = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_Database, error) { + handler = func(ctx context.Context, req *AgentDB_GetRequest) (*AgentDB_AgentDatabase, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { typedReq, ok := req.(*AgentDB_GetRequest) @@ -1035,9 +1035,9 @@ func (s *agentDBServiceServer) serveGetDatabaseProtobuf(ctx context.Context, res }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*AgentDB_Database) + typedResp, ok := resp.(*AgentDB_AgentDatabase) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_Database) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*AgentDB_AgentDatabase) when calling interceptor") } return typedResp, err } @@ -1046,7 +1046,7 @@ func (s *agentDBServiceServer) serveGetDatabaseProtobuf(ctx context.Context, res } // Call service method - var respContent *AgentDB_Database + var respContent *AgentDB_AgentDatabase func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -1057,7 +1057,7 @@ func (s *agentDBServiceServer) serveGetDatabaseProtobuf(ctx context.Context, res return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_Database and nil error while calling GetDatabase. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *AgentDB_AgentDatabase and nil error while calling GetDatabase. nil responses are not supported")) return } @@ -1637,100 +1637,100 @@ func (s *agentDBServiceServer) PathPrefix() string { } var twirpFileDescriptor2 = []byte{ - // 1511 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0xcb, 0x72, 0xdb, 0xc6, - 0x12, 0x25, 0x05, 0xf0, 0x81, 0x26, 0xa9, 0xcb, 0x1a, 0xdf, 0xeb, 0xa2, 0x61, 0xeb, 0x4a, 0x96, - 0x6f, 0xdd, 0x52, 0x16, 0xa1, 0x5d, 0x52, 0xd9, 0xae, 0xb8, 0x52, 0x4e, 0x89, 0x92, 0x6c, 0xaa, - 0x4c, 0xd9, 0x12, 0x24, 0xe7, 0xb5, 0x08, 0x0a, 0x04, 0xc6, 0x14, 0x4a, 0x20, 0x86, 0x06, 0x86, - 0xb2, 0xec, 0x1f, 0xc8, 0x07, 0x64, 0x93, 0x6f, 0xc8, 0x0f, 0x64, 0x9b, 0x1f, 0x48, 0x96, 0x59, - 0x67, 0x9d, 0xaf, 0x48, 0x75, 0xcf, 0x00, 0x94, 0xcc, 0x87, 0xbc, 0x9b, 0xe9, 0x39, 0x67, 0x1e, - 0xdd, 0x67, 0x7a, 0x7a, 0xe0, 0x3f, 0x51, 0x78, 0xce, 0xcf, 0x42, 0xe9, 0x7a, 0x03, 0x1e, 0xcb, - 0xa0, 0xdf, 0x1e, 0x25, 0x42, 0x0a, 0x56, 0xd1, 0xe6, 0xf5, 0x3f, 0x6e, 0x41, 0x65, 0x1b, 0x87, - 0x76, 0x3b, 0x76, 0x17, 0x1a, 0x3b, 0x09, 0xf7, 0x24, 0x77, 0xf8, 0xdb, 0x31, 0x4f, 0x25, 0xbb, - 0x09, 0xe5, 0x84, 0x0f, 0x42, 0x11, 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e9, 0x9f, 0x52, 0x28, 0xe7, 0x6e, 0xb2, 0x83, 0x10, 0x24, 0x11, 0x96, 0x48, 0x7c, 0x10, 0xc6, - 0xad, 0xf2, 0x42, 0x12, 0x42, 0x88, 0x84, 0x0d, 0xf6, 0x08, 0xca, 0xbe, 0x18, 0x0e, 0x43, 0xd9, - 0xaa, 0x10, 0xeb, 0xce, 0x6c, 0xd6, 0x0e, 0x61, 0xba, 0x05, 0x47, 0xa3, 0xd9, 0x97, 0x50, 0x4d, - 0x44, 0x14, 0xf5, 0x3d, 0xff, 0xac, 0x55, 0x25, 0xe6, 0x7f, 0x67, 0x33, 0x1d, 0x8d, 0xea, 0x16, - 0x9c, 0x9c, 0x41, 0xab, 0x7a, 0xb1, 0xcf, 0xa3, 0x96, 0xb5, 0x70, 0x55, 0xc2, 0xd0, 0xaa, 0xd4, - 0x22, 0x5e, 0xc2, 0x83, 0x50, 0xb6, 0x60, 0x21, 0x8f, 0x30, 0xc4, 0xa3, 0x16, 0x7b, 0x00, 0xe6, - 0x28, 0x8c, 0x07, 0xad, 0x1a, 0xb1, 0xec, 0xd9, 0xac, 0xc3, 0x30, 0x1e, 0x60, 0xe8, 0x10, 0xd9, - 0xb1, 0xa0, 0x32, 0x54, 0x82, 0xb2, 0xff, 0x34, 0xa0, 0x71, 0xcc, 0x93, 0x73, 0x9e, 0x7c, 0xa2, - 0xc4, 0x9e, 0x40, 0x95, 0x64, 0xe3, 0x8a, 0x33, 0xad, 0xb2, 0x95, 0x05, 0x2a, 0x7b, 0x85, 0xae, - 0xa9, 0x9c, 0xaa, 0x26, 0xfb, 0x02, 0x2a, 0xbe, 0x88, 0xc6, 0xc3, 0x38, 0xd5, 0x62, 0x5b, 0x99, - 0x17, 0x10, 0x02, 0x21, 0x55, 0xe3, 0xd9, 0x33, 0xa8, 0xab, 0xa6, 0xab, 0xb4, 0xa3, 0x44, 0x77, - 0x77, 0x11, 0x3f, 0x53, 0x50, 0xcd, 0x9f, 0x74, 0xd9, 0x0e, 0xd4, 0x50, 0xbd, 0x6e, 0xc2, 0xd3, - 0x71, 0x24, 0xb5, 0x04, 0xd7, 0x66, 0x4f, 0xb3, 0x77, 0xc1, 0x7d, 0x87, 0x70, 0xdd, 0x82, 0x03, - 0x3c, 0xef, 0xa1, 0xc7, 0x03, 0x11, 0x73, 0xad, 0xc5, 0x39, 0x1e, 0xdf, 0x15, 0x31, 0x47, 0x8f, - 0x23, 0x12, 0xe5, 0xcb, 0x93, 0x44, 0x24, 0x5a, 0x88, 0x73, 0xe4, 0xbb, 0x87, 0x10, 0x94, 0x2f, - 0x61, 0x29, 0xb0, 0x22, 0x1e, 0x68, 0x09, 0xce, 0x0b, 0xac, 0xd0, 0x81, 0x15, 0x57, 0x03, 0xfb, - 0x6b, 0x11, 0x4a, 0x5f, 0x7b, 0xd1, 0x18, 0xf3, 0x35, 0xc4, 0xe3, 0x28, 0x72, 0xcf, 0xb1, 0x47, - 0x01, 0xad, 0x76, 0x0b, 0x8e, 0x85, 0x36, 0x05, 0x58, 0x01, 0x2b, 0x8c, 0xa5, 0x1e, 0xa7, 0xfc, - 0x84, 0x7a, 0x0e, 0x63, 0xa9, 0x86, 0xef, 0x61, 0x8a, 0x1b, 0xf7, 0x23, 0xae, 0x11, 0x18, 0xba, - 0x22, 0xfa, 0x55, 0x59, 0xf3, 0x45, 0x24, 0xbe, 0x24, 0x0a, 0x82, 0xd1, 0xb1, 0x70, 0x11, 0xb4, - 0xe5, 0x80, 0x7e, 0x24, 0xfa, 0x1a, 0x80, 0x7e, 0xaf, 0x23, 0x00, 0x6d, 0x04, 0xe8, 0x54, 0xa0, - 0x44, 0x63, 0xf6, 0x8f, 0x45, 0xb0, 0xf2, 0xb4, 0x81, 0xe9, 0x31, 0x7d, 0x9b, 0xe5, 0x55, 0x6c, - 0xb2, 0x2d, 0x28, 0x8f, 0xbc, 0xc4, 0x1b, 0xe2, 0x2b, 0x6f, 0xcc, 0x77, 0x26, 0xcd, 0xea, 0x68, - 0x28, 0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c1, - 0x39, 0xaf, 0xd4, 0xf0, 0x33, 0xce, 0x79, 0xb5, 0x62, 0x67, 0x2f, 0x54, 0x05, 0x9e, 0x4f, 0x38, - 0xbd, 0xbf, 0x4b, 0x05, 0xfd, 0x8c, 0xfd, 0x5d, 0x2e, 0xdf, 0x3b, 0xcf, 0xbe, 0xbf, 0x37, 0x08, - 0xe5, 0xe9, 0xb8, 0xdf, 0xf6, 0xc5, 0xf0, 0xbe, 0x86, 0xde, 0xa7, 0x0f, 0xa9, 0x2f, 0xa2, 0xcc, - 0xf0, 0xcb, 0x52, 0xa3, 0x17, 0x9e, 0xf3, 0x17, 0xa1, 0x6c, 0x1f, 0xe2, 0xd0, 0xdf, 0x4b, 0xcb, - 0xba, 0xff, 0xe4, 0x09, 0x19, 0xfa, 0x65, 0xa2, 0x6c, 0xfd, 0x13, 0x00, 0x00, 0xff, 0xff, 0xad, - 0x8c, 0x58, 0x7a, 0xdc, 0x0e, 0x00, 0x00, + // 1513 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0xcb, 0x6e, 0xdb, 0x46, + 0x17, 0x96, 0x4c, 0xea, 0xc2, 0x23, 0xc9, 0xbf, 0x30, 0xf9, 0x1b, 0xa8, 0x4c, 0x1c, 0x3b, 0x4e, + 0x51, 0xb8, 0x8b, 0x3a, 0x81, 0x8d, 0x24, 0x68, 0x10, 0xa4, 0xb0, 0x6c, 0x27, 0x72, 0x23, 0x27, + 0xf6, 0xd8, 0xe9, 0x6d, 0x51, 0x82, 0x22, 0x27, 0x32, 0x61, 0x8a, 0x54, 0xc8, 0x91, 0xe3, 0xe4, + 0x05, 0xfa, 0x0a, 0xdd, 0xf4, 0x05, 0xfa, 0x02, 0xdd, 0xf6, 0x05, 0xba, 0x2d, 0xba, 0xec, 0xba, + 0x4f, 0x51, 0x9c, 0x33, 0x43, 0xca, 0x8e, 0x2e, 0xce, 0x8a, 0x33, 0x67, 0xbe, 0x6f, 0x2e, 0xe7, + 0x7c, 0x73, 0xe6, 0x10, 0x3e, 0x09, 0x83, 0x33, 0x71, 0x1a, 0x48, 0xc7, 0xed, 0x8b, 0x48, 0xfa, + 0xbd, 0xf5, 0x61, 0x12, 0xcb, 0x98, 0x55, 0xb4, 0x79, 0xf5, 0xef, 0x4f, 0xa1, 0xb2, 0x85, 0x43, + 0x3b, 0x6d, 0xbb, 0x03, 0x8d, 0xed, 0x44, 0xb8, 0x52, 0x70, 0xf1, 0x66, 0x24, 0x52, 0xc9, 0xae, + 0x43, 0x39, 0x11, 0xfd, 0x20, 0x8e, 0x5a, 0xc5, 0x95, 0xe2, 0x9a, 0xc5, 0x75, 0x8f, 0x2d, 0x43, + 0x4d, 0xca, 0xd0, 0x49, 0x85, 0x17, 0x47, 0x7e, 0xda, 0x5a, 0x58, 0x29, 0xae, 0x19, 0x1c, 0xa4, + 0x0c, 0x8f, 0x94, 0xc5, 0x3e, 0x80, 0xc5, 0x6c, 0xa6, 0x74, 0x18, 0x47, 0xa9, 0x40, 0x8a, 0xef, + 0x4a, 0xb7, 0xe7, 0xa6, 0xc2, 0x09, 0x7c, 0x3d, 0x1f, 0x64, 0xa6, 0x3d, 0x9f, 0x2d, 0x01, 0x88, + 0xf3, 0x61, 0x90, 0x88, 0xd4, 0x71, 0xa5, 0x9e, 0xd2, 0xd2, 0x96, 0x2d, 0x69, 0x7f, 0x09, 0xf0, + 0x4c, 0xc8, 0x6c, 0x63, 0x57, 0xcd, 0x66, 0xef, 0x41, 0xad, 0x1b, 0xa4, 0x39, 0xfe, 0x06, 0x58, + 0x43, 0xb7, 0x2f, 0x9c, 0x34, 0x78, 0x2f, 0x08, 0x5d, 0xe2, 0x55, 0x34, 0x1c, 0x05, 0xef, 0x05, + 0xae, 0x4c, 0x83, 0x32, 0x3e, 0x15, 0x11, 0xad, 0x6c, 0x71, 0x82, 0x1f, 0xa3, 0xc1, 0x96, 0x50, + 0x57, 0x53,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0x55, 0x6a, 0x1b, 0x37, 0x26, 0xe4, 0x80, + 0xd3, 0xae, 0x77, 0x10, 0xd2, 0x29, 0x70, 0x85, 0x65, 0xf7, 0xc1, 0x14, 0xe7, 0xc2, 0xa3, 0x1d, + 0xd4, 0x36, 0x96, 0xa7, 0x73, 0x8e, 0xa4, 0x2b, 0xc5, 0x40, 0x44, 0xb2, 0x53, 0xe0, 0x04, 0x67, + 0x0f, 0xa1, 0xf4, 0x66, 0x24, 0x92, 0x77, 0x14, 0xa9, 0x8f, 0xe2, 0x29, 0x3c, 0x6e, 0xb2, 0xe7, + 0x4a, 0xef, 0x84, 0x42, 0x39, 0x73, 0x93, 0x6d, 0x84, 0x20, 0x89, 0xb0, 0x44, 0x12, 0xfd, 0x20, + 0x6a, 0x95, 0xe7, 0x92, 0x10, 0x42, 0x24, 0x6c, 0xb0, 0x07, 0x50, 0xf6, 0xe2, 0xc1, 0x20, 0x90, + 0xad, 0x0a, 0xb1, 0x6e, 0x4e, 0x67, 0x6d, 0x13, 0xa6, 0x53, 0xe0, 0x1a, 0xcd, 0x1e, 0x43, 0x35, + 0x89, 0xc3, 0xb0, 0xe7, 0x7a, 0xa7, 0xad, 0x2a, 0x31, 0x6f, 0x4d, 0x67, 0x72, 0x8d, 0xea, 0x14, + 0x78, 0xce, 0xa0, 0x55, 0xdd, 0xc8, 0x13, 0x61, 0xcb, 0x9a, 0xbb, 0x2a, 0x61, 0x68, 0x55, 0x6a, + 0x11, 0x2f, 0x11, 0x7e, 0x20, 0x5b, 0x30, 0x97, 0x47, 0x18, 0xe2, 0x51, 0x8b, 0xdd, 0x03, 0x73, + 0x18, 0x44, 0xfd, 0x56, 0x8d, 0x58, 0xf6, 0x74, 0xd6, 0x41, 0x10, 0xf5, 0x31, 0x74, 0x88, 0x6c, + 0x5b, 0x50, 0x19, 0x28, 0x41, 0xd9, 0x7f, 0x19, 0xd0, 0x38, 0x12, 0xc9, 0x99, 0x48, 0x3e, 0x52, + 0x62, 0x8f, 0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, 0x17, + 0xc8, 0x5e, 0x9e, 0x39, 0xae, 0x2b, 0xd1, 0x6f, 0xa0, 0xf6, 0x4c, 0x8c, 0xab, 0xf4, 0xc9, 0xac, + 0x38, 0xfe, 0x6d, 0xb1, 0xaf, 0xf8, 0x4f, 0x60, 0x5d, 0x68, 0xe0, 0xaf, 0xc6, 0x4e, 0xfe, 0xb7, + 0x30, 0x29, 0x9a, 0x0b, 0x7f, 0x35, 0xf6, 0xd2, 0x8c, 0x51, 0xbd, 0xb3, 0xc3, 0xac, 0xea, 0x9e, + 0x73, 0xd8, 0x4b, 0x85, 0xfc, 0x94, 0xc3, 0x5e, 0x2e, 0xdb, 0xd9, 0x73, 0x55, 0x86, 0xe7, 0x13, + 0x4e, 0xee, 0xef, 0x42, 0x55, 0x3f, 0x65, 0x7f, 0x17, 0x6b, 0xf8, 0xf6, 0xd3, 0x1f, 0xef, 0xf4, + 0x03, 0x79, 0x32, 0xea, 0xad, 0x7b, 0xf1, 0xe0, 0xae, 0x86, 0xde, 0xa5, 0xff, 0x53, 0x2f, 0x0e, + 0x33, 0xc3, 0x6f, 0x0b, 0x8d, 0x6e, 0x70, 0x26, 0x9e, 0x07, 0x72, 0xfd, 0x00, 0x87, 0xfe, 0x5d, + 0x58, 0xd4, 0xfd, 0x47, 0x8f, 0xc8, 0xd0, 0x2b, 0x13, 0x65, 0xf3, 0xbf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xc5, 0x9a, 0x43, 0xe8, 0xeb, 0x0e, 0x00, 0x00, } diff --git a/protobufs/livekit_agentdb.proto b/protobufs/livekit_agentdb.proto index b849049f2..db4a837af 100644 --- a/protobufs/livekit_agentdb.proto +++ b/protobufs/livekit_agentdb.proto @@ -25,7 +25,7 @@ option ruby_package = "LiveKit::Proto"; // run over the data plane below. The project comes from the access token. service AgentDBService { rpc CreateDatabase(AgentDB.CreateRequest) returns (AgentDB.CreateResponse); - rpc GetDatabase(AgentDB.GetRequest) returns (AgentDB.Database); + rpc GetDatabase(AgentDB.GetRequest) returns (AgentDB.AgentDatabase); rpc ListDatabases(AgentDB.ListRequest) returns (AgentDB.ListResponse); // Deletes the stored data, not just the metadata. rpc DeleteDatabase(AgentDB.DeleteRequest) returns (AgentDB.DeleteResponse); @@ -58,12 +58,12 @@ message AgentDB { } message ListResponse { - repeated Database databases = 1; + repeated AgentDatabase databases = 1; string next_page_token = 2; // empty when exhausted } // One database, as get and list both report it. - message Database { + message AgentDatabase { string database_id = 1; string region = 2; int64 created_at = 3;