Skip to content
Open
6 changes: 6 additions & 0 deletions .changeset/agent-dispatch-queue-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"github.com/livekit/protocol": patch
"@livekit/protocol": patch
---

Add the `AgentDispatchQueue` service with `QueuedJob` / `QueuedJobInput` / `QueuedJobStatus`, job group messages, `DispatchQueueConfig` / `DispatchLimit` / `DispatchLimitScope`, and an `AgentGrant.DispatchAdmin` grant
3 changes: 3 additions & 0 deletions auth/grants.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,8 @@ type AgentGrant struct {
SimulationAdmin bool `json:"simulationAdmin,omitempty"`
// DatabaseAdmin grants access to a project's agent databases (AgentDB).
DatabaseAdmin bool `json:"databaseAdmin,omitempty"`
// DispatchAdmin grants access to manage the project's outbound agent dispatch queue.
DispatchAdmin bool `json:"dispatchAdmin,omitempty"`
}

func (s *AgentGrant) Clone() *AgentGrant {
Expand All @@ -603,6 +605,7 @@ func (s *AgentGrant) MarshalLogObject(e zapcore.ObjectEncoder) error {
e.AddBool("Admin", s.Admin)
e.AddBool("SimulationAdmin", s.SimulationAdmin)
e.AddBool("DatabaseAdmin", s.DatabaseAdmin)
e.AddBool("DispatchAdmin", s.DispatchAdmin)
return nil
}

Expand Down
3 changes: 2 additions & 1 deletion auth/grants_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ func TestGrants(t *testing.T) {

t.Run("clone with Agent", func(t *testing.T) {
agent := &AgentGrant{
Admin: true,
Admin: true,
DispatchAdmin: true,
}
grants := &ClaimGrants{
Identity: "identity",
Expand Down
Loading
Loading