Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/agent-job-pending-webhook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"github.com/livekit/protocol": patch
"@livekit/protocol": patch
---

Add `agent_job_pending` webhook event, `JS_CANCELLED` job status, and `JobState.reason` (including `JSR_RETRYING`)
246 changes: 164 additions & 82 deletions livekit/livekit_agent.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion livekit/livekit_webhook.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions protobufs/livekit_agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ message JobState {
string participant_identity = 6;
string worker_id = 7 [(logger.name) = "workerID"];
string agent_id = 8 [(logger.name) = "agentID"];
// why the job has no agent, for JS_PENDING and JS_CANCELLED jobs
JobStateReason reason = 9;
}

// from Worker to Server
Expand Down Expand Up @@ -101,6 +103,20 @@ enum JobStatus {
JS_RUNNING = 1;
JS_SUCCESS = 2;
JS_FAILED = 3;
// the job ended before it was assigned to an agent
JS_CANCELLED = 4;
}

enum JobStateReason {
JSR_UNSPECIFIED = 0;
// no agent was available to accept the job
JSR_NO_CAPACITY = 1;
// the room closed before an agent was assigned
JSR_ROOM_CLOSED = 2;
// the dispatch was deleted before an agent was assigned
JSR_DISPATCH_DELETED = 3;
// the job failed and is being dispatched again
JSR_RETRYING = 4;
}

message SimulateJobRequest {
Expand Down
Loading
Loading