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
5 changes: 5 additions & 0 deletions .changeset/purple-needles-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@livekit/protocol": patch
---

rename agent environment to deployment
18 changes: 9 additions & 9 deletions agent/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ package agent

import "fmt"

const MaxEnvironmentLength = 64
const MaxDeploymentLength = 64

func ValidateEnvironment(env string) error {
if env == "" {
func ValidateDeployment(deployment string) error {
if deployment == "" {
return nil
}
if len(env) > MaxEnvironmentLength {
return fmt.Errorf("environment exceeds %d bytes", MaxEnvironmentLength)
if len(deployment) > MaxDeploymentLength {
return fmt.Errorf("deployment exceeds %d bytes", MaxDeploymentLength)
}
for i := 0; i < len(env); i++ {
c := env[i]
for i := 0; i < len(deployment); i++ {
c := deployment[i]
switch {
case c == '_':
return fmt.Errorf("environment contains reserved character %q", c)
return fmt.Errorf("deployment contains reserved character %q", c)
case c <= ' ' || c == 0x7f:
return fmt.Errorf("environment contains whitespace or control byte at position %d", i)
return fmt.Errorf("deployment contains whitespace or control byte at position %d", i)
}
}
return nil
Expand Down
28 changes: 16 additions & 12 deletions livekit/livekit_agent.pb.go

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

40 changes: 23 additions & 17 deletions livekit/livekit_agent_dispatch.pb.go

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

74 changes: 37 additions & 37 deletions livekit/livekit_agent_dispatch.twirp.go

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

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package agentsv2obs
package agentsv3obs

import "github.com/livekit/protocol/livekit"

Expand Down
Loading
Loading