Commit Graph
984 Commits
Author SHA1 Message Date
shishirngandCursor a1be640b12 Participant kind agent details (#4809)
* Carry worker kind details into agent job tokens.

WorkerRegistration gains a server-controlled KindDetails field that is
passed to BuildAgentToken when assigning jobs, so kind details flow into
the participant join token for the whole session.

Co-authored-by: Cursor <cursoragent@cursor.com>

Signed-off-by: shishir gowda <shishir@livekit.io>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 08:02:17 -04:00
renovate[bot] 5c7713b336 Update github.com/livekit/mediatransportutil digest to f234b53 (#4785)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-24 14:06:04 -07:00
Genseric 788d4c3544 TEL-912 Adding response for TransferSIPParticipant rpc (#4783)
* Replacing empty return type with rpc.CreateIngressResponse and livekit.TransferSIPParticipantResponse

* removing ambiguous comment
2026-08-21 14:27:06 -04:00
David Colburn 502ad1bc76 bump protocol for passthrough + UpdateEgress removal (#4774) 2026-08-19 07:55:09 -04:00
dependabot[bot] 636214a6b0 Bump github.com/cilium/ebpf in the go_modules group across 1 directory (#4770)
Bumps the go_modules group with 1 update in the / directory: [github.com/cilium/ebpf](https://github.com/cilium/ebpf).


Updates `github.com/cilium/ebpf` from 0.16.0 to 0.22.0
- [Commits](https://github.com/cilium/ebpf/compare/v0.16.0...v0.22.0)

---
updated-dependencies:
- dependency-name: github.com/cilium/ebpf
  dependency-version: 0.22.0
  dependency-type: indirect
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-17 11:50:54 -07:00
Benjamin Pracht 2cad1cc936 Update renovate and pinning behavior, run tools from go.mod (#4759)
- Renovate

config:recommended (config:base is deprecated) and matchPackageNames globs instead of the deprecated matchPackagePrefixes.
Vulnerability alerts get a fast path: 2-day quarantine, no concurrency/hourly/schedule limits.
Go modules are no longer grouped into one "go deps" PR — each gets its own, so a bad bump can be reverted alone. The pion modules stay grouped as a documented exception: they're co-released and interdependent, so individual PRs wouldn't build.
First-party github.com/livekit/** skips the 2-week quarantine.
go.mod's go directive is no longer an update target — the build toolchain is pinned in the Dockerfile instead.
Dockerfile deps get pinDigests; the golang image is ungrouped with separateMinorPatch so a patch and a minor bump are each separately approvable.
Custom manager to bump the builder image's -alpineA.B suffix together with its digest, which the stock docker manager holds fixed.

- Pinning

Both Dockerfiles pin golang and alpine by digest alongside the readable tag.
GOTOOLCHAIN=local so a go.mod bump fails loudly instead of silently downloading a different toolchain.
apk upgrade in the runtime stage — a digest pin plus the 2-week quarantine would otherwise ship base-package CVEs Alpine has already fixed. This relies on a cold layer cache, which holds today because the release workflow configures no buildx cache; there's a comment saying so.
Workflows resolve the Go version from the Dockerfile via .github/scripts/go-version.sh, so tests, releases and images share one toolchain.

- Tools

All four code generators now come from the module graph, and tools/tools.go (the pre-Go-1.24 blank-import idiom) is replaced by go.mod tool directives:

tool	how	why
goimports	go tool	lives in x/tools — its own module is the one being selected
gotestfmt	go tool	zero dependencies, nothing to skew
wire	go run	pins x/tools v0.24.1; building it in our graph changes its output
counterfeiter	go run	unchanged, matches its //go:generate directives

The wire distinction is load-bearing. Building wire inside our module raises it from the x/tools v0.24.1 it pins to our v0.48.0, and that module version difference changes what it generates: it falls back to v/v2/v3 instead of deriving real identifiers from the type. wire_gen.go is regenerated here to match the in-module build — a cosmetic rename of 9 lines, with no other change to the generated code.

golangci-lint deliberately keeps its action rather than becoming a tool: it pins its own x/tools (v0.44.0 vs our v0.48.0) for the analyzers it bundles, adding it to go.mod would double our go.mod/go.sum (158→338 / 441→889 lines), and the action supplies caching, only-new-issues and PR annotations that invoking a binary can't. Its version stays manual by request.
2026-08-17 09:25:02 -07:00
renovate[bot] 70d2df837b Update module github.com/moby/moby/client to v0.5.1 (#4769)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-16 21:59:43 -07:00
Milos PesicandClaude Fable 5 b0e2d89826 Redact stream keys in UpdateStream API log fields (#4763)
* Redact stream keys in UpdateStream API log fields

UpdateStream add/remove urls were logged raw into the API request log,
including rtmp stream keys and mux/twitch shorthand keys. Redact them
with utils.RedactStreamKey before appending log fields.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Bump protocol for query-value redaction fallback

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 14:19:30 +02:00
cnderrauber dbe06aa8d1 Experimental WARP (#4649)
* Experimental WARP

* fix panic

* go dep

* stats
2026-08-14 16:26:08 +08:00
cnderrauber fad2cc4afe Use request id to make api idempotence on sdk retry (#4694)
* Use request id to make api idempotence on sdk retry

Derive resource id from request id
2026-08-12 09:28:39 +08:00
Raja Subramanian 52ef3cd649 Include data track susbcriptions in WaitForSubscription. (#4727) 2026-08-05 13:28:48 +05:30
cnderrauber 4d177cb01b Remove H.264 baseline (42001f) from default enabled codecs (#4723)
Users can explicitly enable this profile if they are certain that all device support it.
2026-08-04 11:12:42 +08:00
cnderrauber 436a0cc3d3 Support more h264 profiles (#4708)
* Register h264 main profile if enabled explicitly

We don't support the h264 main profile for compatibility,
user can enabled it by set fmtp explicitly in codec config
to enable it if want to use it in special scenario.

* go mod
2026-07-28 16:18:19 +08:00
Raja Subramanian f1e2eee2fe protocol update with webhook status logging (#4700) 2026-07-27 01:57:10 +05:30
Raja Subramanian dfd3a3c4a5 protocol deps for logging webhook status (#4699) 2026-07-27 01:00:51 +05:30
renovate[bot] a0d6e72017 Update go deps (#4645)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-25 23:23:56 -07:00
Raja Subramanian 13e4aaec2b Tests for down stream packet push. (#4692)
* Tests for down stream packet push.

A recent issue (padding bit in RTP header) surfaced a gap which slipped
through due to lack of tests. Changes in pion/rtp were not adopted
properly.

So, adding some tests (thank you Claude for the heavy lifting) to test
the down stream packet path using the whole pion chain.

Split out some interfaces so it is easier to have it all in one place
and create fakes.

Will help adding more tests, for example include the upstream path also
in the integration test. May have to create more interfaces and make
things testable, but this is a start.

* missed file

* rtx specific test
2026-07-20 20:15:07 +05:30
Alex Fish a1033e4242 Bump protocol version to fix call to Validate. (#4686) 2026-07-17 12:19:33 -07:00
Chenghao Mou 28931e2f84 add redaction flag in Job (#4650)
* add redaction flag in Job

* update dependencies
2026-07-17 14:42:00 +01:00
Alex Fish cc87a83e1f TEL-730: Log soft validation errors. (#4671) 2026-07-15 09:06:01 -07:00
Raja Subramanian d4888f7d2a Update pion/ice to deal with hang on close. (#4672)
Potential cause of #4549, #4591
2026-07-15 14:14:49 +05:30
Raja Subramanian 788b01bc5c protocol deps to get parallel exec alloc reduction (#4662) 2026-07-12 14:34:12 +05:30
Denys Smirnov a4bea6981a Update protocol. (#4648) 2026-07-08 19:27:00 +02:00
Jacob Gelman fcc46d3c45 Use camel case log name in DataBlobKey (#4633) 2026-06-29 21:33:55 -07:00
Jacob Gelmanandboks1971 a47e21b6cb Data track schema metadata (#4622)
* Async attributes on participant.

How it is different from existing participant attributes?
1. Async attribute can be added one at a time.
2. These are not included in `ParticipantInfo`.
3. Get an attribute bt participant identity and async attribute ID as
   and when needed.

* clean up

* get full definitions, not just ids

* listener OnDataTrackSchema

* name length config

* data blob

* deps

* static check

* Add missing request ID

* Update protocol commit

* Wire up StoreDataBlobResponse

* Pass request ID through in GetDataBlobResponse

* Pin protocol for schema metadata

* Pass through schema and frame encoding

* Support custom encoding identifiers

* Rename config key

* Increase default length to 32

* Make log messages more generic

* Use getters with built-in null check

* Do not bump deps

* Rename function

* Use protocol v1.48.1 release

---------

Co-authored-by: boks1971 <raja.gobi@tutanota.com>
2026-06-29 10:44:08 -07:00
cnderrauber 2aec61c11b update webrtc to fix interop issue with bundled datachannel (#4631) 2026-06-29 10:33:51 +08:00
renovate[bot] 930a2b6ad7 Update module github.com/urfave/cli/v3 to v3.10.0 (#4612)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-28 14:57:35 -07:00
cnderrauber eb3de092f0 update pion/sctp (#4623)
* update pion/sctp

* webrtc & datachannel
2026-06-25 21:43:07 +08:00
Raja SubramanianandJacob Gelman 1faab0c48e Add support for data blob (a. k. a. async participant attributes) (#4619)
* Async attributes on participant.

How it is different from existing participant attributes?
1. Async attribute can be added one at a time.
2. These are not included in `ParticipantInfo`.
3. Get an attribute bt participant identity and async attribute ID as
   and when needed.

* clean up

* get full definitions, not just ids

* listener OnDataTrackSchema

* name length config

* data blob

* deps

* static check

* Add missing request ID

* Update protocol commit

* Wire up StoreDataBlobResponse

* Pass request ID through in GetDataBlobResponse

* deps

* atomic

* sctp at 1.9.5

* remove proto clone

---------

Co-authored-by: Jacob Gelman <3182119+ladvoc@users.noreply.github.com>
2026-06-24 14:42:37 +05:30
Raja Subramanian 1b69630a28 Prometheus metric for join latency. (#4616)
* Prometheus metric for join latency.

Also including a couple of other failures in the signal connection path
and moving the signal connected to after all that.

Not doing counters for the new signal failure paths. I should not have
done for the other two I added a little while ago also (
validation failure and start participant failure) as those are not
scalable to keep adding to node stats. Will probably remove those two
from node stats later. Can add those counters if they are useful.

* deprecate signal failed counters
2026-06-22 22:07:32 +05:30
Ryan Gaus 86a79f83fc fix: report participant capabilities in ParticipantInfo (#4606) 2026-06-22 09:23:33 -04:00
Denys Smirnov 35b5390c27 Update protocol. (#4601) 2026-06-18 13:29:21 +02:00
Paul Wells 12a023ae45 agent: thread attributes map from dispatch to job (#4598)
* agent: thread simulation flag from dispatch to job

Reads simulation from AgentDispatch / RoomAgentDispatch and copies it
onto Job in agent.LaunchJob and the inline room-agent path so workers
see the flag.

Stacked on top of livekit/protocol#1629.

* agent: replace simulation bool with attributes map

Threads the renamed attributes map (was bool simulation) from dispatch
to job and bumps the protocol pseudo-version.

* deps
2026-06-16 01:53:01 -07:00
08ab361e8e [WIP] rtc: add RestartSessionTimer to re-anchor participant session duration (#4566)
* rtc: add RestartSessionTimer to re-anchor participant session duration

Exposes ParticipantImpl.RestartSessionTimer so the session timer can be
re-anchored to the actual join time. Duration is only ever emitted once
the participant becomes active, so re-anchoring at join keeps pre-join
wall-clock out of the reported/billed duration. Adds the method to the
LocalParticipant interface (fake regenerated) and a local protocol
replace to pick up SessionTimer.Reset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* tidy

* update protocol

* report ended at for inactive sessions

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Paul Wells <paulwe@gmail.com>
2026-06-11 10:02:25 -07:00
Raja Subramanian 8efc94eb68 Update DTLS to v3.1.4 (#4587) 2026-06-11 12:23:55 +05:30
cnderrauber 7dc6877738 Preserve original expiry when refreshing token (#4580)
To avoid shortening the token expiration time during
refreshing cause client reconnect failed after network
down for a long time (>5min).
2026-06-10 14:51:10 +08:00
Raja Subramanian fd452212c7 Update mediatransportutil to get ICE candidate timeout config (#4572) 2026-06-08 12:42:58 +05:30
renovate[bot] c4e41872c5 Update go deps to v1.17.2 (#4462)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-07 23:08:05 -07:00
renovate[bot]andDavid Zhao dc8e0310ad Update go deps to v4 (#4482)
* Update go deps to v4

Generated by renovateBot

* update dockertest to v4

* fix

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: David Zhao <dz@livekit.io>
2026-06-07 23:07:40 -07:00
Raja Subramanian 6590570d7c Pin pion/dtls to v3.1.2 (#4570) 2026-06-06 20:36:10 +05:30
Paul Wells cdbbee1f8e deps: bump protocol + psrpc to latest tips (#4565)
* deps: bump psrpc + protocol + cloud-protocol + backend-common to latest

* deps: go get -u sweep + bump counterfeiter

Direct deps bumped via go get -u ./...:
  clipperhouse/displaywidth 0.10.0 -> 0.11.0
  clipperhouse/uax29/v2 2.6.0 -> 2.7.0
  fatih/color 1.18.0 -> 1.19.0
  florianl/go-tc 0.4.7 -> 0.4.8
  hashicorp/go-version 1.8.0 -> 1.9.0
  livekit/protocol -> a7a83da5 (latest)
  ua-parser bumped
  urfave/cli/v3 3.8.0 -> 3.9.0
  otel/sdk 1.43.0 -> 1.44.0
  yaml.in/yaml/v2 2.4.2 -> 2.4.4

Indirect: mdlayher/netlink + socket bumped, mattn/* bumped, olekukonko/*
bumped, counterfeiter v6.11.1 -> v6.12.2.

Newer-major audit: no actionable majors. +incompatible: twitchtv/twirp
v8.1.3 (upstream choice, stays); docker/cli and docker/docker indirect.

Notable stuck patterns worth a separate cleanup:
- pkg/errors v0.9.1 direct dep (unmaintained; stdlib supplants)
- go.uber.org/atomic + multierr direct deps
- ory/dockertest/v3 v3.12.0 (v4 is available — cascade has migrated
  cloud-protocol, backend-common, psrpc to v4).

* deps: pin pion/webrtc/v4 v4.2.11 + pion/sctp v1.9.5

* deps: pin protocol+psrpc+MTU to landed versions
2026-06-05 14:48:51 -07:00
Raja Subramanian 835ef1b353 Metrics for participant active, i. e. fully established. (#4557)
* Metrics for participant active, i. e. fully established.

- Egress stub for v2 API
- Fix the participant canceled counter 🤦
- Add active counter -> this is increment when a participant becomes
  active, i. e. primary peer connection established. Can be used to
  monitor node wise connection establishment issues.
- Add singnalling validation fail counter.

With this, we have
- signalling validation fail
- signalling failed --> this is when the `startSession` fails
- signalling connected -> signalling is succesful and can send back
  joinResponse to client

on media connection side
- rtc_init -> start
- rtc_connected -> participant session created (joined)
- rtc_active -> primay peer connection established
- rtc_canceled -> could not proceed with RTC connection due to not being
  able to resume.

* signalling counters deps

* revert pion/webrtc to 4.2.12 to get SCTP without interleaving

* go back to pion/webrtc 4.2.11 and sctp 1.9.5
2026-06-03 19:50:19 +05:30
cnderrauber 356ae211a3 Config documentation for advertise_internal_ip and skip_external_ip_validation (#4552)
See https://github.com/livekit/mediatransportutil/pull/88
2026-06-01 14:37:08 +08:00
Raja Subramanian 062d12197f Use NACKQuueInterface type. (#4538)
And some extra logging for subscription permission when it fails.
2026-05-21 23:00:51 +05:30
Paul Wells 019a6640ae rtc: report participant kind code and details (#4534)
* rtc: report participant kind code and details

Plumb ParticipantKind and KindDetails through MediaTrack and
BytesTrackStats so track-level reporting can record the numeric kind
code plus details codes on every participant_session aggregation,
alongside the existing Kind string. Also picks up the new kind fields
on resolved BytesSignalStats participants.

Adds deployment/agentID/version to the agent worker logger.
2026-05-18 23:20:52 -07:00
cnderrauber 89faaeba82 Apply ttl check only when authenticate allocation creating (#4526)
* Apply ttl check only when authenticate allocation creating

TTL check could reject allocation/persmission refresh in
security enhancement #4505, cause long-live session disconnect
when turn credential is expired.
Only check ttl on allocation creating to prevent abusing leaked
credential but keep long-live session work.
2026-05-15 14:55:05 +08:00
Denys Smirnov 8b79ec9e47 Support SIP auth realm for inbound. (#4522) 2026-05-14 10:45:16 +02:00
Raja SubramanianandClaude Opus 4.7 4b8db3cfe5 Add integration test for TURN auth failures (#4524)
* Add integration test for TURN auth failures

Covers four credential-corruption scenarios against the TURN server
embedded in a single-node server: unparseable username, wrong password,
expired username, and unknown API key. Each case drives a raw pion
turn.Client Allocate and asserts the server rejects with a TURN error.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* TURN auth test: cover password expiry binding

The TURN password's hash includes the expiry along with the secret and
participant ID. Add two cases that exercise this binding: a password
generated for a different expiry than the username's, and a password
generated without any expiry component paired with a username that has
one.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 10:48:27 +05:30
Denys Smirnov ba366fc712 Fix SIP media config upgrade. (#4511) 2026-05-07 10:12:45 +02:00
Paul Wells 8fbc5adfce update protocol for protojson (#4510) 2026-05-07 00:55:00 -07:00