From 0a12a510e0d762ec79d47a7d73aca26abd8d8963 Mon Sep 17 00:00:00 2001 From: boks1971 Date: Mon, 2 Nov 2026 22:16:30 +0530 Subject: [PATCH 1/5] agent: add job creation, accept and assignment times Co-Authored-By: Claude Opus 5.5 --- .changeset/agent-job-timing-state.md | 6 ++++ livekit/livekit_agent.pb.go | 48 ++++++++++++++++++++++++---- protobufs/livekit_agent.proto | 6 ++++ 3 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 .changeset/agent-job-timing-state.md diff --git a/.changeset/agent-job-timing-state.md b/.changeset/agent-job-timing-state.md new file mode 100644 index 000000000..9e74db895 --- /dev/null +++ b/.changeset/agent-job-timing-state.md @@ -0,0 +1,6 @@ +--- +"github.com/livekit/protocol": patch +"@livekit/protocol": patch +--- + +Add `Job.created_at`, `JobState.accepted_at` and `JobState.assigned_at` diff --git a/livekit/livekit_agent.pb.go b/livekit/livekit_agent.pb.go index b5121e839..bc0b89649 100644 --- a/livekit/livekit_agent.pb.go +++ b/livekit/livekit_agent.pb.go @@ -380,8 +380,10 @@ type Job struct { Deployment string `protobuf:"bytes,11,opt,name=deployment,proto3" json:"deployment,omitempty"` Attributes map[string]string `protobuf:"bytes,12,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` EnableRedaction bool `protobuf:"varint,13,opt,name=enable_redaction,json=enableRedaction,proto3" json:"enable_redaction,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // when the server created the job, in Unix nanoseconds + CreatedAt int64 `protobuf:"varint,14,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Job) Reset() { @@ -506,6 +508,13 @@ func (x *Job) GetEnableRedaction() bool { return false } +func (x *Job) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + type JobState struct { state protoimpl.MessageState `protogen:"open.v1"` Status JobStatus `protobuf:"varint,1,opt,name=status,proto3,enum=livekit.JobStatus" json:"status,omitempty"` @@ -517,7 +526,11 @@ type JobState struct { WorkerId string `protobuf:"bytes,7,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` AgentId string `protobuf:"bytes,8,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` // why the job has no agent, for JS_PENDING and JS_CANCELLED jobs - Reason JobStateReason `protobuf:"varint,9,opt,name=reason,proto3,enum=livekit.JobStateReason" json:"reason,omitempty"` + Reason JobStateReason `protobuf:"varint,9,opt,name=reason,proto3,enum=livekit.JobStateReason" json:"reason,omitempty"` + // when the server received the worker's accept for this attempt, in Unix nanoseconds + AcceptedAt int64 `protobuf:"varint,10,opt,name=accepted_at,json=acceptedAt,proto3" json:"accepted_at,omitempty"` + // when the server sent the assignment for this attempt, in Unix nanoseconds + AssignedAt int64 `protobuf:"varint,11,opt,name=assigned_at,json=assignedAt,proto3" json:"assigned_at,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -615,6 +628,20 @@ func (x *JobState) GetReason() JobStateReason { return JobStateReason_JSR_UNSPECIFIED } +func (x *JobState) GetAcceptedAt() int64 { + if x != nil { + return x.AcceptedAt + } + return 0 +} + +func (x *JobState) GetAssignedAt() int64 { + if x != nil { + return x.AssignedAt + } + return 0 +} + // from Worker to Server type WorkerMessage struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -2080,7 +2107,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\"\xe2\x04\n" + + "\x13livekit_agent.proto\x12\alivekit\x1a\x14livekit_models.proto\x1a\x14logger/options.proto\"\x81\x05\n" + "\x03Job\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12.\n" + "\vdispatch_id\x18\t \x01(\tB\r\xbaP\n" + @@ -2102,11 +2129,13 @@ const file_livekit_agent_proto_rawDesc = "" + "\n" + "attributes\x18\f \x03(\v2\x1c.livekit.Job.AttributesEntryB\x03\xc0P\x01R\n" + "attributes\x12)\n" + - "\x10enable_redaction\x18\r \x01(\bR\x0fenableRedaction\x1a=\n" + + "\x10enable_redaction\x18\r \x01(\bR\x0fenableRedaction\x12\x1d\n" + + "\n" + + "created_at\x18\x0e \x01(\x03R\tcreatedAt\x1a=\n" + "\x0fAttributesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x0e\n" + - "\f_participant\"\xda\x02\n" + + "\f_participant\"\x9c\x03\n" + "\bJobState\x12*\n" + "\x06status\x18\x01 \x01(\x0e2\x12.livekit.JobStatusR\x06status\x12\x14\n" + "\x05error\x18\x02 \x01(\tR\x05error\x12\x1d\n" + @@ -2119,7 +2148,12 @@ const file_livekit_agent_proto_rawDesc = "" + "\tworker_id\x18\a \x01(\tB\v\xbaP\bworkerIDR\bworkerId\x12%\n" + "\bagent_id\x18\b \x01(\tB\n" + "\xbaP\aagentIDR\aagentId\x12/\n" + - "\x06reason\x18\t \x01(\x0e2\x17.livekit.JobStateReasonR\x06reason\"\xc8\x03\n" + + "\x06reason\x18\t \x01(\x0e2\x17.livekit.JobStateReasonR\x06reason\x12\x1f\n" + + "\vaccepted_at\x18\n" + + " \x01(\x03R\n" + + "acceptedAt\x12\x1f\n" + + "\vassigned_at\x18\v \x01(\x03R\n" + + "assignedAt\"\xc8\x03\n" + "\rWorkerMessage\x12<\n" + "\bregister\x18\x01 \x01(\v2\x1e.livekit.RegisterWorkerRequestH\x00R\bregister\x12C\n" + "\favailability\x18\x02 \x01(\v2\x1d.livekit.AvailabilityResponseH\x00R\favailability\x12B\n" + diff --git a/protobufs/livekit_agent.proto b/protobufs/livekit_agent.proto index 251e0cb5a..4bc7228b3 100644 --- a/protobufs/livekit_agent.proto +++ b/protobufs/livekit_agent.proto @@ -36,6 +36,8 @@ message Job { string deployment = 11; map attributes = 12 [(logger.sensitivity) = SENSITIVITY_PII]; bool enable_redaction = 13; + // when the server created the job, in Unix nanoseconds + int64 created_at = 14; } message JobState { @@ -49,6 +51,10 @@ message JobState { string agent_id = 8 [(logger.name) = "agentID"]; // why the job has no agent, for JS_PENDING and JS_CANCELLED jobs JobStateReason reason = 9; + // when the server received the worker's accept for this attempt, in Unix nanoseconds + int64 accepted_at = 10; + // when the server sent the assignment for this attempt, in Unix nanoseconds + int64 assigned_at = 11; } // from Worker to Server From 61df7dd56d0049657ee857253d0aafc2491bc872 Mon Sep 17 00:00:00 2001 From: boks1971 Date: Mon, 2 Nov 2026 22:41:59 +0530 Subject: [PATCH 2/5] agent: add what created a dispatch Co-Authored-By: Claude Opus 5.5 --- .changeset/agent-job-timing-state.md | 2 +- livekit/livekit_agent_dispatch.pb.go | 144 ++++++++++++++++++------- protobufs/livekit_agent_dispatch.proto | 12 +++ 3 files changed, 121 insertions(+), 37 deletions(-) diff --git a/.changeset/agent-job-timing-state.md b/.changeset/agent-job-timing-state.md index 9e74db895..18b10bd62 100644 --- a/.changeset/agent-job-timing-state.md +++ b/.changeset/agent-job-timing-state.md @@ -3,4 +3,4 @@ "@livekit/protocol": patch --- -Add `Job.created_at`, `JobState.accepted_at` and `JobState.assigned_at` +Add `Job.created_at`, `JobState.accepted_at`, `JobState.assigned_at` and `AgentDispatchState.trigger` diff --git a/livekit/livekit_agent_dispatch.pb.go b/livekit/livekit_agent_dispatch.pb.go index c08d0141f..a675c013e 100644 --- a/livekit/livekit_agent_dispatch.pb.go +++ b/livekit/livekit_agent_dispatch.pb.go @@ -82,6 +82,62 @@ func (JobRestartPolicy) EnumDescriptor() ([]byte, []int) { return file_livekit_agent_dispatch_proto_rawDescGZIP(), []int{0} } +// what created the dispatch +type AgentDispatchTrigger int32 + +const ( + AgentDispatchTrigger_ADT_UNSPECIFIED AgentDispatchTrigger = 0 + // a participant joining created the room, and with it the dispatch + AgentDispatchTrigger_ADT_JOIN AgentDispatchTrigger = 1 + // the CreateRoom API created the room, and with it the dispatch + AgentDispatchTrigger_ADT_ROOM_API AgentDispatchTrigger = 2 + // the CreateDispatch API + AgentDispatchTrigger_ADT_DISPATCH_API AgentDispatchTrigger = 3 +) + +// Enum value maps for AgentDispatchTrigger. +var ( + AgentDispatchTrigger_name = map[int32]string{ + 0: "ADT_UNSPECIFIED", + 1: "ADT_JOIN", + 2: "ADT_ROOM_API", + 3: "ADT_DISPATCH_API", + } + AgentDispatchTrigger_value = map[string]int32{ + "ADT_UNSPECIFIED": 0, + "ADT_JOIN": 1, + "ADT_ROOM_API": 2, + "ADT_DISPATCH_API": 3, + } +) + +func (x AgentDispatchTrigger) Enum() *AgentDispatchTrigger { + p := new(AgentDispatchTrigger) + *p = x + return p +} + +func (x AgentDispatchTrigger) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AgentDispatchTrigger) Descriptor() protoreflect.EnumDescriptor { + return file_livekit_agent_dispatch_proto_enumTypes[1].Descriptor() +} + +func (AgentDispatchTrigger) Type() protoreflect.EnumType { + return &file_livekit_agent_dispatch_proto_enumTypes[1] +} + +func (x AgentDispatchTrigger) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AgentDispatchTrigger.Descriptor instead. +func (AgentDispatchTrigger) EnumDescriptor() ([]byte, []int) { + return file_livekit_agent_dispatch_proto_rawDescGZIP(), []int{1} +} + type CreateAgentDispatchRequest struct { state protoimpl.MessageState `protogen:"open.v1"` AgentName string `protobuf:"bytes,1,opt,name=agent_name,json=agentName,proto3" json:"agent_name,omitempty"` @@ -494,9 +550,10 @@ type AgentDispatchState struct { state protoimpl.MessageState `protogen:"open.v1"` // For dispatches of tyoe JT_ROOM, there will be at most 1 job. // For dispatches of type JT_PUBLISHER, there will be 1 per publisher. - Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` - CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - DeletedAt int64 `protobuf:"varint,3,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` + Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` + CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + DeletedAt int64 `protobuf:"varint,3,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` + Trigger AgentDispatchTrigger `protobuf:"varint,4,opt,name=trigger,proto3,enum=livekit.AgentDispatchTrigger" json:"trigger,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -552,6 +609,13 @@ func (x *AgentDispatchState) GetDeletedAt() int64 { return 0 } +func (x *AgentDispatchState) GetTrigger() AgentDispatchTrigger { + if x != nil { + return x.Trigger + } + return AgentDispatchTrigger_ADT_UNSPECIFIED +} + var File_livekit_agent_dispatch_proto protoreflect.FileDescriptor const file_livekit_agent_dispatch_proto_rawDesc = "" + @@ -614,16 +678,22 @@ const file_livekit_agent_dispatch_proto_rawDesc = "" + "attributes\x1a=\n" + "\x0fAttributesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"t\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xad\x01\n" + "\x12AgentDispatchState\x12 \n" + "\x04jobs\x18\x01 \x03(\v2\f.livekit.JobR\x04jobs\x12\x1d\n" + "\n" + "created_at\x18\x02 \x01(\x03R\tcreatedAt\x12\x1d\n" + "\n" + - "deleted_at\x18\x03 \x01(\x03R\tdeletedAt*5\n" + + "deleted_at\x18\x03 \x01(\x03R\tdeletedAt\x127\n" + + "\atrigger\x18\x04 \x01(\x0e2\x1d.livekit.AgentDispatchTriggerR\atrigger*5\n" + "\x10JobRestartPolicy\x12\x12\n" + "\x0eJRP_ON_FAILURE\x10\x00\x12\r\n" + - "\tJRP_NEVER\x10\x012\x8b\x02\n" + + "\tJRP_NEVER\x10\x01*a\n" + + "\x14AgentDispatchTrigger\x12\x13\n" + + "\x0fADT_UNSPECIFIED\x10\x00\x12\f\n" + + "\bADT_JOIN\x10\x01\x12\x10\n" + + "\fADT_ROOM_API\x10\x02\x12\x14\n" + + "\x10ADT_DISPATCH_API\x10\x032\x8b\x02\n" + "\x14AgentDispatchService\x12M\n" + "\x0eCreateDispatch\x12#.livekit.CreateAgentDispatchRequest\x1a\x16.livekit.AgentDispatch\x12M\n" + "\x0eDeleteDispatch\x12#.livekit.DeleteAgentDispatchRequest\x1a\x16.livekit.AgentDispatch\x12U\n" + @@ -641,43 +711,45 @@ func file_livekit_agent_dispatch_proto_rawDescGZIP() []byte { return file_livekit_agent_dispatch_proto_rawDescData } -var file_livekit_agent_dispatch_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_livekit_agent_dispatch_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_livekit_agent_dispatch_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_livekit_agent_dispatch_proto_goTypes = []any{ (JobRestartPolicy)(0), // 0: livekit.JobRestartPolicy - (*CreateAgentDispatchRequest)(nil), // 1: livekit.CreateAgentDispatchRequest - (*RoomAgentDispatch)(nil), // 2: livekit.RoomAgentDispatch - (*DeleteAgentDispatchRequest)(nil), // 3: livekit.DeleteAgentDispatchRequest - (*ListAgentDispatchRequest)(nil), // 4: livekit.ListAgentDispatchRequest - (*ListAgentDispatchResponse)(nil), // 5: livekit.ListAgentDispatchResponse - (*AgentDispatch)(nil), // 6: livekit.AgentDispatch - (*AgentDispatchState)(nil), // 7: livekit.AgentDispatchState - nil, // 8: livekit.CreateAgentDispatchRequest.AttributesEntry - nil, // 9: livekit.RoomAgentDispatch.AttributesEntry - nil, // 10: livekit.AgentDispatch.AttributesEntry - (*Job)(nil), // 11: livekit.Job + (AgentDispatchTrigger)(0), // 1: livekit.AgentDispatchTrigger + (*CreateAgentDispatchRequest)(nil), // 2: livekit.CreateAgentDispatchRequest + (*RoomAgentDispatch)(nil), // 3: livekit.RoomAgentDispatch + (*DeleteAgentDispatchRequest)(nil), // 4: livekit.DeleteAgentDispatchRequest + (*ListAgentDispatchRequest)(nil), // 5: livekit.ListAgentDispatchRequest + (*ListAgentDispatchResponse)(nil), // 6: livekit.ListAgentDispatchResponse + (*AgentDispatch)(nil), // 7: livekit.AgentDispatch + (*AgentDispatchState)(nil), // 8: livekit.AgentDispatchState + nil, // 9: livekit.CreateAgentDispatchRequest.AttributesEntry + nil, // 10: livekit.RoomAgentDispatch.AttributesEntry + nil, // 11: livekit.AgentDispatch.AttributesEntry + (*Job)(nil), // 12: livekit.Job } var file_livekit_agent_dispatch_proto_depIdxs = []int32{ 0, // 0: livekit.CreateAgentDispatchRequest.restart_policy:type_name -> livekit.JobRestartPolicy - 8, // 1: livekit.CreateAgentDispatchRequest.attributes:type_name -> livekit.CreateAgentDispatchRequest.AttributesEntry + 9, // 1: livekit.CreateAgentDispatchRequest.attributes:type_name -> livekit.CreateAgentDispatchRequest.AttributesEntry 0, // 2: livekit.RoomAgentDispatch.restart_policy:type_name -> livekit.JobRestartPolicy - 9, // 3: livekit.RoomAgentDispatch.attributes:type_name -> livekit.RoomAgentDispatch.AttributesEntry - 6, // 4: livekit.ListAgentDispatchResponse.agent_dispatches:type_name -> livekit.AgentDispatch - 7, // 5: livekit.AgentDispatch.state:type_name -> livekit.AgentDispatchState + 10, // 3: livekit.RoomAgentDispatch.attributes:type_name -> livekit.RoomAgentDispatch.AttributesEntry + 7, // 4: livekit.ListAgentDispatchResponse.agent_dispatches:type_name -> livekit.AgentDispatch + 8, // 5: livekit.AgentDispatch.state:type_name -> livekit.AgentDispatchState 0, // 6: livekit.AgentDispatch.restart_policy:type_name -> livekit.JobRestartPolicy - 10, // 7: livekit.AgentDispatch.attributes:type_name -> livekit.AgentDispatch.AttributesEntry - 11, // 8: livekit.AgentDispatchState.jobs:type_name -> livekit.Job - 1, // 9: livekit.AgentDispatchService.CreateDispatch:input_type -> livekit.CreateAgentDispatchRequest - 3, // 10: livekit.AgentDispatchService.DeleteDispatch:input_type -> livekit.DeleteAgentDispatchRequest - 4, // 11: livekit.AgentDispatchService.ListDispatch:input_type -> livekit.ListAgentDispatchRequest - 6, // 12: livekit.AgentDispatchService.CreateDispatch:output_type -> livekit.AgentDispatch - 6, // 13: livekit.AgentDispatchService.DeleteDispatch:output_type -> livekit.AgentDispatch - 5, // 14: livekit.AgentDispatchService.ListDispatch:output_type -> livekit.ListAgentDispatchResponse - 12, // [12:15] is the sub-list for method output_type - 9, // [9:12] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 11, // 7: livekit.AgentDispatch.attributes:type_name -> livekit.AgentDispatch.AttributesEntry + 12, // 8: livekit.AgentDispatchState.jobs:type_name -> livekit.Job + 1, // 9: livekit.AgentDispatchState.trigger:type_name -> livekit.AgentDispatchTrigger + 2, // 10: livekit.AgentDispatchService.CreateDispatch:input_type -> livekit.CreateAgentDispatchRequest + 4, // 11: livekit.AgentDispatchService.DeleteDispatch:input_type -> livekit.DeleteAgentDispatchRequest + 5, // 12: livekit.AgentDispatchService.ListDispatch:input_type -> livekit.ListAgentDispatchRequest + 7, // 13: livekit.AgentDispatchService.CreateDispatch:output_type -> livekit.AgentDispatch + 7, // 14: livekit.AgentDispatchService.DeleteDispatch:output_type -> livekit.AgentDispatch + 6, // 15: livekit.AgentDispatchService.ListDispatch:output_type -> livekit.ListAgentDispatchResponse + 13, // [13:16] is the sub-list for method output_type + 10, // [10:13] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_livekit_agent_dispatch_proto_init() } @@ -691,7 +763,7 @@ func file_livekit_agent_dispatch_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_agent_dispatch_proto_rawDesc), len(file_livekit_agent_dispatch_proto_rawDesc)), - NumEnums: 1, + NumEnums: 2, NumMessages: 10, NumExtensions: 0, NumServices: 1, diff --git a/protobufs/livekit_agent_dispatch.proto b/protobufs/livekit_agent_dispatch.proto index aba251454..b779abb74 100644 --- a/protobufs/livekit_agent_dispatch.proto +++ b/protobufs/livekit_agent_dispatch.proto @@ -99,5 +99,17 @@ message AgentDispatchState { repeated Job jobs = 1; int64 created_at = 2; int64 deleted_at = 3; + AgentDispatchTrigger trigger = 4; +} + +// what created the dispatch +enum AgentDispatchTrigger { + ADT_UNSPECIFIED = 0; + // a participant joining created the room, and with it the dispatch + ADT_JOIN = 1; + // the CreateRoom API created the room, and with it the dispatch + ADT_ROOM_API = 2; + // the CreateDispatch API + ADT_DISPATCH_API = 3; } From c7031f9605f1d81608c7c6ec08e406738a1890af Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 17:12:53 +0000 Subject: [PATCH 3/5] generated protobuf --- livekit/livekit_agent_dispatch.twirp.go | 97 +++++++++++++------------ 1 file changed, 51 insertions(+), 46 deletions(-) diff --git a/livekit/livekit_agent_dispatch.twirp.go b/livekit/livekit_agent_dispatch.twirp.go index 8733f708e..27cfd0f83 100644 --- a/livekit/livekit_agent_dispatch.twirp.go +++ b/livekit/livekit_agent_dispatch.twirp.go @@ -1075,50 +1075,55 @@ func (s *agentDispatchServiceServer) PathPrefix() string { } var twirpFileDescriptor1 = []byte{ - // 708 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0x25, 0x76, 0xd2, 0x36, 0xd3, 0x26, 0x0d, 0x4b, 0x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 0xba, - 0xb3, 0x77, 0x68, 0xd6, 0x0a, 0x57, 0x48, 0x0e, 0xb2, 0x3e, 0xb6, 0x5f, 0x7b, 0x59, 0x33, 0x0b, - 0xa9, 0xca, 0x47, 0x05, 0x16, 0xe2, 0xb7, 0x45, 0xb7, 0xcf, 0x5a, 0x48, 0x9e, 0x43, 0x3e, 0x98, - 0xf4, 0x91, 0x3d, 0x97, 0xcf, 0xf1, 0x09, 0x28, 0x26, 0xd8, 0xdf, 0xa7, 0x0b, 0xe6, 0xc1, 0x04, - 0xba, 0xe4, 0x41, 0x91, 0x48, 0x77, 0x08, 0x73, 0x7e, 0x73, 0x46, 0xfb, 0xdb, 0x51, 0x5e, 0xd2, - 0x4c, 0x28, 0x96, 0x7e, 0x97, 0x12, 0xb4, 0xf5, 0xe6, 0xf6, 0xab, 0xe5, 0x36, 0x13, 0x47, 0xbd, - 0xa6, 0xd1, 0xe2, 0x9d, 0xd5, 0x30, 0x7f, 0x55, 0xfe, 0x17, 0x68, 0x71, 0x7b, 0x08, 0x7c, 0x52, - 0x72, 0x7b, 0xac, 0x8f, 0xcf, 0x98, 0x30, 0xea, 0x7e, 0xe8, 0x87, 0x92, 0x0f, 0xf7, 0xeb, 0xeb, - 0x12, 0x68, 0x4e, 0xc9, 0x23, 0x6b, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x8a, 0xc3, 0xbb, 0xe3, - 0x92, 0x08, 0x00, 0x00, + // 794 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x41, 0x6f, 0xeb, 0x44, + 0x10, 0x7e, 0xb6, 0x93, 0xb6, 0x99, 0x26, 0xa9, 0xd9, 0x17, 0x21, 0xbf, 0xc0, 0xab, 0x4c, 0x8a, + 0x50, 0xe8, 0xc1, 0x15, 0xa9, 0x10, 0xa8, 0x02, 0x54, 0xb7, 0x49, 0x45, 0x4a, 0x9b, 0x58,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0xc9, 0xe1, 0x5f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x3d, 0x2c, 0x41, 0xe7, 0x2f, 0x09, 0x00, 0x00, } From 8d465741a0c72cfcd825f153cc668121cf49e690 Mon Sep 17 00:00:00 2001 From: boks1971 Date: Tue, 3 Nov 2026 21:18:28 +0530 Subject: [PATCH 4/5] livekit: add the join request time participant attribute Co-Authored-By: Claude Opus 5.5 --- .changeset/agent-job-timing-state.md | 2 +- livekit/attrs.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.changeset/agent-job-timing-state.md b/.changeset/agent-job-timing-state.md index 18b10bd62..b4527cf4a 100644 --- a/.changeset/agent-job-timing-state.md +++ b/.changeset/agent-job-timing-state.md @@ -3,4 +3,4 @@ "@livekit/protocol": patch --- -Add `Job.created_at`, `JobState.accepted_at`, `JobState.assigned_at` and `AgentDispatchState.trigger` +Add `Job.created_at`, `JobState.accepted_at`, `JobState.assigned_at` and `AgentDispatchState.trigger`, and the `lk.joinRequestTime` participant attribute diff --git a/livekit/attrs.go b/livekit/attrs.go index 7e260e80c..bc030d67f 100644 --- a/livekit/attrs.go +++ b/livekit/attrs.go @@ -1,5 +1,11 @@ package livekit +// Names of participant attributes set by LiveKit. +const ( + // AttrJoinRequestTime attribute contains the time the server received a participant's join request, in Unix milliseconds. + AttrJoinRequestTime = "lk.joinRequestTime" +) + // Names of participant attributes for SIP. const ( // AttrSIPPrefix is shared for all SIP attributes. From 7475b8494067a7620f04dbb787623b17fdb1c317 Mon Sep 17 00:00:00 2001 From: boks1971 Date: Tue, 3 Nov 2026 21:20:09 +0530 Subject: [PATCH 5/5] livekit: name the join request time attribute lk.rtc.joinRequestTime Co-Authored-By: Claude Opus 5.5 --- .changeset/agent-job-timing-state.md | 2 +- livekit/attrs.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/agent-job-timing-state.md b/.changeset/agent-job-timing-state.md index b4527cf4a..4360dcc5b 100644 --- a/.changeset/agent-job-timing-state.md +++ b/.changeset/agent-job-timing-state.md @@ -3,4 +3,4 @@ "@livekit/protocol": patch --- -Add `Job.created_at`, `JobState.accepted_at`, `JobState.assigned_at` and `AgentDispatchState.trigger`, and the `lk.joinRequestTime` participant attribute +Add `Job.created_at`, `JobState.accepted_at`, `JobState.assigned_at` and `AgentDispatchState.trigger`, and the `lk.rtc.joinRequestTime` participant attribute diff --git a/livekit/attrs.go b/livekit/attrs.go index bc030d67f..c1fc28f28 100644 --- a/livekit/attrs.go +++ b/livekit/attrs.go @@ -2,8 +2,8 @@ package livekit // Names of participant attributes set by LiveKit. const ( - // AttrJoinRequestTime attribute contains the time the server received a participant's join request, in Unix milliseconds. - AttrJoinRequestTime = "lk.joinRequestTime" + // AttrRTCJoinRequestTime attribute contains the time the server received a participant's join request, in Unix milliseconds. + AttrRTCJoinRequestTime = "lk.rtc.joinRequestTime" ) // Names of participant attributes for SIP.