Skip to content

Commit 1c211e5

Browse files
committed
update livekit-cli to use shared cloudagents client
1 parent 87eb842 commit 1c211e5

File tree

7 files changed

+90
-478
lines changed

7 files changed

+90
-478
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,19 @@ lk token create --join \
472472
--room "room-%x"
473473
```
474474
475+
# Release
476+
477+
This project shares the same **Major** and **minor** version as [`server-sdk-go`](https://github.com/livekit/server-sdk-go) for compatibility. The `livekit-cli` version must not exceed `server-sdk-go` **major** and **minor** versions.
478+
479+
valid | server-sdk-go | livekit-cli
480+
--- | --- | ---
481+
✅ | 2.2.x | 2.2.x
482+
✅ | 2.3.x | 2.2.x
483+
✅ | 3.0.x | 2.2.x
484+
❌ | 2.3.x | 2.4.x
485+
486+
When introducing breaking changes to `server-sdk-go`, update the `livekit-cli` version accordingly.
487+
475488
<!--BEGIN_REPO_NAV-->
476489
<br/><table>
477490
<thead><tr><th colspan="2">LiveKit Ecosystem</th></tr></thead>

cmd/lk/agent.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import (
3535
"github.com/livekit/livekit-cli/v2/pkg/util"
3636
lkproto "github.com/livekit/protocol/livekit"
3737
"github.com/livekit/protocol/logger"
38+
"github.com/livekit/server-sdk-go/v2/pkg/cloudagents"
3839
)
3940

4041
const (
@@ -333,7 +334,7 @@ var (
333334
},
334335
}
335336
subdomainPattern = regexp.MustCompile(`^(?:https?|wss?)://([^.]+)\.`)
336-
agentsClient *agentfs.Client
337+
agentsClient *cloudagents.Client
337338
ignoredSecrets = []string{
338339
"LIVEKIT_API_KEY",
339340
"LIVEKIT_API_SECRET",
@@ -373,7 +374,7 @@ func createAgentClientWithOpts(ctx context.Context, cmd *cli.Command, opts ...lo
373374
}
374375
}
375376

376-
agentsClient, err = agentfs.New(agentfs.WithProject(project.URL, project.APIKey, project.APISecret))
377+
agentsClient, err = cloudagents.New(cloudagents.WithProject(project.URL, project.APIKey, project.APISecret))
377378
if err != nil {
378379
return ctx, err
379380
}
@@ -493,7 +494,7 @@ func createAgent(ctx context.Context, cmd *cli.Command) error {
493494
}
494495
var err error
495496
// Recreate the client with the new project
496-
agentsClient, err = agentfs.New(agentfs.WithProject(project.URL, project.APIKey, project.APISecret))
497+
agentsClient, err = cloudagents.New(cloudagents.WithProject(project.URL, project.APIKey, project.APISecret))
497498
if err != nil {
498499
return err
499500
}

go.mod

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module github.com/livekit/livekit-cli/v2
22

33
go 1.25.0
44

