Skip to content

Commit 4cf1474

Browse files
davidzhaogithub-actions[bot]github-advanced-security[bot]
authored
update rust ffi to 0.12.43 (#589)
* update rust ffi to 0.12.43 * action to generate protobuf * commit changes * node 24 * generated protobuf * Potential fix for code scanning alert no. 10: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update Rust FFI to version 0.12.43 Update the Rust FFI version to 0.12.43. --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 2ffe89b commit 4cf1474

File tree

15 files changed

+292
-21
lines changed

15 files changed

+292
-21
lines changed

.changeset/weak-hounds-help.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@livekit/rtc-node": patch
3+
---
4+
5+
update rust ffi to 0.12.43

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
rtc_build: ${{ steps.changes.outputs.rtc_build }}
3434
server_sdk_build: ${{ steps.changes.outputs.server_sdk_build }}
3535
steps:
36-
- uses: actions/checkout@v4
36+
- uses: actions/checkout@v6
3737
- uses: dorny/paths-filter@v3
3838
id: paths
3939
with:

.github/workflows/proto.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Generate protobuf stubs
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
pull_request:
8+
branches:
9+
- main
10+
# If rust-sdks is a git submodule, GitHub sees updates as a change to the
11+
# gitlink at the submodule path (not files under it), so include the bare
12+
# path. If it's checked into the repo normally, the ** pattern will match.
13+
paths:
14+
- 'packages/livekit-rtc/rust-sdks'
15+
- 'packages/livekit-rtc/rust-sdks/**'
16+
17+
jobs:
18+
generate-proto:
19+
name: Regenerate protobuf stubs
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v6
24+
with:
25+
submodules: recursive
26+
ref: ${{ github.event.pull_request.head.ref }}
27+
28+
- uses: pnpm/action-setup@v4
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 24
34+
cache: pnpm
35+
36+
- name: Install Protoc
37+
uses: arduino/setup-protoc@v3
38+
with:
39+
version: '25.1'
40+
repo-token: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Install dependencies
43+
run: pnpm install
44+
45+
- name: Generate stubs
46+
run: ./generate_proto.sh
47+
working-directory: packages/livekit-rtc
48+
49+
- name: Add changes
50+
uses: EndBug/add-and-commit@v9
51+
with:
52+
add: '["packages/livekit-rtc"]'
53+
default_author: github_actions
54+
message: generated protobuf

packages/livekit-rtc/rust-sdks

Submodule rust-sdks updated 406 files

packages/livekit-rtc/src/proto/audio_frame_pb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 LiveKit, Inc.
1+
// Copyright 2025 LiveKit, Inc.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/livekit-rtc/src/proto/e2ee_pb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 LiveKit, Inc.
1+
// Copyright 2025 LiveKit, Inc.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/livekit-rtc/src/proto/ffi_pb.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 LiveKit, Inc.
1+
// Copyright 2025 LiveKit, Inc.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@ import { CaptureVideoFrameRequest, CaptureVideoFrameResponse, NewVideoSourceRequ
2525
import { ApmProcessReverseStreamRequest, ApmProcessReverseStreamResponse, ApmProcessStreamRequest, ApmProcessStreamResponse, ApmSetStreamDelayRequest, ApmSetStreamDelayResponse, AudioStreamEvent, AudioStreamFromParticipantRequest, AudioStreamFromParticipantResponse, CaptureAudioFrameCallback, CaptureAudioFrameRequest, CaptureAudioFrameResponse, ClearAudioBufferRequest, ClearAudioBufferResponse, FlushSoxResamplerRequest, FlushSoxResamplerResponse, LoadAudioFilterPluginRequest, LoadAudioFilterPluginResponse, NewApmRequest, NewApmResponse, NewAudioResamplerRequest, NewAudioResamplerResponse, NewAudioSourceRequest, NewAudioSourceResponse, NewAudioStreamRequest, NewAudioStreamResponse, NewSoxResamplerRequest, NewSoxResamplerResponse, PushSoxResamplerRequest, PushSoxResamplerResponse, RemixAndResampleRequest, RemixAndResampleResponse } from "./audio_frame_pb.js";
2626
import { E2eeRequest, E2eeResponse } from "./e2ee_pb.js";
2727
import { PerformRpcCallback, PerformRpcRequest, PerformRpcResponse, RegisterRpcMethodRequest, RegisterRpcMethodResponse, RpcMethodInvocationEvent, RpcMethodInvocationResponseRequest, RpcMethodInvocationResponseResponse, UnregisterRpcMethodRequest, UnregisterRpcMethodResponse } from "./rpc_pb.js";
28-
import { EnableRemoteTrackPublicationRequest, EnableRemoteTrackPublicationResponse, UpdateRemoteTrackPublicationDimensionRequest, UpdateRemoteTrackPublicationDimensionResponse } from "./track_publication_pb.js";
28+
import { EnableRemoteTrackPublicationRequest, EnableRemoteTrackPublicationResponse, SetRemoteTrackPublicationQualityRequest, SetRemoteTrackPublicationQualityResponse, UpdateRemoteTrackPublicationDimensionRequest, UpdateRemoteTrackPublicationDimensionResponse } from "./track_publication_pb.js";
2929
import { ByteStreamOpenCallback, ByteStreamOpenRequest, ByteStreamOpenResponse, ByteStreamReaderEvent, ByteStreamReaderReadAllCallback, ByteStreamReaderReadAllRequest, ByteStreamReaderReadAllResponse, ByteStreamReaderReadIncrementalRequest, ByteStreamReaderReadIncrementalResponse, ByteStreamReaderWriteToFileCallback, ByteStreamReaderWriteToFileRequest, ByteStreamReaderWriteToFileResponse, ByteStreamWriterCloseCallback, ByteStreamWriterCloseRequest, ByteStreamWriterCloseResponse, ByteStreamWriterWriteCallback, ByteStreamWriterWriteRequest, ByteStreamWriterWriteResponse, StreamSendBytesCallback, StreamSendBytesRequest, StreamSendBytesResponse, StreamSendFileCallback, StreamSendFileRequest, StreamSendFileResponse, StreamSendTextCallback, StreamSendTextRequest, StreamSendTextResponse, TextStreamOpenCallback, TextStreamOpenRequest, TextStreamOpenResponse, TextStreamReaderEvent, TextStreamReaderReadAllCallback, TextStreamReaderReadAllRequest, TextStreamReaderReadAllResponse, TextStreamReaderReadIncrementalRequest, TextStreamReaderReadIncrementalResponse, TextStreamWriterCloseCallback, TextStreamWriterCloseRequest, TextStreamWriterCloseResponse, TextStreamWriterWriteCallback, TextStreamWriterWriteRequest, TextStreamWriterWriteResponse } from "./data_stream_pb.js";
3030

3131
/**
@@ -492,6 +492,12 @@ export class FfiRequest extends Message<FfiRequest> {
492492
*/
493493
value: StreamSendBytesRequest;
494494
case: "sendBytes";
495+
} | {
496+
/**
497+
* @generated from field: livekit.proto.SetRemoteTrackPublicationQualityRequest set_remote_track_publication_quality = 68;
498+
*/
499+
value: SetRemoteTrackPublicationQualityRequest;
500+
case: "setRemoteTrackPublicationQuality";
495501
} | { case: undefined; value?: undefined } = { case: undefined };
496502

