diff --git a/.changeset/spicy-teachers-tell.md b/.changeset/spicy-teachers-tell.md new file mode 100644 index 000000000..05dc97fa2 --- /dev/null +++ b/.changeset/spicy-teachers-tell.md @@ -0,0 +1,5 @@ +--- +"@livekit/protocol": patch +--- + +Agent env diff --git a/agent/environment.go b/agent/environment.go new file mode 100644 index 000000000..4c1a5ff16 --- /dev/null +++ b/agent/environment.go @@ -0,0 +1,24 @@ +package agent + +import "fmt" + +const MaxEnvironmentLength = 64 + +func ValidateEnvironment(env string) error { + if env == "" { + return nil + } + if len(env) > MaxEnvironmentLength { + return fmt.Errorf("environment exceeds %d bytes", MaxEnvironmentLength) + } + for i := 0; i < len(env); i++ { + c := env[i] + switch { + case c == '_': + return fmt.Errorf("environment contains reserved character %q", c) + case c <= ' ' || c == 0x7f: + return fmt.Errorf("environment contains whitespace or control byte at position %d", i) + } + } + return nil +} diff --git a/livekit/livekit_agent.pb.go b/livekit/livekit_agent.pb.go index 13356682f..1725a6ccf 100644 --- a/livekit/livekit_agent.pb.go +++ b/livekit/livekit_agent.pb.go @@ -196,6 +196,7 @@ type Job struct { AgentName string `protobuf:"bytes,7,opt,name=agent_name,json=agentName,proto3" json:"agent_name,omitempty"` State *JobState `protobuf:"bytes,8,opt,name=state,proto3" json:"state,omitempty"` EnableRecording bool `protobuf:"varint,10,opt,name=enable_recording,json=enableRecording,proto3" json:"enable_recording,omitempty"` + Environment string `protobuf:"bytes,11,opt,name=environment,proto3" json:"environment,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -301,6 +302,13 @@ func (x *Job) GetEnableRecording() bool { return false } +func (x *Job) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + type JobState struct { state protoimpl.MessageState `protogen:"open.v1"` Status JobStatus `protobuf:"varint,1,opt,name=status,proto3,enum=livekit.JobStatus" json:"status,omitempty"` @@ -867,6 +875,7 @@ type RegisterWorkerRequest struct { PingInterval uint32 `protobuf:"varint,5,opt,name=ping_interval,json=pingInterval,proto3" json:"ping_interval,omitempty"` Namespace *string `protobuf:"bytes,6,opt,name=namespace,proto3,oneof" json:"namespace,omitempty"` AllowedPermissions *ParticipantPermission `protobuf:"bytes,7,opt,name=allowed_permissions,json=allowedPermissions,proto3" json:"allowed_permissions,omitempty"` + Environment string `protobuf:"bytes,9,opt,name=environment,proto3" json:"environment,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -943,6 +952,13 @@ func (x *RegisterWorkerRequest) GetAllowedPermissions() *ParticipantPermission { return nil } +func (x *RegisterWorkerRequest) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + type RegisterWorkerResponse struct { state protoimpl.MessageState `protogen:"open.v1"` WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` @@ -1425,7 +1441,7 @@ var File_livekit_agent_proto protoreflect.FileDescriptor const file_livekit_agent_proto_rawDesc = "" + "\n" + - "\x13livekit_agent.proto\x12\alivekit\x1a\x14livekit_models.proto\x1a\x14logger/options.proto\"\x90\x03\n" + + "\x13livekit_agent.proto\x12\alivekit\x1a\x14livekit_models.proto\x1a\x14logger/options.proto\"\xb2\x03\n" + "\x03Job\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12.\n" + "\vdispatch_id\x18\t \x01(\tB\r\xbaP\n" + @@ -1440,7 +1456,8 @@ const file_livekit_agent_proto_rawDesc = "" + "agent_name\x18\a \x01(\tR\tagentName\x12'\n" + "\x05state\x18\b \x01(\v2\x11.livekit.JobStateR\x05state\x12)\n" + "\x10enable_recording\x18\n" + - " \x01(\bR\x0fenableRecordingB\x0e\n" + + " \x01(\bR\x0fenableRecording\x12 \n" + + "\venvironment\x18\v \x01(\tR\venvironmentB\x0e\n" + "\f_participant\"\xa9\x02\n" + "\bJobState\x12*\n" + "\x06status\x18\x01 \x01(\x0e2\x12.livekit.JobStatusR\x06status\x12\x14\n" + @@ -1484,7 +1501,7 @@ const file_livekit_agent_proto_rawDesc = "" + "\n" + "WorkerPong\x12%\n" + "\x0elast_timestamp\x18\x01 \x01(\x03R\rlastTimestamp\x12\x1c\n" + - "\ttimestamp\x18\x02 \x01(\x03R\ttimestamp\"\x9d\x02\n" + + "\ttimestamp\x18\x02 \x01(\x03R\ttimestamp\"\xbf\x02\n" + "\x15RegisterWorkerRequest\x12$\n" + "\x04type\x18\x01 \x01(\x0e2\x10.livekit.JobTypeR\x04type\x12\x1d\n" + "\n" + @@ -1492,7 +1509,8 @@ const file_livekit_agent_proto_rawDesc = "" + "\aversion\x18\x03 \x01(\tR\aversion\x12#\n" + "\rping_interval\x18\x05 \x01(\rR\fpingInterval\x12!\n" + "\tnamespace\x18\x06 \x01(\tH\x00R\tnamespace\x88\x01\x01\x12O\n" + - "\x13allowed_permissions\x18\a \x01(\v2\x1e.livekit.ParticipantPermissionR\x12allowedPermissionsB\f\n" + + "\x13allowed_permissions\x18\a \x01(\v2\x1e.livekit.ParticipantPermissionR\x12allowedPermissions\x12 \n" + + "\venvironment\x18\t \x01(\tR\venvironmentB\f\n" + "\n" + "_namespace\"x\n" + "\x16RegisterWorkerResponse\x12(\n" + diff --git a/livekit/livekit_agent_dispatch.pb.go b/livekit/livekit_agent_dispatch.pb.go index 759e9e387..9afaf6d67 100644 --- a/livekit/livekit_agent_dispatch.pb.go +++ b/livekit/livekit_agent_dispatch.pb.go @@ -88,6 +88,7 @@ type CreateAgentDispatchRequest struct { Room string `protobuf:"bytes,2,opt,name=room,proto3" json:"room,omitempty"` Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` RestartPolicy JobRestartPolicy `protobuf:"varint,4,opt,name=restart_policy,json=restartPolicy,proto3,enum=livekit.JobRestartPolicy" json:"restart_policy,omitempty"` // cloud only + Environment string `protobuf:"bytes,5,opt,name=environment,proto3" json:"environment,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -150,11 +151,19 @@ func (x *CreateAgentDispatchRequest) GetRestartPolicy() JobRestartPolicy { return JobRestartPolicy_JRP_ON_FAILURE } +func (x *CreateAgentDispatchRequest) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + type RoomAgentDispatch struct { state protoimpl.MessageState `protogen:"open.v1"` AgentName string `protobuf:"bytes,1,opt,name=agent_name,json=agentName,proto3" json:"agent_name,omitempty"` Metadata string `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` RestartPolicy JobRestartPolicy `protobuf:"varint,3,opt,name=restart_policy,json=restartPolicy,proto3,enum=livekit.JobRestartPolicy" json:"restart_policy,omitempty"` // cloud only + Environment string `protobuf:"bytes,4,opt,name=environment,proto3" json:"environment,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -210,6 +219,13 @@ func (x *RoomAgentDispatch) GetRestartPolicy() JobRestartPolicy { return JobRestartPolicy_JRP_ON_FAILURE } +func (x *RoomAgentDispatch) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + type DeleteAgentDispatchRequest struct { state protoimpl.MessageState `protogen:"open.v1"` DispatchId string `protobuf:"bytes,1,opt,name=dispatch_id,json=dispatchId,proto3" json:"dispatch_id,omitempty"` @@ -366,6 +382,7 @@ type AgentDispatch struct { Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` State *AgentDispatchState `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` RestartPolicy JobRestartPolicy `protobuf:"varint,6,opt,name=restart_policy,json=restartPolicy,proto3,enum=livekit.JobRestartPolicy" json:"restart_policy,omitempty"` // cloud only + Environment string `protobuf:"bytes,7,opt,name=environment,proto3" json:"environment,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -442,6 +459,13 @@ func (x *AgentDispatch) GetRestartPolicy() JobRestartPolicy { return JobRestartPolicy_JRP_ON_FAILURE } +func (x *AgentDispatch) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + type AgentDispatchState struct { state protoimpl.MessageState `protogen:"open.v1"` // For dispatches of tyoe JT_ROOM, there will be at most 1 job. @@ -508,18 +532,20 @@ var File_livekit_agent_dispatch_proto protoreflect.FileDescriptor const file_livekit_agent_dispatch_proto_rawDesc = "" + "\n" + - "\x1clivekit_agent_dispatch.proto\x12\alivekit\x1a\x13livekit_agent.proto\x1a\x14logger/options.proto\"\xb2\x01\n" + + "\x1clivekit_agent_dispatch.proto\x12\alivekit\x1a\x13livekit_agent.proto\x1a\x14logger/options.proto\"\xd4\x01\n" + "\x1aCreateAgentDispatchRequest\x12\x1d\n" + "\n" + "agent_name\x18\x01 \x01(\tR\tagentName\x12\x12\n" + "\x04room\x18\x02 \x01(\tR\x04room\x12\x1f\n" + "\bmetadata\x18\x03 \x01(\tB\x03\xa8P\x01R\bmetadata\x12@\n" + - "\x0erestart_policy\x18\x04 \x01(\x0e2\x19.livekit.JobRestartPolicyR\rrestartPolicy\"\x95\x01\n" + + "\x0erestart_policy\x18\x04 \x01(\x0e2\x19.livekit.JobRestartPolicyR\rrestartPolicy\x12 \n" + + "\venvironment\x18\x05 \x01(\tR\venvironment\"\xb7\x01\n" + "\x11RoomAgentDispatch\x12\x1d\n" + "\n" + "agent_name\x18\x01 \x01(\tR\tagentName\x12\x1f\n" + "\bmetadata\x18\x02 \x01(\tB\x03\xa8P\x01R\bmetadata\x12@\n" + - "\x0erestart_policy\x18\x03 \x01(\x0e2\x19.livekit.JobRestartPolicyR\rrestartPolicy\"`\n" + + "\x0erestart_policy\x18\x03 \x01(\x0e2\x19.livekit.JobRestartPolicyR\rrestartPolicy\x12 \n" + + "\venvironment\x18\x04 \x01(\tR\venvironment\"`\n" + "\x1aDeleteAgentDispatchRequest\x12.\n" + "\vdispatch_id\x18\x01 \x01(\tB\r\xbaP\n" + "dispatchIDR\n" + @@ -531,7 +557,7 @@ const file_livekit_agent_dispatch_proto_rawDesc = "" + "dispatchId\x12\x12\n" + "\x04room\x18\x02 \x01(\tR\x04room\"^\n" + "\x19ListAgentDispatchResponse\x12A\n" + - "\x10agent_dispatches\x18\x01 \x03(\v2\x16.livekit.AgentDispatchR\x0fagentDispatches\"\xe8\x01\n" + + "\x10agent_dispatches\x18\x01 \x03(\v2\x16.livekit.AgentDispatchR\x0fagentDispatches\"\x8a\x02\n" + "\rAgentDispatch\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n" + "\n" + @@ -539,7 +565,8 @@ const file_livekit_agent_dispatch_proto_rawDesc = "" + "\x04room\x18\x03 \x01(\tR\x04room\x12\x1f\n" + "\bmetadata\x18\x04 \x01(\tB\x03\xa8P\x01R\bmetadata\x121\n" + "\x05state\x18\x05 \x01(\v2\x1b.livekit.AgentDispatchStateR\x05state\x12@\n" + - "\x0erestart_policy\x18\x06 \x01(\x0e2\x19.livekit.JobRestartPolicyR\rrestartPolicy\"t\n" + + "\x0erestart_policy\x18\x06 \x01(\x0e2\x19.livekit.JobRestartPolicyR\rrestartPolicy\x12 \n" + + "\venvironment\x18\a \x01(\tR\venvironment\"t\n" + "\x12AgentDispatchState\x12 \n" + "\x04jobs\x18\x01 \x03(\v2\f.livekit.JobR\x04jobs\x12\x1d\n" + "\n" + diff --git a/livekit/livekit_agent_dispatch.twirp.go b/livekit/livekit_agent_dispatch.twirp.go index 1b0a5a759..c0831900d 100644 --- a/livekit/livekit_agent_dispatch.twirp.go +++ b/livekit/livekit_agent_dispatch.twirp.go @@ -1075,40 +1075,42 @@ func (s *agentDispatchServiceServer) PathPrefix() string { } var twirpFileDescriptor1 = []byte{ - // 557 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0xc5, 0x76, 0x5a, 0xc8, 0xa4, 0x31, 0x61, 0xa9, 0x90, 0x6b, 0x40, 0x84, 0xf4, 0x12, 0x71, - 0x70, 0x44, 0x10, 0x97, 0x9e, 0x48, 0x48, 0x2a, 0xb5, 0x84, 0x10, 0x2d, 0x2a, 0x07, 0x0e, 0x98, - 0x8d, 0x3d, 0x4a, 0x17, 0xe2, 0x6c, 0xb0, 0xb7, 0x91, 0xf8, 0x06, 0xce, 0xfc, 0x03, 0xe2, 0xc8, - 0x91, 0x2f, 0x42, 0x7c, 0x05, 0xf2, 0xda, 0x31, 0x71, 0xb1, 0x81, 0x1e, 0x7a, 0xf3, 0xbe, 0x79, - 0xfb, 0xfc, 0x34, 0xf3, 0x66, 0xe1, 0xce, 0x9c, 0xaf, 0xf0, 0x3d, 0x97, 0x2e, 0x9b, 0xe1, 0x42, - 0xba, 0x3e, 0x8f, 0x96, 0x4c, 0x7a, 0xa7, 0xce, 0x32, 0x14, 0x52, 0x90, 0xab, 0x69, 0xd5, 0xbe, - 0x99, 0xa3, 0x25, 0x55, 0x7b, 0x77, 0x2e, 0x66, 0x33, 0x0c, 0x3b, 0x62, 0x29, 0xb9, 0x58, 0x44, - 0x09, 0xda, 0xfa, 0xa6, 0x81, 0xfd, 0x34, 0x44, 0x26, 0xb1, 0x17, 0x73, 0x07, 0xa9, 0x22, 0xc5, - 0x0f, 0x67, 0x18, 0x49, 0x72, 0x17, 0x20, 0xf9, 0xd5, 0x82, 0x05, 0x68, 0x69, 0x4d, 0xad, 0x5d, - 0xa5, 0x55, 0x85, 0x8c, 0x59, 0x80, 0x84, 0x40, 0x25, 0x14, 0x22, 0xb0, 0x74, 0x55, 0x50, 0xdf, - 0xe4, 0x1e, 0x5c, 0x0b, 0x50, 0x32, 0x9f, 0x49, 0x66, 0x19, 0x31, 0xde, 0x37, 0xbe, 0x4c, 0x34, - 0x9a, 0x81, 0xe4, 0x09, 0x98, 0x21, 0x46, 0x92, 0x85, 0xd2, 0x5d, 0x8a, 0x39, 0xf7, 0x3e, 0x5a, - 0x95, 0xa6, 0xd6, 0x36, 0xbb, 0x7b, 0x4e, 0x6a, 0xdb, 0x39, 0x16, 0x53, 0x9a, 0x30, 0x26, 0x8a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0x94, 0x53, 0xa4, 0x27, 0x1f, 0x3c, 0x86, 0xc6, 0x79, 0x63, - 0x84, 0x80, 0x79, 0x4c, 0x27, 0xee, 0x8b, 0xb1, 0x7b, 0xd8, 0x3b, 0x1a, 0x9d, 0xd0, 0x61, 0xe3, - 0x0a, 0xa9, 0x43, 0x35, 0xc6, 0xc6, 0xc3, 0x57, 0x43, 0xda, 0xd0, 0xba, 0x9f, 0x74, 0xd8, 0xcd, - 0xbb, 0xc5, 0x70, 0xc5, 0x3d, 0x24, 0xcf, 0xc1, 0x4c, 0x9e, 0x87, 0x6c, 0x60, 0xfb, 0x99, 0xe7, - 0xf2, 0x77, 0xc3, 0x2e, 0x09, 0x44, 0x2c, 0x97, 0x6c, 0x48, 0x81, 0x5c, 0xf9, 0xea, 0x94, 0xca, - 0x9d, 0xc0, 0x4e, 0x1c, 0xd7, 0xec, 0x7c, 0x3f, 0xe3, 0x95, 0x6d, 0x89, 0xdd, 0xfa, 0x1b, 0x25, - 0x09, 0x7a, 0xff, 0xf0, 0xf5, 0xfe, 0x8c, 0xcb, 0xd3, 0xb3, 0xa9, 0xe3, 0x89, 0xa0, 0x93, 0xf2, - 0x3b, 0xea, 0xc1, 0xf4, 0xc4, 0x7c, 0x0d, 0x7c, 0xd5, 0xeb, 0x23, 0xbe, 0xc2, 0x67, 0x5c, 0x3a, - 0x93, 0xb8, 0xf4, 0x53, 0x37, 0xd3, 0xf3, 0xc1, 0x81, 0x02, 0xa6, 0xdb, 0xea, 0xca, 0xa3, 0x5f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x71, 0x80, 0x1d, 0xb0, 0xb7, 0x05, 0x00, 0x00, + // 582 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xc1, 0x6e, 0xd3, 0x4c, + 0x10, 0xfe, 0x6d, 0xa7, 0xed, 0x9f, 0x49, 0x63, 0xc2, 0x52, 0x21, 0xd7, 0x80, 0x08, 0xe9, 0xa5, + 0xe2, 0xe0, 0x8a, 0x20, 0x2e, 0x3d, 0x91, 0x92, 0x54, 0x6a, 0x09, 0x21, 0x5a, 0x54, 0x0e, 0x1c, + 0x30, 0x1b, 0x7b, 0x94, 0x2e, 0xc4, 0xde, 0x60, 0x6f, 0x23, 0xf1, 0x0a, 0xf0, 0x22, 0x88, 0x17, + 0x40, 0xe2, 0x39, 0x78, 0x0a, 0x9e, 0x02, 0x79, 0xed, 0x98, 0xb8, 0xb1, 0x01, 0xa9, 0xe2, 0xe6, + 0xf9, 0xe6, 0xf3, 0xec, 0xb7, 0x33, 0xdf, 0x2c, 0xdc, 0x9e, 0xf1, 0x05, 0xbe, 0xe3, 0xd2, 0x65, + 0x53, 0x0c, 0xa5, 0xeb, 0xf3, 0x78, 0xce, 0xa4, 0x77, 0xee, 0xcc, 0x23, 0x21, 0x05, 0xd9, 0xca, + 0xb2, 0xf6, 0x8d, 0x02, 0x2d, 0xcd, 0xda, 0x3b, 0x33, 0x31, 0x9d, 0x62, 0x74, 0x20, 0xe6, 0x92, + 0x8b, 0x30, 0x4e, 0xd1, 0xce, 0x77, 0x0d, 0xec, 0x27, 0x11, 0x32, 0x89, 0xbd, 0x84, 0xdb, 0xcf, + 0x2a, 0x52, 0x7c, 0x7f, 0x81, 0xb1, 0x24, 0x77, 0x00, 0xd2, 0xa3, 0x42, 0x16, 0xa0, 0xa5, 0xb5, + 0xb5, 0xfd, 0x3a, 0xad, 0x2b, 0x64, 0xc4, 0x02, 0x24, 0x04, 0x6a, 0x91, 0x10, 0x81, 0xa5, 0xab, + 0x84, 0xfa, 0x26, 0x77, 0xe1, 0xff, 0x00, 0x25, 0xf3, 0x99, 0x64, 0x96, 0x91, 0xe0, 0x47, 0xc6, + 0xe7, 0xb1, 0x46, 0x73, 0x90, 0x3c, 0x06, 0x33, 0xc2, 0x58, 0xb2, 0x48, 0xba, 0x73, 0x31, 0xe3, + 0xde, 0x07, 0xab, 0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8c, 0xb8, + 0xd3, 0x09, 0x1d, 0x06, 0x00, 0x00, } diff --git a/protobufs/livekit_agent.proto b/protobufs/livekit_agent.proto index 7ba085251..7e00c2268 100644 --- a/protobufs/livekit_agent.proto +++ b/protobufs/livekit_agent.proto @@ -33,6 +33,7 @@ message Job { string agent_name = 7; JobState state = 8; bool enable_recording = 10; + string environment = 11; } message JobState { @@ -120,6 +121,7 @@ message RegisterWorkerRequest { uint32 ping_interval = 5; optional string namespace = 6; ParticipantPermission allowed_permissions = 7; + string environment = 9; } message RegisterWorkerResponse { diff --git a/protobufs/livekit_agent_dispatch.proto b/protobufs/livekit_agent_dispatch.proto index 95ce83c88..981981dc9 100644 --- a/protobufs/livekit_agent_dispatch.proto +++ b/protobufs/livekit_agent_dispatch.proto @@ -38,12 +38,14 @@ message CreateAgentDispatchRequest { string room = 2; string metadata = 3 [(logger.redact) = true]; JobRestartPolicy restart_policy = 4; // cloud only + string environment = 5; } message RoomAgentDispatch { string agent_name = 1; string metadata = 2 [(logger.redact) = true]; JobRestartPolicy restart_policy = 3; // cloud only + string environment = 4; } message DeleteAgentDispatchRequest { @@ -67,6 +69,7 @@ message AgentDispatch { string metadata = 4 [(logger.redact) = true]; AgentDispatchState state = 5; JobRestartPolicy restart_policy = 6; // cloud only + string environment = 7; } message AgentDispatchState {