5+
replace github.com/livekit/server-sdk-go/v2 => ../server-sdk-go
6+
57
require (
68
github.com/BurntSushi/toml v1.5.0
79
github.com/Masterminds/semver/v3 v3.4.0
@@ -12,13 +14,12 @@ require (
1214
github.com/go-logr/logr v1.4.3
1315
github.com/go-task/task/v3 v3.44.1
1416
github.com/joho/godotenv v1.5.1
15-
github.com/livekit/protocol v1.42.1-0.20251014173106-16ec4db9f66a
17+
github.com/livekit/protocol v1.42.2-0.20251016024155-8cf58ff15ac6
1618
github.com/livekit/server-sdk-go/v2 v2.11.4-0.20251009161714-f90dc6f3d8bb
17-
github.com/moby/buildkit v0.23.2
1819
github.com/moby/patternmatcher v0.6.0
1920
github.com/pion/rtcp v1.2.15
20-
github.com/pion/rtp v1.8.22
21-
github.com/pion/webrtc/v4 v4.1.5-0.20250828044558-c376d0edf977
21+
github.com/pion/rtp v1.8.23
22+
github.com/pion/webrtc/v4 v4.1.6
2223
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
2324
github.com/pkg/errors v0.9.1
2425
github.com/schollz/progressbar/v3 v3.18.0
@@ -28,13 +29,13 @@ require (
2829
go.uber.org/atomic v1.11.0
2930
golang.org/x/sync v0.17.0
3031
golang.org/x/time v0.12.0
31-
google.golang.org/protobuf v1.36.9
32+
google.golang.org/protobuf v1.36.10
3233
gopkg.in/yaml.v3 v3.0.1
3334
k8s.io/apimachinery v0.33.4
3435
)
3536

3637
require (
37-
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.9-20250912141014-52f32327d4b0.1 // indirect
38+
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20250912141014-52f32327d4b0.1 // indirect
3839
buf.build/go/protovalidate v1.0.0 // indirect
3940
buf.build/go/protoyaml v0.6.0 // indirect
4041
cel.dev/expr v0.24.0 // indirect
@@ -43,7 +44,6 @@ require (
4344
github.com/Microsoft/go-winio v0.6.2 // indirect
4445
github.com/ProtonMail/go-crypto v1.3.0 // indirect
4546
github.com/alecthomas/chroma/v2 v2.19.0 // indirect
46-
github.com/anchore/go-struct-converter v0.0.0-20230627203149-c72ef8859ca9 // indirect
4747
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
4848
github.com/atotto/clipboard v0.1.4 // indirect
4949
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
@@ -63,7 +63,7 @@ require (
6363
github.com/cloudflare/circl v1.6.1 // indirect
6464
github.com/containerd/console v1.0.5 // indirect
6565
github.com/containerd/containerd/api v1.9.0 // indirect
66-
github.com/containerd/containerd/v2 v2.1.3 // indirect
66+
github.com/containerd/containerd/v2 v2.1.4 // indirect
6767
github.com/containerd/continuity v0.4.5 // indirect
6868
github.com/containerd/errdefs v1.0.0 // indirect
6969
github.com/containerd/errdefs/pkg v0.3.0 // indirect
@@ -94,7 +94,6 @@ require (
9494
github.com/go-logr/stdr v1.2.2 // indirect
9595
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
9696
github.com/go-task/template v0.2.0 // indirect
97-
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
9897
github.com/gofrs/flock v0.12.1 // indirect
9998
github.com/gogo/protobuf v1.3.2 // indirect
10099
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
@@ -105,9 +104,7 @@ require (
105104
github.com/google/uuid v1.6.0 // indirect
106105
github.com/gorilla/websocket v1.5.3 // indirect
107106
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 // indirect
108-
github.com/hashicorp/errwrap v1.1.0 // indirect
109107
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
110-
github.com/hashicorp/go-multierror v1.1.1 // indirect
111108
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
112109
github.com/in-toto/in-toto-golang v0.9.0 // indirect
113110
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
@@ -127,31 +124,32 @@ require (
127124
github.com/mattn/go-runewidth v0.0.16 // indirect
128125
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
129126
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
127+
github.com/moby/buildkit v0.25.1 // indirect
130128
github.com/moby/locker v1.0.1 // indirect
131129
github.com/moby/sys/signal v0.7.1 // indirect
132130
github.com/morikuni/aec v1.0.0 // indirect
133131
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
134132
github.com/muesli/cancelreader v0.2.2 // indirect
135133
github.com/muesli/termenv v0.16.0 // indirect
136134
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
137-
github.com/nats-io/nats.go v1.46.0 // indirect
135+
github.com/nats-io/nats.go v1.47.0 // indirect
138136
github.com/nats-io/nkeys v0.4.11 // indirect
139137
github.com/nats-io/nuid v1.0.1 // indirect
140138
github.com/opencontainers/go-digest v1.0.0 // indirect
141139
github.com/opencontainers/image-spec v1.1.1 // indirect
142-
github.com/opencontainers/runc v1.2.3 // indirect
140+
github.com/pelletier/go-toml v1.9.5 // indirect
143141
github.com/pion/datachannel v1.5.10 // indirect
144142
github.com/pion/dtls/v3 v3.0.7 // indirect
145143
github.com/pion/ice/v4 v4.0.10 // indirect
146144
github.com/pion/interceptor v0.1.41 // indirect
147145
github.com/pion/logging v0.2.4 // indirect
148146
github.com/pion/mdns/v2 v2.0.7 // indirect
149147
github.com/pion/randutil v0.1.0 // indirect
150-
github.com/pion/sctp v1.8.39 // indirect
148+
github.com/pion/sctp v1.8.40 // indirect
151149
github.com/pion/sdp/v3 v3.0.16 // indirect
152-
github.com/pion/srtp/v3 v3.0.7 // indirect
150+
github.com/pion/srtp/v3 v3.0.8 // indirect
153151
github.com/pion/stun/v3 v3.0.0 // indirect
154-
github.com/pion/transport/v3 v3.0.7 // indirect
152+
github.com/pion/transport/v3 v3.0.8 // indirect
155153
github.com/pion/turn/v4 v4.1.1 // indirect
156154
github.com/pjbgf/sha1cd v0.4.0 // indirect
157155
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
@@ -182,7 +180,7 @@ require (
182180
github.com/zeebo/xxh3 v1.0.2 // indirect
183181
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
184182
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
185-
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.56.0 // indirect
183+
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0 // indirect
186184
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
187185
go.opentelemetry.io/otel v1.37.0 // indirect
188186
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect
@@ -193,16 +191,16 @@ require (
193191
go.uber.org/multierr v1.11.0 // indirect
194192
go.uber.org/zap v1.27.0 // indirect
195193
go.uber.org/zap/exp v0.3.0 // indirect
196-
golang.org/x/crypto v0.42.0 // indirect
197-
golang.org/x/exp v0.0.0-20250911091902-df9299821621 // indirect
198-
golang.org/x/mod v0.28.0 // indirect
199-
golang.org/x/net v0.44.0 // indirect
200-
golang.org/x/sys v0.36.0 // indirect
201-
golang.org/x/term v0.35.0 // indirect
202-
golang.org/x/text v0.29.0 // indirect
203-
google.golang.org/genproto/googleapis/api v0.0.0-20250922171735-9219d122eba9 // indirect
204-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9 // indirect
205-
google.golang.org/grpc v1.75.1 // indirect
194+
golang.org/x/crypto v0.43.0 // indirect
195+
golang.org/x/exp v0.0.0-20251009144603-d2f985daa21b // indirect
196+
golang.org/x/mod v0.29.0 // indirect
197+
golang.org/x/net v0.46.0 // indirect
198+
golang.org/x/sys v0.37.0 // indirect
199+
golang.org/x/term v0.36.0 // indirect
200+
golang.org/x/text v0.30.0 // indirect
201+
google.golang.org/genproto/googleapis/api v0.0.0-20251014184007-4626949a642f // indirect
202+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f // indirect
203+
google.golang.org/grpc v1.76.0 // indirect
206204
gopkg.in/inf.v0 v0.9.1 // indirect
207205
gopkg.in/warnings.v0 v0.1.2 // indirect
208206
mvdan.cc/sh/v3 v3.12.0 // indirect

0 commit comments

Comments
 (0)