497503
constructor(data?: PartialMessage<FfiRequest>) {
@@ -568,6 +574,7 @@ export class FfiRequest extends Message<FfiRequest> {
568574
{ no: 65, name: "text_stream_write", kind: "message", T: TextStreamWriterWriteRequest, oneof: "message" },
569575
{ no: 66, name: "text_stream_close", kind: "message", T: TextStreamWriterCloseRequest, oneof: "message" },
570576
{ no: 67, name: "send_bytes", kind: "message", T: StreamSendBytesRequest, oneof: "message" },
577+
{ no: 68, name: "set_remote_track_publication_quality", kind: "message", T: SetRemoteTrackPublicationQualityRequest, oneof: "message" },
571578
]);
572579

573580
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FfiRequest {
@@ -1006,6 +1013,12 @@ export class FfiResponse extends Message<FfiResponse> {
10061013
*/
10071014
value: StreamSendBytesResponse;
10081015
case: "sendBytes";
1016+
} | {
1017+
/**
1018+
* @generated from field: livekit.proto.SetRemoteTrackPublicationQualityResponse set_remote_track_publication_quality = 67;
1019+
*/
1020+
value: SetRemoteTrackPublicationQualityResponse;
1021+
case: "setRemoteTrackPublicationQuality";
10091022
} | { case: undefined; value?: undefined } = { case: undefined };
10101023

10111024
constructor(data?: PartialMessage<FfiResponse>) {
@@ -1081,6 +1094,7 @@ export class FfiResponse extends Message<FfiResponse> {
10811094
{ no: 64, name: "text_stream_write", kind: "message", T: TextStreamWriterWriteResponse, oneof: "message" },
10821095
{ no: 65, name: "text_stream_close", kind: "message", T: TextStreamWriterCloseResponse, oneof: "message" },
10831096
{ no: 66, name: "send_bytes", kind: "message", T: StreamSendBytesResponse, oneof: "message" },
1097+
{ no: 67, name: "set_remote_track_publication_quality", kind: "message", T: SetRemoteTrackPublicationQualityResponse, oneof: "message" },
10841098
]);
10851099

10861100
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FfiResponse {

packages/livekit-rtc/src/proto/handle_pb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 LiveKit, Inc.
1+
// Copyright 2025 LiveKit, Inc.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/livekit-rtc/src/proto/participant_pb.ts

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 LiveKit, Inc.
1+
// Copyright 2025 LiveKit, Inc.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -49,6 +49,11 @@ export enum ParticipantKind {
4949
* @generated from enum value: PARTICIPANT_KIND_AGENT = 4;
5050
*/
5151
AGENT = 4,
52+
53+
/**
54+
* @generated from enum value: PARTICIPANT_KIND_CONNECTOR = 5;
55+
*/
56+
CONNECTOR = 5,
5257
}
5358
// Retrieve enum metadata with: proto2.getEnumType(ParticipantKind)
5459
proto2.util.setEnumType(ParticipantKind, "livekit.proto.ParticipantKind", [
@@ -57,6 +62,39 @@ proto2.util.setEnumType(ParticipantKind, "livekit.proto.ParticipantKind", [
5762
{ no: 2, name: "PARTICIPANT_KIND_EGRESS" },
5863
{ no: 3, name: "PARTICIPANT_KIND_SIP" },
5964
{ no: 4, name: "PARTICIPANT_KIND_AGENT" },
65+
{ no: 5, name: "PARTICIPANT_KIND_CONNECTOR" },
66+
]);
67+
68+
/**
69+
* @generated from enum livekit.proto.ParticipantKindDetail
70+
*/
71+
export enum ParticipantKindDetail {
72+
/**
73+
* @generated from enum value: PARTICIPANT_KIND_DETAIL_CLOUD_AGENT = 0;
74+
*/
75+
CLOUD_AGENT = 0,
76+
77+
/**
78+
* @generated from enum value: PARTICIPANT_KIND_DETAIL_FORWARDED = 1;
79+
*/
80+
FORWARDED = 1,
81+
82+
/**
83+
* @generated from enum value: PARTICIPANT_KIND_DETAIL_CONNECTOR_WHATSAPP = 2;
84+
*/
85+
CONNECTOR_WHATSAPP = 2,
86+
87+
/**
88+
* @generated from enum value: PARTICIPANT_KIND_DETAIL_CONNECTOR_TWILIO = 3;
89+
*/
90+
CONNECTOR_TWILIO = 3,
91+
}
92+
// Retrieve enum metadata with: proto2.getEnumType(ParticipantKindDetail)
93+
proto2.util.setEnumType(ParticipantKindDetail, "livekit.proto.ParticipantKindDetail", [
94+
{ no: 0, name: "PARTICIPANT_KIND_DETAIL_CLOUD_AGENT" },
95+
{ no: 1, name: "PARTICIPANT_KIND_DETAIL_FORWARDED" },
96+
{ no: 2, name: "PARTICIPANT_KIND_DETAIL_CONNECTOR_WHATSAPP" },
97+
{ no: 3, name: "PARTICIPANT_KIND_DETAIL_CONNECTOR_TWILIO" },
6098
]);
6199

62100
/**
@@ -228,6 +266,11 @@ export class ParticipantInfo extends Message<ParticipantInfo> {
228266
*/
229267
disconnectReason?: DisconnectReason;
230268

269+
/**
270+
* @generated from field: repeated livekit.proto.ParticipantKindDetail kind_details = 8;
271+
*/
272+
kindDetails: ParticipantKindDetail[] = [];
273+
231274
constructor(data?: PartialMessage<ParticipantInfo>) {
232275
super();
233276
proto2.util.initPartial(data, this);
@@ -243,6 +286,7 @@ export class ParticipantInfo extends Message<ParticipantInfo> {
243286
{ no: 5, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
244287
{ no: 6, name: "kind", kind: "enum", T: proto2.getEnumType(ParticipantKind), req: true },
245288
{ no: 7, name: "disconnect_reason", kind: "enum", T: proto2.getEnumType(DisconnectReason), req: true },
289+
{ no: 8, name: "kind_details", kind: "enum", T: proto2.getEnumType(ParticipantKindDetail), repeated: true },
246290
]);
247291

248292
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ParticipantInfo {

packages/livekit-rtc/src/proto/room_pb.ts

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 LiveKit, Inc.
1+
// Copyright 2025 LiveKit, Inc.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -2700,12 +2700,6 @@ export class RoomEvent extends Message<RoomEvent> {
27002700
*/
27012701
value: ParticipantAttributesChanged;
27022702
case: "participantAttributesChanged";
2703-
} | {
2704-
/**
2705-
* @generated from field: livekit.proto.ParticipantEncryptionStatusChanged participant_encryption_status_changed = 39;
2706-
*/
2707-
value: ParticipantEncryptionStatusChanged;
2708-
case: "participantEncryptionStatusChanged";
27092703
} | {
27102704
/**
27112705
* @generated from field: livekit.proto.ConnectionQualityChanged connection_quality_changed = 20;
@@ -2834,6 +2828,18 @@ export class RoomEvent extends Message<RoomEvent> {
28342828
*/
28352829
value: ParticipantsUpdated;
28362830
case: "participantsUpdated";
2831+
} | {
2832+
/**
2833+
* @generated from field: livekit.proto.ParticipantEncryptionStatusChanged participant_encryption_status_changed = 39;
2834+
*/
2835+
value: ParticipantEncryptionStatusChanged;
2836+
case: "participantEncryptionStatusChanged";
2837+
} | {
2838+
/**
2839+
* @generated from field: livekit.proto.TokenRefreshed token_refreshed = 40;
2840+
*/
2841+
value: TokenRefreshed;
2842+
case: "tokenRefreshed";
28372843
} | { case: undefined; value?: undefined } = { case: undefined };
28382844

28392845
constructor(data?: PartialMessage<RoomEvent>) {
@@ -2863,7 +2869,6 @@ export class RoomEvent extends Message<RoomEvent> {
28632869
{ no: 17, name: "participant_metadata_changed", kind: "message", T: ParticipantMetadataChanged, oneof: "message" },
28642870
{ no: 18, name: "participant_name_changed", kind: "message", T: ParticipantNameChanged, oneof: "message" },
28652871
{ no: 19, name: "participant_attributes_changed", kind: "message", T: ParticipantAttributesChanged, oneof: "message" },
2866-
{ no: 39, name: "participant_encryption_status_changed", kind: "message", T: ParticipantEncryptionStatusChanged, oneof: "message" },
28672872
{ no: 20, name: "connection_quality_changed", kind: "message", T: ConnectionQualityChanged, oneof: "message" },
28682873
{ no: 21, name: "connection_state_changed", kind: "message", T: ConnectionStateChanged, oneof: "message" },
28692874
{ no: 22, name: "disconnected", kind: "message", T: Disconnected, oneof: "message" },
@@ -2883,6 +2888,8 @@ export class RoomEvent extends Message<RoomEvent> {
28832888
{ no: 36, name: "room_updated", kind: "message", T: RoomInfo, oneof: "message" },
28842889
{ no: 37, name: "moved", kind: "message", T: RoomInfo, oneof: "message" },
28852890
{ no: 38, name: "participants_updated", kind: "message", T: ParticipantsUpdated, oneof: "message" },
2891+
{ no: 39, name: "participant_encryption_status_changed", kind: "message", T: ParticipantEncryptionStatusChanged, oneof: "message" },
2892+
{ no: 40, name: "token_refreshed", kind: "message", T: TokenRefreshed, oneof: "message" },
28862893
]);
28872894

28882895
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RoomEvent {
@@ -4444,6 +4451,43 @@ export class Reconnected extends Message<Reconnected> {
44444451
}
44454452
}
44464453

4454+
/**
4455+
* @generated from message livekit.proto.TokenRefreshed
4456+
*/
4457+
export class TokenRefreshed extends Message<TokenRefreshed> {
4458+
/**
4459+
* @generated from field: required string token = 1;
4460+
*/
4461+
token?: string;
4462+
4463+
constructor(data?: PartialMessage<TokenRefreshed>) {
4464+
super();
4465+
proto2.util.initPartial(data, this);
4466+
}
4467+
4468+
static readonly runtime: typeof proto2 = proto2;
4469+
static readonly typeName = "livekit.proto.TokenRefreshed";
4470+
static readonly fields: FieldList = proto2.util.newFieldList(() => [
4471+
{ no: 1, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
4472+
]);
4473+
4474+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TokenRefreshed {
4475+
return new TokenRefreshed().fromBinary(bytes, options);
4476+
}
4477+
4478+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TokenRefreshed {
4479+
return new TokenRefreshed().fromJson(jsonValue, options);
4480+
}
4481+
4482+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TokenRefreshed {
4483+
return new TokenRefreshed().fromJsonString(jsonString, options);
4484+
}
4485+
4486+
static equals(a: TokenRefreshed | PlainMessage<TokenRefreshed> | undefined, b: TokenRefreshed | PlainMessage<TokenRefreshed> | undefined): boolean {
4487+
return proto2.util.equals(TokenRefreshed, a, b);
4488+
}
4489+
}
4490+
44474491
/**
44484492
* @generated from message livekit.proto.RoomEOS
44494493
*/

0 commit comments

Comments
 (0)