From c91504b8906fbf9365f350f66ceb9ad6fa55c4c2 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Mon, 1 Jun 2026 11:09:49 -0400 Subject: [PATCH 01/11] chore(build): build console features by default, update process --- .github/workflows/build.yaml | 160 +-- .github/workflows/docker.yaml | 68 -- .github/workflows/release.yaml | 24 + .github/workflows/test.yaml | 16 + .gitignore | 1 + .goreleaser.yaml | 148 ++- Dockerfile | 30 +- Makefile | 46 - README.md | 16 +- autocomplete/fish_autocomplete | 1017 ++++++++++------- cmd/lk/agent_reload.go | 2 - cmd/lk/agent_run.go | 2 - cmd/lk/agent_watcher.go | 2 - cmd/lk/console.go | 2 - cmd/lk/console_stub.go | 6 - cmd/lk/console_tui.go | 2 - cmd/lk/main.go | 2 +- cmd/lk/simulate.go | 2 - cmd/lk/simulate_ci.go | 2 - cmd/lk/simulate_matrix.go | 2 - cmd/lk/simulate_save.go | 330 ++++++ cmd/lk/simulate_tui.go | 2 - install-cli.sh | 124 +- pkg/apm/apm.go | 2 - pkg/apm/bridge.go | 2 - pkg/apm/webrtc/api/api.go | 2 - pkg/apm/webrtc/api/audio/audio.go | 2 - pkg/apm/webrtc/api/environment/environment.go | 2 - pkg/apm/webrtc/api/numerics/numerics.go | 2 - pkg/apm/webrtc/api/task_queue/gcd/gcd.go | 2 +- .../webrtc/api/task_queue/stdlib/stdlib.go | 2 +- pkg/apm/webrtc/api/task_queue/task_queue.go | 2 - pkg/apm/webrtc/api/transport/transport.go | 2 - pkg/apm/webrtc/api/units/units.go | 2 - pkg/apm/webrtc/common_audio/avx2/avx2.go | 2 +- pkg/apm/webrtc/common_audio/common_audio.go | 2 - .../webrtc/common_audio/common_audio_amd64.go | 2 +- .../common_audio/resampler/avx2/avx2.go | 2 +- .../common_audio/resampler/resampler.go | 2 - .../common_audio/signal_processing/sp.go | 2 - .../ooura/fft_size_128/fft_size_128.go | 2 - .../ooura/fft_size_256/fft_size_256.go | 2 - .../spl_sqrt_floor/spl_sqrt_floor.go | 2 - pkg/apm/webrtc/common_audio/vad/vad.go | 2 - .../codecs/isac/main/source/isac.go | 2 - .../modules/audio_processing/aec3/aec3.go | 2 - .../audio_processing/aec3/avx2/avx2.go | 2 +- .../audio_processing/aec_dump/aec_dump.go | 2 - .../modules/audio_processing/aecm/aecm.go | 2 - .../modules/audio_processing/agc/agc.go | 2 - .../audio_processing/agc/legacy/legacy.go | 2 - .../modules/audio_processing/agc2/agc2.go | 2 - .../agc2/rnn_vad/avx2/avx2.go | 2 +- .../audio_processing/agc2/rnn_vad/rnn_vad.go | 2 - .../webrtc/modules/audio_processing/apm.go | 2 - .../modules/audio_processing/apm_amd64.go | 2 +- .../capture_levels_adjuster.go | 2 - .../echo_detector/echo_detector.go | 2 - .../audio_processing/include/include.go | 2 - .../audio_processing/logging/logging.go | 2 - .../webrtc/modules/audio_processing/ns/ns.go | 2 - .../audio_processing/utility/utility.go | 2 - .../modules/audio_processing/vad/vad.go | 2 - .../webrtc/rtc_base/containers/containers.go | 2 - .../rtc_base/experiments/experiments.go | 2 - pkg/apm/webrtc/rtc_base/memory/memory.go | 2 - pkg/apm/webrtc/rtc_base/numerics/numerics.go | 2 - pkg/apm/webrtc/rtc_base/rtc_base.go | 2 - pkg/apm/webrtc/rtc_base/strings/strings.go | 2 - .../webrtc/rtc_base/synchronization/sync.go | 2 - pkg/apm/webrtc/rtc_base/system/system.go | 2 - .../webrtc/system_wrappers/source/system.go | 2 - .../third_party/abseil-cpp/absl/base/base.go | 2 - .../abseil-cpp/absl/container/container.go | 2 - .../third_party/abseil-cpp/absl/crc/crc.go | 2 - .../abseil-cpp/absl/debugging/debugging.go | 2 - .../abseil-cpp/absl/flags/flags.go | 2 - .../third_party/abseil-cpp/absl/hash/hash.go | 2 - .../third_party/abseil-cpp/absl/log/log.go | 2 - .../abseil-cpp/absl/numeric/numeric.go | 2 - .../abseil-cpp/absl/profiling/profiling.go | 2 - .../abseil-cpp/absl/random/random.go | 2 - .../abseil-cpp/absl/status/status.go | 2 - .../abseil-cpp/absl/strings/strings.go | 2 - .../abseil-cpp/absl/synchronization/sync.go | 2 - .../abseil-cpp/absl/time/src/src.go | 2 - pkg/apm/webrtc/third_party/pffft/src/pffft.go | 2 - pkg/apm/webrtc/third_party/rnnoise/src/src.go | 2 - pkg/apm/webrtc/webrtc.go | 2 - pkg/apm/webrtc/webrtc_darwin.go | 2 - pkg/apm/webrtc/webrtc_linux.go | 2 - pkg/apm/webrtc/webrtc_windows.go | 2 - pkg/console/fft.go | 2 - pkg/console/pipeline.go | 2 - pkg/console/ringbuffer.go | 2 - pkg/portaudio/portaudio.go | 2 - pkg/portaudio/portaudio_darwin.go | 2 - pkg/portaudio/portaudio_linux.go | 2 - pkg/portaudio/portaudio_windows.go | 2 - scripts/setup-cross.sh | 142 +++ 100 files changed, 1343 insertions(+), 957 deletions(-) delete mode 100644 .github/workflows/docker.yaml delete mode 100644 Makefile delete mode 100644 cmd/lk/console_stub.go create mode 100644 cmd/lk/simulate_save.go create mode 100755 scripts/setup-cross.sh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 611a58fc..ae24f2fa 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,90 +16,17 @@ name: Build on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] permissions: contents: read jobs: - build-no-console: - name: Build (no console, no CGO) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - - name: Set up Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 - with: - go-version-file: go.mod - - - name: Build without console tag - env: - CGO_ENABLED: "0" - run: go build -o bin/lk ./cmd/lk - - - name: Verify binary - run: bin/lk --help > /dev/null - - lint-and-test: + cross-build: + name: Cross-build (goreleaser snapshot) runs-on: ubuntu-latest - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - with: - submodules: true - - - name: Set up Go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 - with: - go-version-file: go.mod - - - name: Static Check - uses: dominikh/staticcheck-action@288b4e28bae83c59f35f73651aeb5cab746a06fc # v1.4.0 - with: - version: "latest" - install-go: false - - - name: Test - run: go test -v ./... - - build: - strategy: - fail-fast: false - matrix: - include: - - os: macos-latest - suffix: darwin_arm64 - - os: ubuntu-latest - suffix: linux_amd64 - zig_target: x86_64-linux-gnu.2.28 - alsa_arch: amd64 - alsa_triple: x86_64-linux-gnu - - os: ubuntu-latest - suffix: linux_arm64 - zig_target: aarch64-linux-gnu.2.28 - alsa_arch: arm64 - alsa_triple: aarch64-linux-gnu - goarch: arm64 - - os: ubuntu-latest - suffix: linux_arm - zig_target: arm-linux-gnueabihf.2.28 - alsa_arch: armhf - alsa_triple: arm-linux-gnueabihf - goarch: arm - goarm: "7" - - os: ubuntu-latest - suffix: windows_amd64 - zig_target: x86_64-windows-gnu - goos: windows - goarch: amd64 - - os: ubuntu-latest - suffix: windows_arm64 - zig_target: aarch64-windows-gnu - goos: windows - goarch: arm64 - runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: @@ -111,72 +38,27 @@ jobs: go-version-file: go.mod - name: Install Zig - if: matrix.zig_target uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2 with: version: 0.14.1 - - name: Install ALSA headers - if: matrix.alsa_arch - run: | - sudo dpkg --add-architecture ${{ matrix.alsa_arch }} - if [ "${{ matrix.alsa_arch }}" != "amd64" ]; then - CODENAME=$(lsb_release -cs) - # Restrict existing sources to amd64 to avoid 404s for foreign arch - for f in /etc/apt/sources.list.d/*.sources; do - grep -q '^Architectures:' "$f" || sudo sed -i '/^Types:/a Architectures: amd64 i386' "$f" - done - # Add ports.ubuntu.com for the foreign architecture - printf 'Types: deb\nURIs: http://ports.ubuntu.com/ubuntu-ports\nSuites: %s %s-updates\nComponents: main universe\nArchitectures: %s\nSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n' \ - "$CODENAME" "$CODENAME" "${{ matrix.alsa_arch }}" | sudo tee /etc/apt/sources.list.d/ports.sources - fi - sudo apt-get update - sudo apt-get install -y libasound2-dev:${{ matrix.alsa_arch }} + - name: Cache cross-compile inputs + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5 + with: + path: .cross + key: cross-${{ runner.os }}-zig0.14.1-alsa1.2.12-${{ hashFiles('scripts/setup-cross.sh') }} - - name: Generate Windows import libraries - if: matrix.goos == 'windows' && matrix.zig_target - run: | - ZIG_LIB=$(zig env | jq -r '.lib_dir') - echo "ZIG_LIB=${ZIG_LIB}" >> "$GITHUB_ENV" - LIB_DIR="${ZIG_LIB}/libc/mingw/lib-common" - # Zig bundles MinGW .def files but lld needs .a import libraries. - # Go's compiled objects embed COFF /DEFAULTLIB directives (e.g. dbghelp, - # bcrypt) that lld resolves directly, bypassing Zig's lazy .def→.a - # generation. Pre-generate all import libraries so lld can find them. - MACHINE=${{ matrix.goarch == 'amd64' && 'i386:x86-64' || 'arm64' }} - for def in "${LIB_DIR}"/*.def; do - lib=$(basename "$def" .def) - [ -f "${LIB_DIR}/lib${lib}.a" ] && continue - zig dlltool -d "$def" -l "${LIB_DIR}/lib${lib}.a" -m "$MACHINE" 2>/dev/null || true - done + - name: GoReleaser snapshot build + uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7 + with: + distribution: goreleaser + version: latest + args: build --snapshot --clean - - name: Build - env: - CGO_ENABLED: ${{ (matrix.goos && !matrix.zig_target) && '0' || '1' }} - CC: ${{ matrix.zig_target && format('zig cc -target {0}', matrix.zig_target) || '' }} - CXX: ${{ matrix.zig_target && format('zig c++ -target {0}', matrix.zig_target) || '' }} - # Zig uses its own sysroot; point it at the system ALSA headers and libraries - CGO_CFLAGS: ${{ matrix.alsa_triple && format('-isystem /usr/include -isystem /usr/include/{0}', matrix.alsa_triple) || '' }} - CGO_LDFLAGS: ${{ matrix.alsa_triple && format('-L/usr/lib/{0}', matrix.alsa_triple) || '' }} - # -fms-extensions: enable __try/__except (SEH) used by WebRTC - # -DNTDDI_VERSION: target Windows 10 base to skip WinRT includes absent from MinGW - CGO_CXXFLAGS: ${{ matrix.goos == 'windows' && '-fms-extensions -DNTDDI_VERSION=0x0A000000' || '' }} - GOOS: ${{ matrix.goos || '' }} - GOARCH: ${{ matrix.goarch || '' }} - GOARM: ${{ matrix.goarm || '' }} - shell: bash + - name: Verify native binary runs run: | - EXT=""; if [ "${GOOS:-}" = "windows" ]; then EXT=".exe"; fi - TAGS="" - if [ "$CGO_ENABLED" = "1" ]; then TAGS="-tags console"; fi - # Force external linking for Windows so Go uses zig cc (CC) as the linker, - # and add Zig's MinGW lib path so lld can find the generated import libraries. - EXTLD="" - if [ "${GOOS:-}" = "windows" ] && [ "$CGO_ENABLED" = "1" ]; then - EXTLD="-linkmode=external -extldflags '-L${ZIG_LIB}/libc/mingw/lib-common'" - fi - go build $TAGS -ldflags "-w -s $EXTLD" -o "bin/lk${EXT}" ./cmd/lk - - - name: Verify binary - if: "!matrix.goos && !matrix.goarch" - run: bin/lk --help > /dev/null + # Pick the linux-amd64 binary out of dist/ and run --help. + binary=$(find dist -type f -name lk -path '*linux*amd64*' | head -n1) + test -n "$binary" || { echo "no linux/amd64 binary in dist/"; exit 1; } + # Static-libgcc/libstdc++ binary should run on glibc 2.28+ Ubuntu runners. + "$binary" --help > /dev/null diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml deleted file mode 100644 index 45e2302a..00000000 --- a/.github/workflows/docker.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 2023 LiveKit, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Release to Docker - -# on events -on: - push: - tags: - - v* - -# workflow tasks -jobs: - docker: - name: Generate builds for Docker - runs-on: ubuntu-latest - steps: - - name: Checkout Git LFS - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - with: - lfs: 'true' - - - run: git lfs pull - - - name: Docker meta - id: meta - uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5 - with: - # list of Docker images to use as base name for tags - images: | - livekit/livekit-cli - # generate Docker tags based on the following events/attributes - tags: | - type=semver,pattern=v{{version}} - type=semver,pattern=v{{major}}.{{minor}} - - - name: Set up QEMU - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 - - - name: Login to DockerHub - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 - with: - context: . - push: true - platforms: linux/amd64,linux/arm64 - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6c2cca51..4b4e03d8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,6 +22,7 @@ on: permissions: contents: write + packages: write # workflow tasks jobs: @@ -83,6 +84,29 @@ jobs: with: go-version-file: go.mod + - name: Install Zig + uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2 + with: + version: 0.14.1 + + - name: Cache cross-compile inputs + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5 + with: + path: .cross + key: cross-${{ runner.os }}-zig0.14.1-alsa1.2.12-${{ hashFiles('scripts/setup-cross.sh') }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 + + - name: Login to DockerHub + uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Run GoReleaser uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7 with: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 42d671d0..eb1ba066 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -21,6 +21,10 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - name: Install ALSA headers (Linux) + if: matrix.os == 'ubuntu-latest' + run: sudo apt-get update && sudo apt-get install -y libasound2-dev + - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 with: @@ -41,6 +45,18 @@ jobs: set -euo pipefail go test -race -json -v ./... 2>&1 | tee test.log + - name: Verify fish_autocomplete is up to date + if: matrix.os == 'ubuntu-latest' + shell: bash + run: | + go build -o /tmp/lk ./cmd/lk + /tmp/lk generate-fish-completion -o /tmp/fish_autocomplete.fresh + if ! diff -u autocomplete/fish_autocomplete /tmp/fish_autocomplete.fresh; then + echo "::error::autocomplete/fish_autocomplete is stale; regenerate with:" + echo " go build -o /tmp/lk ./cmd/lk && /tmp/lk generate-fish-completion -o autocomplete/fish_autocomplete" + exit 1 + fi + - name: Upload test log uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 if: always() diff --git a/.gitignore b/.gitignore index fa396b82..23f3a401 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ bin/ .idea/ dist/ +.cross/ # Local artifacts .task/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 19aebb7d..df8ba808 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -12,32 +12,104 @@ # See the License for the specific language governing permissions and # limitations under the License. +# All builds set CGO_ENABLED=1 — audio (portaudio/webrtc APM) is in every +# binary. Linux/Windows cross-compiles use zig cc as the C/C++ toolchain; +# scripts/setup-cross.sh builds static libasound.a (linux) and pre-generates +# MinGW import libs (windows) under .cross// before each build. + version: 2 before: hooks: - go mod tidy + builds: - - id: lk + - id: lk-darwin-arm64 + main: ./cmd/lk + binary: lk env: - - CGO_ENABLED=0 + - CGO_ENABLED=1 + goos: [darwin] + goarch: [arm64] + ldflags: + - -s -w + + - id: lk-linux-amd64 main: ./cmd/lk binary: lk - goarm: - - "7" - goarch: - - amd64 - - arm64 - - arm - goos: - - linux - - windows - - darwin - ignore: - - goos: windows - goarch: arm + hooks: + pre: + - cmd: scripts/setup-cross.sh linux/amd64 + env: + - CGO_ENABLED=1 + - CC=zig cc -target x86_64-linux-gnu.2.28 + - CXX=zig c++ -target x86_64-linux-gnu.2.28 + - CGO_CFLAGS=-I{{ .Env.PWD }}/.cross/linux_amd64/include + # -L points at scripts/setup-cross.sh's static libasound.a. zig's sysroot + # excludes /usr/lib so the `-lasound` from #cgo LDFLAGS resolves here. + - CGO_LDFLAGS=-L{{ .Env.PWD }}/.cross/linux_amd64/lib + goos: [linux] + goarch: [amd64] + ldflags: + - -s -w + - -linkmode=external + + - id: lk-linux-arm64 + main: ./cmd/lk + binary: lk + hooks: + pre: + - cmd: scripts/setup-cross.sh linux/arm64 + env: + - CGO_ENABLED=1 + - CC=zig cc -target aarch64-linux-gnu.2.28 + - CXX=zig c++ -target aarch64-linux-gnu.2.28 + - CGO_CFLAGS=-I{{ .Env.PWD }}/.cross/linux_arm64/include + - CGO_LDFLAGS=-L{{ .Env.PWD }}/.cross/linux_arm64/lib + goos: [linux] + goarch: [arm64] + ldflags: + - -s -w + - -linkmode=external + + - id: lk-windows-amd64 + main: ./cmd/lk + binary: lk + hooks: + pre: + - cmd: scripts/setup-cross.sh windows/amd64 + env: + - CGO_ENABLED=1 + - CC=zig cc -target x86_64-windows-gnu + - CXX=zig c++ -target x86_64-windows-gnu + # -fms-extensions: enable __try/__except (SEH) used by WebRTC + # -DNTDDI_VERSION: target Windows 10 base to skip WinRT includes absent from MinGW + - CGO_CXXFLAGS=-fms-extensions -DNTDDI_VERSION=0x0A000000 -fno-sanitize=all + goos: [windows] + goarch: [amd64] + ldflags: + - -s -w + - -linkmode=external + - -extldflags=-L{{ .Env.PWD }}/.cross/windows_amd64/mingw_lib + + - id: lk-windows-arm64 + main: ./cmd/lk + binary: lk + hooks: + pre: + - cmd: scripts/setup-cross.sh windows/arm64 + env: + - CGO_ENABLED=1 + - CC=zig cc -target aarch64-windows-gnu + - CXX=zig c++ -target aarch64-windows-gnu + - CGO_CXXFLAGS=-fms-extensions -DNTDDI_VERSION=0x0A000000 -fno-sanitize=all + goos: [windows] + goarch: [arm64] ldflags: - -s -w + - -linkmode=external + - -extldflags=-L{{ .Env.PWD }}/.cross/windows_arm64/mingw_lib + archives: - name_template: "lk_{{ .Version }}_{{ .Os }}_{{ .Arch }}" format_overrides: @@ -46,21 +118,67 @@ archives: files: - LICENSE - 'autocomplete/*' + +dockers: + - image_templates: + - "livekit/livekit-cli:{{ .Tag }}-amd64" + - "livekit/livekit-cli:v{{ .Major }}.{{ .Minor }}-amd64" + ids: [lk-linux-amd64] + goos: linux + goarch: amd64 + dockerfile: Dockerfile + use: buildx + build_flag_templates: + - "--platform=linux/amd64" + - "--label=org.opencontainers.image.created={{ .Date }}" + - "--label=org.opencontainers.image.version={{ .Version }}" + - "--label=org.opencontainers.image.revision={{ .FullCommit }}" + - "--label=org.opencontainers.image.source={{ .GitURL }}" + + - image_templates: + - "livekit/livekit-cli:{{ .Tag }}-arm64" + - "livekit/livekit-cli:v{{ .Major }}.{{ .Minor }}-arm64" + ids: [lk-linux-arm64] + goos: linux + goarch: arm64 + dockerfile: Dockerfile + use: buildx + build_flag_templates: + - "--platform=linux/arm64" + - "--label=org.opencontainers.image.created={{ .Date }}" + - "--label=org.opencontainers.image.version={{ .Version }}" + - "--label=org.opencontainers.image.revision={{ .FullCommit }}" + - "--label=org.opencontainers.image.source={{ .GitURL }}" + +docker_manifests: + - name_template: "livekit/livekit-cli:{{ .Tag }}" + image_templates: + - "livekit/livekit-cli:{{ .Tag }}-amd64" + - "livekit/livekit-cli:{{ .Tag }}-arm64" + - name_template: "livekit/livekit-cli:v{{ .Major }}.{{ .Minor }}" + image_templates: + - "livekit/livekit-cli:v{{ .Major }}.{{ .Minor }}-amd64" + - "livekit/livekit-cli:v{{ .Major }}.{{ .Minor }}-arm64" + release: github: owner: livekit name: livekit-cli draft: true prerelease: auto + changelog: sort: asc filters: exclude: - '^docs:' - '^test:' + gomod: proxy: false + checksum: name_template: 'checksums.txt' + snapshot: version_template: "{{ incpatch .Version }}-next" diff --git a/Dockerfile b/Dockerfile index cb970e6b..16c223c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,31 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.26-alpine AS builder +# Consumed by goreleaser, which drops the pre-built `lk` binary into the build +# context. Distroless gives us glibc (the binary targets glibc 2.28+) plus CA +# certs for TLS, without a shell or package manager. +FROM gcr.io/distroless/base-debian12 -ARG TARGETPLATFORM -ARG TARGETARCH -RUN echo building for "$TARGETPLATFORM" +COPY lk /lk -WORKDIR /workspace - -# Copy the Go Modules manifests -COPY go.mod go.mod -COPY go.sum go.sum -# cache deps before building and copying source so that we don't need to re-download as much -# and so that source changes don't invalidate our downloaded layer -RUN go mod download - -# Copy the go source -COPY cmd/ cmd/ -COPY pkg/ pkg/ -COPY version.go version.go - -RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -a -o lk ./cmd/lk - -FROM alpine:3.21 - -COPY --from=builder /workspace/lk /lk - -# Run the binary. ENTRYPOINT ["/lk"] diff --git a/Makefile b/Makefile deleted file mode 100644 index fff21213..00000000 --- a/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -ifeq (,$(shell go env GOBIN)) -GOBIN=$(shell go env GOPATH)/bin -else -GOBIN=$(shell go env GOBIN) -endif - -ifeq ($(OS),Windows_NT) - DETECTED_OS := Windows -else - DETECTED_OS := $(shell uname -s) -endif - -cli: check_lfs - GOOS=darwin GOARCH=arm64 go build -ldflags "-w -s" -o bin/lk ./cmd/lk - GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -o bin/lk-linux ./cmd/lk - GOOS=windows GOARCH=amd64 go build -ldflags "-w -s" -o bin/lk.exe ./cmd/lk - - -console: - CGO_ENABLED=1 go build -tags console -ldflags "-w -s" -o bin/lk ./cmd/lk - -install: cli -ifeq ($(DETECTED_OS),Windows) - cp bin/lk.exe $(GOBIN)/lk.exe - ln -sf $(GOBIN)/lk.exe $(GOBIN)/livekit-cli.exe -else ifeq ($(DETECTED_OS),Darwin) - cp bin/lk $(GOBIN)/lk - ln -sf $(GOBIN)/lk $(GOBIN)/livekit-cli -else - cp bin/lk-linux $(GOBIN)/lk - ln -sf $(GOBIN)/lk $(GOBIN)/livekit-cli -endif - -check_lfs: - @{ \ - if [ ! -n $(find pkg/provider/resources -name neon_720_2000.ivf -size +100) ]; then \ - echo "Video resources not found. Ensure Git LFS is installed"; \ - exit 1; \ - fi \ - } - -lint: - golangci-lint run ./... - -fish_autocomplete: cli - ./bin/lk generate-fish-completion -o autocomplete/fish_autocomplete diff --git a/README.md b/README.md index e2ebb1f4..c011bec6 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,23 @@ Or download a precompiled binary for the [latest release](https://github.com/liv This repo uses [Git LFS](https://git-lfs.github.com/) for embedded video resources. Please ensure git-lfs is installed on your machine. +Every build of `lk` includes the audio/console subsystem (CGO + PortAudio + WebRTC APM). You will need platform headers/libraries for the C compile: + +- **macOS**: nothing to install — CoreAudio frameworks ship with Xcode CLT. +- **Linux**: `sudo apt-get install libasound2-dev` (or your distro's ALSA dev package). +- **Windows**: MinGW from the standard Go distribution. + +Then: + ```shell git clone https://github.com/livekit/livekit-cli && cd livekit-cli -make install +go build ./cmd/lk +``` + +To cross-compile for another platform, install [Zig](https://ziglang.org/download/) 0.14.1 and run a [GoReleaser](https://goreleaser.com/) snapshot build: + +```shell +goreleaser build --single-target --snapshot --clean ``` diff --git a/autocomplete/fish_autocomplete b/autocomplete/fish_autocomplete index 61b7c0d8..ceb5b9ca 100644 --- a/autocomplete/fish_autocomplete +++ b/autocomplete/fish_autocomplete @@ -2,7 +2,7 @@ function __fish_lk_no_subcommand --description 'Test if there has been any subcommand yet' for i in (commandline -opc) - if contains -- $i generate-fish-completion app agent a cloud project room create-room list-rooms list-room update-room-metadata list-participants get-participant remove-participant update-participant mute-track update-subscriptions send-data token create-token join-room dispatch egress start-room-composite-egress start-web-egress start-participant-egress start-track-composite-egress start-track-egress list-egress update-layout update-stream stop-egress test-egress-template ingress create-ingress update-ingress list-ingress delete-ingress sip list-sip-trunk delete-sip-trunk create-sip-dispatch-rule list-sip-dispatch-rule delete-sip-dispatch-rule create-sip-participant replay perf load-test completion + if contains -- $i generate-fish-completion app agent a cloud docs project room create-room list-rooms list-room update-room-metadata list-participants get-participant remove-participant update-participant mute-track update-subscriptions send-data token create-token join-room dispatch egress start-room-composite-egress start-web-egress start-participant-egress start-track-composite-egress start-track-egress list-egress update-layout update-stream stop-egress test-egress-template ingress create-ingress update-ingress list-ingress delete-ingress sip list-sip-trunk delete-sip-trunk create-sip-dispatch-rule list-sip-dispatch-rule delete-sip-dispatch-rule create-sip-participant number replay perf load-test completion return 1 end end @@ -18,6 +18,8 @@ complete -c lk -n '__fish_lk_no_subcommand' -f -l subdomain -r -d '`SUBDOMAIN` o complete -c lk -n '__fish_lk_no_subcommand' -f -l config -r -d 'Config `TOML` to use in the working directory' complete -c lk -n '__fish_lk_no_subcommand' -f -l curl -d 'Print curl commands for API actions' complete -c lk -n '__fish_lk_no_subcommand' -f -l verbose +complete -c lk -n '__fish_lk_no_subcommand' -f -l yes -s y -d 'Assume yes for confirmations; fail or use default for other prompts (use in CI/non-interactive)' +complete -c lk -n '__fish_lk_no_subcommand' -f -l quiet -s q -d 'Suppress informational output to stderr (warnings and errors still print)' complete -c lk -n '__fish_lk_no_subcommand' -f -l help -s h -d 'show help' complete -c lk -n '__fish_lk_no_subcommand' -f -l version -s v -d 'print the version' complete -c lk -n '__fish_seen_subcommand_from generate-fish-completion' -f -l out -s o -r @@ -26,206 +28,343 @@ complete -x -c lk -n '__fish_seen_subcommand_from generate-fish-completion; and complete -x -c lk -n '__fish_lk_no_subcommand' -a 'app' -d 'Initialize and manage applications' complete -c lk -n '__fish_seen_subcommand_from app' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from app; and not __fish_seen_subcommand_from create list-templates install run env help h' -a 'create' -d 'Bootstrap a new application from a template or through guided creation' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l template -r -d '`TEMPLATE` to instantiate, see https://github.com/livekit-examples' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l template-url -r -d '`URL` to instantiate, must contain a taskfile.yaml' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l sandbox -r -d '`NAME` of the sandbox, see your cloud dashboard' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from create' -f -l template -r -d '`TEMPLATE` to instantiate, see https://github.com/livekit-examples' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from create' -f -l template-url -r -d '`URL` to instantiate, must contain a taskfile.yaml' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from create' -f -l install -d 'Run installation after creating the application' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from app; and not __fish_seen_subcommand_from create list-templates install run env help h' -a 'list-templates' -d 'List available templates to bootstrap a new application' -complete -c lk -n '__fish_seen_subcommand_from list-templates' -f -l json -s j -d 'Output as JSON' -complete -c lk -n '__fish_seen_subcommand_from list-templates' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from list-templates; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from install' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from install; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from run' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from run; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from list-templates' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from list-templates' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from list-templates; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from install' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from install; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from run' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from run; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from app; and not __fish_seen_subcommand_from create list-templates install run env help h' -a 'env' -d 'Fill environment variables based on .env.example (optional) and project credentials' -complete -c lk -n '__fish_seen_subcommand_from env' -f -l write -s w -d 'Write environment variables to file' -complete -c lk -n '__fish_seen_subcommand_from env' -l destination -s d -r -d 'Destination file path, when used with --write' -complete -c lk -n '__fish_seen_subcommand_from env' -l example -s e -r -d 'Example file path' -complete -c lk -n '__fish_seen_subcommand_from env' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from env; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from env' -f -l write -s w -d 'Write environment variables to file' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from env' -f -l overwrite -s o -d 'Replace destination file instead of merging into existing contents' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from env' -l destination -s d -r -d 'Destination file path, when used with --write' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from env' -l example -s e -r -d 'Example file path' +complete -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from env' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcommand_from env; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from app; and not __fish_seen_subcommand_from create list-templates install run env help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_lk_no_subcommand' -a 'agent' -d 'Manage LiveKit Cloud Agents' complete -c lk -n '__fish_seen_subcommand_from agent a' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'create' -d 'Create a new LiveKit Cloud Agent' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' -complete -c lk -n '__fish_seen_subcommand_from create' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l silent -d 'If set, will not prompt for confirmation' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'config' -d 'Creates a livekit.toml in the working directory for an existing agent.' -complete -c lk -n '__fish_seen_subcommand_from config' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' -complete -c lk -n '__fish_seen_subcommand_from config' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from config; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'deploy' -d 'Deploy a new version of the agent' -complete -c lk -n '__fish_seen_subcommand_from deploy' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' -complete -c lk -n '__fish_seen_subcommand_from deploy' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' -complete -c lk -n '__fish_seen_subcommand_from deploy' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from deploy; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'status' -d 'Get the status of an agent' -complete -c lk -n '__fish_seen_subcommand_from status' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' -complete -c lk -n '__fish_seen_subcommand_from status' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from status; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'update' -d 'Update an agent metadata and secrets. This will restart the agent.' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' -complete -c lk -n '__fish_seen_subcommand_from update' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'rollback' -d 'Rollback an agent to a previous version' -complete -c lk -n '__fish_seen_subcommand_from rollback' -f -l version -r -d 'Version to rollback to, defaults to most recent previous to current.' -complete -c lk -n '__fish_seen_subcommand_from rollback' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' -complete -c lk -n '__fish_seen_subcommand_from rollback' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from rollback; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'logs' -d 'Tail logs from agent' -complete -c lk -n '__fish_seen_subcommand_from logs tail' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' -complete -c lk -n '__fish_seen_subcommand_from logs tail' -f -l log-type -r -d 'Type of logs to retrieve. Valid values are \'deploy\' and \'build\'' -complete -c lk -n '__fish_seen_subcommand_from logs tail' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from logs tail; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'delete' -d 'Delete an agent' -complete -c lk -n '__fish_seen_subcommand_from delete destroy' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' -complete -c lk -n '__fish_seen_subcommand_from delete destroy' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from delete destroy; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'versions' -d 'List versions of an agent' -complete -c lk -n '__fish_seen_subcommand_from versions' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' -complete -c lk -n '__fish_seen_subcommand_from versions' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from versions; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'list' -d 'List all LiveKit Cloud Agents' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l id -r -d '`IDs` of agent(s)' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'secrets' -d 'List secrets for an agent' -complete -c lk -n '__fish_seen_subcommand_from secrets' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' -complete -c lk -n '__fish_seen_subcommand_from secrets' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from secrets; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'update-secrets' -d 'Update secrets for an agent, will cause a re-start of the agent.' -complete -c lk -n '__fish_seen_subcommand_from update-secrets' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' -complete -c lk -n '__fish_seen_subcommand_from update-secrets' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' -complete -c lk -n '__fish_seen_subcommand_from update-secrets' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' -complete -c lk -n '__fish_seen_subcommand_from update-secrets' -f -l overwrite -d 'If set, will overwrite existing secrets' -complete -c lk -n '__fish_seen_subcommand_from update-secrets' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from update-secrets; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from create config deploy status update rollback logs tail delete destroy versions list secrets update-secrets help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'init' -d 'Initialize a new LiveKit Cloud agent project' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init' -f -l region -r -d 'Region to deploy the agent to. If unset, will deploy to the nearest region.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init' -f -l install -d 'Run installation after creating the application' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init' -f -l help -s h -d 'show help' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init' -f -l deploy -d 'If set, automatically deploys the agent to LiveKit Cloud after initialization.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init' -f -l template -r -d '`TEMPLATE` to instantiate, see https://github.com/livekit-examples' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init' -f -l template-url -r -d '`URL` to instantiate, must contain a taskfile.yaml' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'create' -d 'Create a new LiveKit Cloud Agent' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l silent -d 'If set, will not prompt for confirmation' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l region -r -d 'Region to deploy the agent to. If unset, will deploy to the nearest region.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l image -r -d 'Pre-built image from the local Docker daemon (e.g. myimage:latest). Requires Docker.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l image-tar -r -d 'Pre-built image from an OCI tar file (e.g. ./image.tar). No Docker daemon required.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'dockerfile' -d 'Generate Dockerfile and .dockerignore for your project' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile' -f -l silent -d 'If set, will not prompt for confirmation' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile' -f -l overwrite -d 'Overwrite existing Dockerfile and/or .dockerignore if they exist' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'config' -d 'Creates a livekit.toml in the working directory for an existing agent.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from config' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from config' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from config; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'deploy' -d 'Deploy a new version of the agent' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l silent -d 'If set, will not prompt for confirmation' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l region -r -d 'Region to deploy the agent to. If unset, will deploy to the nearest region.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l image -r -d 'Pre-built image from the local Docker daemon (e.g. myimage:latest). Requires Docker.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l image-tar -r -d 'Pre-built image from an OCI tar file (e.g. ./image.tar). No Docker daemon required.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'status' -d 'Get the status of an agent' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from status' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from status' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from status; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'update' -d 'Update an agent metadata and secrets. This will restart the agent.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'restart' -d 'Restart an agent' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from restart' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from restart' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from restart; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'rollback' -d 'Rollback an agent to a previous version' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from rollback' -f -l version -r -d 'Version to rollback to, defaults to most recent previous to current.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from rollback' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from rollback' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from rollback; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'logs' -d 'Tail logs from agent' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail' -f -l log-type -r -d 'Type of logs to retrieve. Valid values are \'deploy\' and \'build\'' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'delete' -d 'Delete an agent' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from delete destroy' -f -l silent -d 'If set, will not prompt for confirmation' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from delete destroy' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from delete destroy' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from delete destroy; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'versions' -d 'List versions of an agent' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from versions' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from versions' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from versions; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'list' -d 'List all LiveKit Cloud Agents' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from list' -f -l id -r -d '`IDs` of agent(s)' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'secrets' -d 'List secrets for an agent' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from secrets' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from secrets' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from secrets; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'update-secrets' -d 'Update secrets for an agent, will cause a re-start of the agent.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l overwrite -d 'If set, will overwrite existing secrets' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'private-link' -d 'Manage private links for agents' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and not __fish_seen_subcommand_from create list delete health-status help h' -a 'create' -d 'Create a private link' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from create' -f -l name -r -d 'Private link name' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from create' -f -l region -r -d 'LiveKit region. If unset in interactive mode, a picker of available regions is shown.' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from create' -f -l port -r -d 'Destination port' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from create' -f -l endpoint -r -d 'Customer-provided endpoint identifier' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from create' -f -l cloud-region -r -d 'Cloud provider region (e.g. eastus, us-east-2). Required when --endpoint is an Azure Resource ID' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from create' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and not __fish_seen_subcommand_from create list delete health-status help h' -a 'list' -d 'List private links with health' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and not __fish_seen_subcommand_from create list delete health-status help h' -a 'delete' -d 'Delete a private link' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from delete' -f -l id -r -d 'Private link ID' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from delete' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and not __fish_seen_subcommand_from create list delete health-status help h' -a 'health-status' -d 'Get private link health status' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from health-status' -f -l id -r -d 'Private link ID' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from health-status' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from health-status' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from health-status; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and not __fish_seen_subcommand_from create list delete health-status help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'start' -d 'Run an agent in production mode' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from start' -f -l log-level -r -d 'Log level (TRACE, DEBUG, INFO, WARN, ERROR)' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from start' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from start; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'dev' -d 'Run an agent in development mode with auto-reload' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dev' -f -l log-level -r -d 'Log level (TRACE, DEBUG, INFO, WARN, ERROR)' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dev' -f -l no-reload -d 'Disable auto-reload on file changes' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dev' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dev; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'console' -d 'Voice chat with an agent via mic/speakers' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l port -s p -r -d 'TCP port for agent communication' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l input-device -r -d 'Input device index or name substring' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l output-device -r -d 'Output device index or name substring' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l list-devices -d 'List available audio devices and exit' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l no-aec -d 'Disable acoustic echo cancellation' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l text -s t -d 'Start in text mode instead of audio mode' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l record -d 'Record audio and session report to console-recordings/' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'simulate' -d 'Run agent simulations against LiveKit Cloud' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l num-simulations -s n -r -d 'Number of scenarios to generate' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l description -r -d 'Agent description for scenario generation' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l scenario-group-id -r -d 'Use a pre-configured scenario group' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l config -r -d 'Path to simulation config `FILE`' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_lk_no_subcommand' -a 'cloud' -d 'Interact with LiveKit Cloud services' complete -c lk -n '__fish_seen_subcommand_from cloud' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from cloud; and not __fish_seen_subcommand_from auth help h' -a 'auth' -d 'Authenticate LiveKit Cloud account to link your projects' -complete -c lk -n '__fish_seen_subcommand_from auth' -f -l revoke -s R -complete -c lk -n '__fish_seen_subcommand_from auth' -f -l timeout -s t -r -d 'Number of `SECONDS` to attempt authentication before giving up' -complete -c lk -n '__fish_seen_subcommand_from auth' -f -l poll-interval -s i -r -d 'Number of `SECONDS` between poll requests to verify authentication' -complete -c lk -n '__fish_seen_subcommand_from auth' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from cloud; and __fish_seen_subcommand_from auth' -f -l revoke -s R +complete -c lk -n '__fish_seen_subcommand_from cloud; and __fish_seen_subcommand_from auth' -f -l timeout -s t -r -d 'Number of `SECONDS` to attempt authentication before giving up' +complete -c lk -n '__fish_seen_subcommand_from cloud; and __fish_seen_subcommand_from auth' -f -l poll-interval -s i -r -d 'Number of `SECONDS` between poll requests to verify authentication' +complete -c lk -n '__fish_seen_subcommand_from cloud; and __fish_seen_subcommand_from auth' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from cloud; and __fish_seen_subcommand_from auth; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from cloud; and not __fish_seen_subcommand_from auth help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_lk_no_subcommand' -a 'docs' -d 'Search and browse LiveKit documentation' +complete -c lk -n '__fish_seen_subcommand_from docs' -f -l json -s j -d 'Output as JSON instead of markdown' +complete -c lk -n '__fish_seen_subcommand_from docs' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and not __fish_seen_subcommand_from overview search get-page get-pages code-search changelog list-sdks pricing-info submit-feedback help h' -a 'overview' -d 'Get a complete overview of the documentation site and table of contents' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from overview' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from overview; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and not __fish_seen_subcommand_from overview search get-page get-pages code-search changelog list-sdks pricing-info submit-feedback help h' -a 'search' -d 'Search the LiveKit documentation' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from search' -f -l query -s q -r -d 'Search `QUERY` text' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from search' -f -l page -s p -r -d 'Page number (starts at 0)' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from search' -f -l hits-per-page -r -d 'Results per page (1-50, default 20)' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from search' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from search; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and not __fish_seen_subcommand_from overview search get-page get-pages code-search changelog list-sdks pricing-info submit-feedback help h' -a 'get-page' -d 'Fetch one or more documentation pages as markdown' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from get-page get-pages' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from get-page get-pages; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and not __fish_seen_subcommand_from overview search get-page get-pages code-search changelog list-sdks pricing-info submit-feedback help h' -a 'code-search' -d 'Search code across LiveKit GitHub repositories' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from code-search' -f -l query -s q -r -d 'Search term (use code identifiers, not natural language)' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from code-search' -f -l repo -s r -r -d 'Target `REPO` (e.g. livekit/agents) or ALL' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from code-search' -f -l language -s l -r -d 'Language filter (e.g. Python, TypeScript)' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from code-search' -f -l scope -r -d 'Search scope: content, filename, or both' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from code-search' -f -l limit -r -d 'Max results to return (1-50)' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from code-search' -f -l full-file -d 'Return full file content instead of snippets' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from code-search' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from code-search; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and not __fish_seen_subcommand_from overview search get-page get-pages code-search changelog list-sdks pricing-info submit-feedback help h' -a 'changelog' -d 'Get recent releases and changelog for a LiveKit SDK or package' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from changelog' -f -l releases -r -d 'Number of releases to fetch (1-20)' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from changelog' -f -l skip -r -d 'Number of releases to skip for pagination' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from changelog' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from changelog; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and not __fish_seen_subcommand_from overview search get-page get-pages code-search changelog list-sdks pricing-info submit-feedback help h' -a 'list-sdks' -d 'List all LiveKit SDK repositories and package names' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from list-sdks' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from list-sdks; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and not __fish_seen_subcommand_from overview search get-page get-pages code-search changelog list-sdks pricing-info submit-feedback help h' -a 'pricing-info' -d 'Get LiveKit Cloud pricing information' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from pricing-info' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from pricing-info; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and not __fish_seen_subcommand_from overview search get-page get-pages code-search changelog list-sdks pricing-info submit-feedback help h' -a 'submit-feedback' -d 'Submit feedback on the LiveKit documentation' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from submit-feedback' -f -l page -r -d 'The docs `PAGE` the feedback is about (e.g. /agents/build/tools)' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from submit-feedback' -f -l feedback -s f -r -d 'Feedback text (max 1024 characters)' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from submit-feedback' -f -l agent -r -d 'Identity of the agent submitting feedback (e.g. "Cursor", "Claude Code")' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from submit-feedback' -f -l model -r -d 'Model `ID` used by the agent (e.g. "gpt-5", "claude-4.5-sonnet")' +complete -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from submit-feedback' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and __fish_seen_subcommand_from submit-feedback; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from docs; and not __fish_seen_subcommand_from overview search get-page get-pages code-search changelog list-sdks pricing-info submit-feedback help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_lk_no_subcommand' -a 'project' -d 'Add or remove projects and view existing project properties' complete -c lk -n '__fish_seen_subcommand_from project' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list remove set-default help h' -a 'add' -d 'Add a new project (for LiveKit Cloud projects, also see `lk cloud auth`)' -complete -c lk -n '__fish_seen_subcommand_from add' -f -l url -r -d '`URL` of the LiveKit server' -complete -c lk -n '__fish_seen_subcommand_from add' -f -l api-key -r -d 'Project `KEY`' -complete -c lk -n '__fish_seen_subcommand_from add' -f -l api-secret -r -d 'Project `SECRET`' -complete -c lk -n '__fish_seen_subcommand_from add' -f -l default -d 'Set this project as the default' -complete -c lk -n '__fish_seen_subcommand_from add' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from add; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from add' -f -l url -r -d '`URL` of the LiveKit server' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from add' -f -l api-key -r -d 'Project `KEY`' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from add' -f -l api-secret -r -d 'Project `SECRET`' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from add' -f -l default -d 'Set this project as the default' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from add' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from add; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list remove set-default help h' -a 'list' -d 'List all configured projects' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list remove set-default help h' -a 'remove' -d 'Remove an existing project from config' -complete -c lk -n '__fish_seen_subcommand_from remove' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from remove; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from remove' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from remove; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list remove set-default help h' -a 'set-default' -d 'Set a project as default to use with other commands' -complete -c lk -n '__fish_seen_subcommand_from set-default' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from set-default; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from set-default' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from project; and __fish_seen_subcommand_from set-default; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from project; and not __fish_seen_subcommand_from add list remove set-default help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_lk_no_subcommand' -a 'room' -d 'Create or delete rooms and manage existing room properties' complete -c lk -n '__fish_seen_subcommand_from room' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from room; and not __fish_seen_subcommand_from create list update delete join participants mute-track update-subscriptions send-data help h' -a 'create' -d 'Create a room' -complete -c lk -n '__fish_seen_subcommand_from create' -l room-egress-file -r -d 'RoomCompositeRequest `JSON` file (see examples/room-composite-file.json)' -complete -c lk -n '__fish_seen_subcommand_from create' -l participant-egress-file -r -d 'ParticipantEgress `JSON` file (see examples/auto-participant-egress.json)' -complete -c lk -n '__fish_seen_subcommand_from create' -l track-egress-file -r -d 'AutoTrackEgress `JSON` file (see examples/auto-track-egress.json)' -complete -c lk -n '__fish_seen_subcommand_from create' -l agents-file -r -d 'Agents configuration `JSON` file' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l room-preset -r -d '`NAME` of the room configuration preset to associate with the created room' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l min-playout-delay -r -d 'Minimum playout delay for video (in `MS`)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l max-playout-delay -r -d 'Maximum playout delay for video (in `MS`)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l sync-streams -d 'Improve A/V sync by placing them in the same stream. when enabled, transceivers will not be reused' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l empty-timeout -r -d 'Number of `SECS` to keep the room open before any participant joins' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l departure-timeout -r -d 'Number of `SECS` to keep the room open after the last participant leaves' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from create' -l room-egress-file -r -d 'RoomCompositeRequest `JSON` file (see examples/room-composite-file.json)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from create' -l participant-egress-file -r -d 'ParticipantEgress `JSON` file (see examples/auto-participant-egress.json)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from create' -l track-egress-file -r -d 'AutoTrackEgress `JSON` file (see examples/auto-track-egress.json)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from create' -l agents-file -r -d 'Agents configuration `JSON` file' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from create' -f -l room-preset -r -d '`NAME` of the room configuration preset to associate with the created room' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from create' -f -l min-playout-delay -r -d 'Minimum playout delay for video (in `MS`)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from create' -f -l max-playout-delay -r -d 'Maximum playout delay for video (in `MS`)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from create' -f -l sync-streams -d 'Improve A/V sync by placing them in the same stream. when enabled, transceivers will not be reused' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from create' -f -l empty-timeout -r -d 'Number of `SECS` to keep the room open before any participant joins' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from create' -f -l departure-timeout -r -d 'Number of `SECS` to keep the room open after the last participant leaves' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from room; and not __fish_seen_subcommand_from create list update delete join participants mute-track update-subscriptions send-data help h' -a 'list' -d 'List or search for active rooms by name' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from room; and not __fish_seen_subcommand_from create list update delete join participants mute-track update-subscriptions send-data help h' -a 'update' -d 'Modify properties of an active room' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l metadata -r -complete -c lk -n '__fish_seen_subcommand_from update' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from update' -f -l metadata -r +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from update' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from room; and not __fish_seen_subcommand_from create list update delete join participants mute-track update-subscriptions send-data help h' -a 'delete' -d 'Delete a room' -complete -c lk -n '__fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from room; and not __fish_seen_subcommand_from create list update delete join participants mute-track update-subscriptions send-data help h' -a 'join' -d 'Joins a room as a participant' -complete -c lk -n '__fish_seen_subcommand_from join' -f -l identity -r -d '`ID` of participant' -complete -c lk -n '__fish_seen_subcommand_from join' -f -l publish-demo -d 'Publish demo video as a loop' -complete -c lk -n '__fish_seen_subcommand_from join' -l publish -r -d '`FILES` to publish as tracks to room (supports .h264, .ivf, .ogg). Can be used multiple times to publish multiple files. Can publish from Unix or TCP socket using the format \'://\' or \'://\' respectively. Valid codecs are "h264", "vp8", "opus"' -complete -c lk -n '__fish_seen_subcommand_from join' -f -l publish-data -r -d 'Publish user data to the room.' -complete -c lk -n '__fish_seen_subcommand_from join' -f -l publish-dtmf -r -d 'Publish DTMF digits to the room. Character \'w\' adds 0.5 sec delay.' -complete -c lk -n '__fish_seen_subcommand_from join' -f -l fps -r -d 'If video files are published, indicates `FPS` of video' -complete -c lk -n '__fish_seen_subcommand_from join' -f -l exit-after-publish -d 'When publishing, exit after file or stream is complete' -complete -c lk -n '__fish_seen_subcommand_from join' -f -l attribute -r -d 'set attributes in key=value format, can be used multiple times' -complete -c lk -n '__fish_seen_subcommand_from join' -l attribute-file -r -d 'read attributes from a `JSON` file' -complete -c lk -n '__fish_seen_subcommand_from join' -f -l auto-subscribe -d 'Automatically subscribe to published tracks.' -complete -c lk -n '__fish_seen_subcommand_from join' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from join; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l identity -s i -r -d '`ID` of participant (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l open -r -d 'Open relevant `APP` in browser, supported options: [meet console]' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l publish-demo -d 'Publish demo video as a loop' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -l publish -r -d '`FILES` to publish as tracks to room (supports .h264, .ivf, .ogg). Can be used multiple times to publish multiple files. Can publish from Unix or TCP socket using the format \':///\' or \'://\' respectively. Valid codecs are "h264", "h265", "vp8", "opus". For simulcast: use 2-3 h264:// or h265:// URLs with format \':///x\' or \':///path/to//x\' (all layers must use the same codec; quality determined by width order)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l publish-data -r -d 'Publish user data to the room.' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l publish-dtmf -r -d 'Publish DTMF digits to the room. Character \'w\' adds 0.5 sec delay.' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l fps -r -d 'If video files are published, indicates `FPS` of video' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l h26x-streaming-format -r -d 'Format to use when reading H.264 from file or socket, "annex-b" OR "length-prefixed"' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l attach-frame-metadata -d 'Parse H264/H265 SEI for LKTS frame metadata (user timestamp and frame ID) and append packet trailer to each encoded frame' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l exit-after-publish -d 'When publishing, exit after file or stream is complete' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l attribute -r -d 'set attributes in key=value format, can be used multiple times' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -l attribute-file -r -d 'read attributes from a `JSON` file' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l auto-subscribe -d 'Automatically subscribe to published tracks.' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l metadata -r -d '`JSON` metadata which will be passed to participant' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from join; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from room; and not __fish_seen_subcommand_from create list update delete join participants mute-track update-subscriptions send-data help h' -a 'participants' -d 'Manage room participants' -complete -c lk -n '__fish_seen_subcommand_from participants' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'list' -d 'List or search for active rooms by name' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'get' -d 'Fetch metadata of a room participant' -complete -c lk -n '__fish_seen_subcommand_from get' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from get' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from get; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'remove' -d 'Remove a participant from a room' -complete -c lk -n '__fish_seen_subcommand_from remove' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from remove' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from remove; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'forward' -d 'Forward a participant to a different room' -complete -c lk -n '__fish_seen_subcommand_from forward' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from forward' -f -l identity -r -d '`ID` of participant' -complete -c lk -n '__fish_seen_subcommand_from forward' -f -l destination-room -r -d '`NAME` of the destination room' -complete -c lk -n '__fish_seen_subcommand_from forward' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from forward; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'move' -d 'Move a participant to a different room' -complete -c lk -n '__fish_seen_subcommand_from move' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from move' -f -l identity -r -d '`ID` of participant' -complete -c lk -n '__fish_seen_subcommand_from move' -f -l destination-room -r -d '`NAME` of the destination room' -complete -c lk -n '__fish_seen_subcommand_from move' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from move; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'update' -d 'Change the metadata and permissions for a room participant' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l metadata -r -d 'JSON describing participant metadata (existing values for unset fields)' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l permissions -r -d 'JSON describing participant permissions (existing values for unset fields)' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'list' -d 'List or search for active rooms by name' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'get' -d 'Fetch metadata of a room participant' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from get' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from get' -f -l identity -s i -r -d '`ID` of participant (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from get' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from get; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'remove' -d 'Remove a participant from a room' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from remove' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from remove' -f -l identity -s i -r -d '`ID` of participant (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from remove' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from remove; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'forward' -d 'Forward a participant to a different room' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from forward' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from forward' -f -l identity -s i -r -d '`ID` of participant (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from forward' -f -l destination-room -r -d '`NAME` of the destination room' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from forward' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from forward; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'move' -d 'Move a participant to a different room' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from move' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from move' -f -l identity -s i -r -d '`ID` of participant (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from move' -f -l destination-room -r -d '`NAME` of the destination room' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from move' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from move; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'update' -d 'Change the metadata and permissions for a room participant' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from update' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from update' -f -l identity -s i -r -d '`ID` of participant (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from update' -f -l metadata -r -d 'JSON describing participant metadata (existing values for unset fields)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from update' -f -l permissions -r -d 'JSON describing participant permissions (existing values for unset fields)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from update' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and __fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from participants; and not __fish_seen_subcommand_from list get remove forward move update help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from room; and not __fish_seen_subcommand_from create list update delete join participants mute-track update-subscriptions send-data help h' -a 'mute-track' -d 'Mute or unmute a track' -complete -c lk -n '__fish_seen_subcommand_from mute-track' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from mute-track' -f -l identity -r -d '`ID` of participant' -complete -c lk -n '__fish_seen_subcommand_from mute-track' -f -l help -s h -d 'show help' -complete -c lk -n '__fish_seen_subcommand_from mute-track' -f -l mute -s m -d 'Mute the track' -complete -c lk -n '__fish_seen_subcommand_from mute-track' -f -l unmute -s u -d 'Unmute the track' -complete -x -c lk -n '__fish_seen_subcommand_from mute-track; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from mute-track' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from mute-track' -f -l identity -s i -r -d '`ID` of participant (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from mute-track' -f -l help -s h -d 'show help' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from mute-track' -f -l mute -s m -d 'Mute the track' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from mute-track' -f -l unmute -s u -d 'Unmute the track' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from mute-track; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from room; and not __fish_seen_subcommand_from create list update delete join participants mute-track update-subscriptions send-data help h' -a 'update-subscriptions' -d 'Subscribe or unsubscribe from a track' -complete -c lk -n '__fish_seen_subcommand_from update-subscriptions' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from update-subscriptions' -f -l identity -r -d '`ID` of participant' -complete -c lk -n '__fish_seen_subcommand_from update-subscriptions' -f -l help -s h -d 'show help' -complete -c lk -n '__fish_seen_subcommand_from update-subscriptions' -f -l subscribe -s s -d 'Subscribe to the track' -complete -c lk -n '__fish_seen_subcommand_from update-subscriptions' -f -l unsubscribe -s S -d 'Unsubscribe to the track' -complete -x -c lk -n '__fish_seen_subcommand_from update-subscriptions; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from update-subscriptions' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from update-subscriptions' -f -l identity -s i -r -d '`ID` of participant (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from update-subscriptions' -f -l help -s h -d 'show help' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from update-subscriptions' -f -l subscribe -s s -d 'Subscribe to the track' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from update-subscriptions' -f -l unsubscribe -s S -d 'Unsubscribe to the track' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from update-subscriptions; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from room; and not __fish_seen_subcommand_from create list update delete join participants mute-track update-subscriptions send-data help h' -a 'send-data' -d 'Send arbitrary JSON data to client' -complete -c lk -n '__fish_seen_subcommand_from send-data' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from send-data' -f -l topic -r -d '`TOPIC` of the message' -complete -c lk -n '__fish_seen_subcommand_from send-data' -f -l identity -r -d 'One or more participant identities to send the message to. When empty, broadcasts to the entire room' -complete -c lk -n '__fish_seen_subcommand_from send-data' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from send-data; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from send-data' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from send-data' -f -l topic -r -d '`TOPIC` of the message' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from send-data' -f -l identity -r -d 'One or more participant identities to send the message to. When empty, broadcasts to the entire room' +complete -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from send-data' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from room; and __fish_seen_subcommand_from send-data; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from room; and not __fish_seen_subcommand_from create list update delete join participants mute-track update-subscriptions send-data help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -c lk -n '__fish_seen_subcommand_from create-room' -f -l name -r -d 'name of the room' complete -c lk -n '__fish_seen_subcommand_from create-room' -f -l room-egress-file -r -d 'RoomCompositeRequest json file (see examples/room-composite-file.json)' @@ -242,69 +381,74 @@ complete -c lk -n '__fish_seen_subcommand_from create-room' -f -l help -s h -d ' complete -x -c lk -n '__fish_seen_subcommand_from create-room; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -c lk -n '__fish_seen_subcommand_from list-rooms' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from list-rooms; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from list-room' -f -l room -r -d '`NAME` of the room' +complete -c lk -n '__fish_seen_subcommand_from list-room' -f -l room -s r -r -d '`NAME` of the room (supports templates)' complete -c lk -n '__fish_seen_subcommand_from list-room' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from list-room; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from update-room-metadata' -f -l room -r -d '`NAME` of the room' +complete -c lk -n '__fish_seen_subcommand_from update-room-metadata' -f -l room -s r -r -d '`NAME` of the room (supports templates)' complete -c lk -n '__fish_seen_subcommand_from update-room-metadata' -f -l metadata -r complete -c lk -n '__fish_seen_subcommand_from update-room-metadata' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from update-room-metadata; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from list-participants' -f -l room -r -d '`NAME` of the room' +complete -c lk -n '__fish_seen_subcommand_from list-participants' -f -l room -s r -r -d '`NAME` of the room (supports templates)' complete -c lk -n '__fish_seen_subcommand_from list-participants' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from list-participants; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from get-participant' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from get-participant' -f -l identity -r -d '`ID` of participant' +complete -c lk -n '__fish_seen_subcommand_from get-participant' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from get-participant' -f -l identity -s i -r -d '`ID` of participant (supports templates)' complete -c lk -n '__fish_seen_subcommand_from get-participant' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from get-participant; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from remove-participant' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from remove-participant' -f -l identity -r -d '`ID` of participant' +complete -c lk -n '__fish_seen_subcommand_from remove-participant' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from remove-participant' -f -l identity -s i -r -d '`ID` of participant (supports templates)' complete -c lk -n '__fish_seen_subcommand_from remove-participant' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from remove-participant; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from update-participant' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from update-participant' -f -l identity -r -d '`ID` of participant' +complete -c lk -n '__fish_seen_subcommand_from update-participant' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from update-participant' -f -l identity -s i -r -d '`ID` of participant (supports templates)' complete -c lk -n '__fish_seen_subcommand_from update-participant' -f -l metadata -r -d '`JSON` describing participant metadata' complete -c lk -n '__fish_seen_subcommand_from update-participant' -f -l permissions -r -d '`JSON` describing participant permissions (existing values for unset fields)' complete -c lk -n '__fish_seen_subcommand_from update-participant' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from update-participant; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from mute-track' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from mute-track' -f -l identity -r -d '`ID` of participant' +complete -c lk -n '__fish_seen_subcommand_from mute-track' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from mute-track' -f -l identity -s i -r -d '`ID` of participant (supports templates)' complete -c lk -n '__fish_seen_subcommand_from mute-track' -f -l help -s h -d 'show help' complete -c lk -n '__fish_seen_subcommand_from mute-track' -f -l m -s mute -s muted -d 'Mute the track' complete -c lk -n '__fish_seen_subcommand_from mute-track' -f -l u -s unmute -d 'Unmute the track' complete -x -c lk -n '__fish_seen_subcommand_from mute-track; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from update-subscriptions' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from update-subscriptions' -f -l identity -r -d '`ID` of participant' +complete -c lk -n '__fish_seen_subcommand_from update-subscriptions' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from update-subscriptions' -f -l identity -s i -r -d '`ID` of participant (supports templates)' complete -c lk -n '__fish_seen_subcommand_from update-subscriptions' -f -l subscribe -d 'Set to true to subscribe, otherwise it\'ll unsubscribe' complete -c lk -n '__fish_seen_subcommand_from update-subscriptions' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from update-subscriptions; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from send-data' -f -l room -r -d '`NAME` of the room' +complete -c lk -n '__fish_seen_subcommand_from send-data' -f -l room -s r -r -d '`NAME` of the room (supports templates)' complete -c lk -n '__fish_seen_subcommand_from send-data' -f -l topic -r -d '`TOPIC` of the message' complete -c lk -n '__fish_seen_subcommand_from send-data' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from send-data; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_lk_no_subcommand' -a 'token' -d 'Create access tokens with granular capabilities' complete -c lk -n '__fish_seen_subcommand_from token' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from token; and not __fish_seen_subcommand_from create help h' -a 'create' -d 'Creates an access token' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l create -d 'Ability to create or delete rooms' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l list -d 'Ability to list rooms' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l join -d 'Ability to join a room (requires --room and --identity)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l admin -d 'Ability to moderate a room (requires --room)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l egress -d 'Ability to interact with Egress services' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l ingress -d 'Ability to interact with Ingress services' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l allow-update-metadata -d 'Ability to update their own name and metadata' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l allow-source -r -d 'Restrict publishing to only `SOURCE` types (e.g. --allow-source camera,microphone), defaults to all' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l identity -s i -r -d 'Unique `ID` of the participant, used with --join' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l name -s n -r -d '`NAME` of the participant, used with --join. defaults to identity' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l room -s r -r -d '`NAME` of the room to join' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l json -s j -d 'Output as JSON' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l token-only -d 'Output only the access token' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l metadata -r -d '`JSON` metadata to encode in the token, will be passed to participant' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l attribute -r -d 'set attributes in key=value format, can be used multiple times' -complete -c lk -n '__fish_seen_subcommand_from create' -l attribute-file -r -d 'read attributes from a `JSON` file' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l valid-for -r -d '`TIME` that the token is valid for, e.g. "5m", "1h10m" (s: seconds, m: minutes, h: hours)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l grant -r -d 'Additional `VIDEO_GRANT` fields. It\'ll be merged with other arguments (JSON formatted)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l identity -s i -r -d '`ID` of participant (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l open -r -d 'Open relevant `APP` in browser, supported options: [meet console]' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l create -d 'Ability to create or delete rooms' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l list -d 'Ability to list rooms' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l join -d 'Ability to join a room (requires --room and --identity)' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l admin -d 'Ability to moderate a room (requires --room)' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l egress -d 'Ability to interact with Egress services' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l ingress -d 'Ability to interact with Ingress services' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l inference -d 'Ability to perform inference (AI endpoints)' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l allow-update-metadata -d 'Ability to update their own name and metadata' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l allow-source -r -d 'Restrict publishing to only `SOURCE` types (e.g. --allow-source camera,microphone), defaults to all' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l name -s n -r -d '`NAME` of the participant, used with --join (defaults to identity) (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l metadata -r -d '`JSON` metadata to encode in the token, will be passed to participant' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l attribute -r -d 'set attributes in key=value format, can be used multiple times' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -l attribute-file -r -d 'read attributes from a `JSON` file' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l valid-for -r -d '`TIME` that the token is valid for, e.g. "5m", "1h10m" (s: seconds, m: minutes, h: hours)' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l grant -r -d 'Additional `VIDEO_GRANT` fields. It\'ll be merged with other arguments (JSON formatted)' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l agent -r -d 'Agent to dispatch to the room (identified by agent_name)' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l job-metadata -r -d 'Metadata attached to job dispatched to the agent (ctx.job.metadata)' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create' -f -l token-only -d 'Output only the access token' +complete -x -c lk -n '__fish_seen_subcommand_from token; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from token; and not __fish_seen_subcommand_from create help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l room -s r -r -d '`NAME` of the room (supports templates)' complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l create -d 'Ability to create or delete rooms' complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l list -d 'Ability to list rooms' complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l join -d 'Ability to join a room (requires --room and --identity)' @@ -316,9 +460,6 @@ complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l allow-update- complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l allow-source -r -d 'Allow one or more `SOURCE`s to be published (i.e. --allow-source camera,microphone). if left blank, all sources are allowed' complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l identity -s i -r -d 'Unique `ID` of the participant, used with --join' complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l name -s n -r -d '`NAME` of the participant, used with --join. defaults to identity' -complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l room -s r -r -d '`NAME` of the room to join' -complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l json -s j -d 'Output as JSON' -complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l token-only -d 'Output only the access token' complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l room-configuration -r -d 'name of the room configuration to use when creating a room' complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l metadata -r -d '`JSON` metadata to encode in the token, will be passed to participant' complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l attribute -r -d 'set attributes in key=value format, can be used multiple times' @@ -326,11 +467,13 @@ complete -c lk -n '__fish_seen_subcommand_from create-token' -l attribute-file - complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l valid-for -r -d 'Amount of `TIME` that the token is valid for. i.e. "5m", "1h10m" (s: seconds, m: minutes, h: hours)' complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l grant -r -d 'Additional `VIDEO_GRANT` fields. It\'ll be merged with other arguments (JSON formatted)' complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l help -s h -d 'show help' +complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from create-token' -f -l token-only -d 'Output only the access token' complete -x -c lk -n '__fish_seen_subcommand_from create-token; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from join-room' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from join-room' -f -l identity -r -d '`ID` of participant' +complete -c lk -n '__fish_seen_subcommand_from join-room' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from join-room' -f -l identity -s i -r -d '`ID` of participant (supports templates)' complete -c lk -n '__fish_seen_subcommand_from join-room' -f -l publish-demo -d 'publish demo video as a loop' -complete -c lk -n '__fish_seen_subcommand_from join-room' -l publish -r -d '`FILES` to publish as tracks to room (supports .h264, .ivf, .ogg). can be used multiple times to publish multiple files. can publish from Unix or TCP socket using the format \'://\' or \'://\' respectively. Valid codecs are "h264", "vp8", "opus"' +complete -c lk -n '__fish_seen_subcommand_from join-room' -l publish -r -d '`FILES` to publish as tracks to room (supports .h264, .h265, .ivf, .ogg). can be used multiple times to publish multiple files. can publish from Unix or TCP socket using the format \'://\' or \'://\' respectively. Valid codecs are "h264", "h265", "vp8", "opus"' complete -c lk -n '__fish_seen_subcommand_from join-room' -f -l fps -r -d 'if video files are published, indicates FPS of video' complete -c lk -n '__fish_seen_subcommand_from join-room' -f -l exit-after-publish -d 'when publishing, exit after file or stream is complete' complete -c lk -n '__fish_seen_subcommand_from join-room' -f -l help -s h -d 'show help' @@ -338,58 +481,58 @@ complete -x -c lk -n '__fish_seen_subcommand_from join-room; and not __fish_seen complete -x -c lk -n '__fish_lk_no_subcommand' -a 'dispatch' -d 'Create, list, and delete agent dispatches' complete -c lk -n '__fish_seen_subcommand_from dispatch' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from dispatch; and not __fish_seen_subcommand_from list get create delete help h' -a 'list' -d 'List all agent dispatches in a room' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from dispatch; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from dispatch; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from dispatch; and not __fish_seen_subcommand_from list get create delete help h' -a 'get' -d 'Get an agent dispatch by room and ID' -complete -c lk -n '__fish_seen_subcommand_from get' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from get; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from dispatch; and __fish_seen_subcommand_from get' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from dispatch; and __fish_seen_subcommand_from get; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from dispatch; and not __fish_seen_subcommand_from list get create delete help h' -a 'create' -d 'Create an agent dispatch' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l room -r -d 'room name' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l new-room -d 'when set, will generate a unique room name' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l agent-name -r -d 'agent to dispatch' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l metadata -r -d 'metadata to send to agent' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from dispatch; and __fish_seen_subcommand_from create' -f -l room -r -d 'room name' +complete -c lk -n '__fish_seen_subcommand_from dispatch; and __fish_seen_subcommand_from create' -f -l new-room -d 'when set, will generate a unique room name' +complete -c lk -n '__fish_seen_subcommand_from dispatch; and __fish_seen_subcommand_from create' -f -l agent-name -r -d 'agent to dispatch' +complete -c lk -n '__fish_seen_subcommand_from dispatch; and __fish_seen_subcommand_from create' -f -l metadata -r -d 'metadata to send to agent' +complete -c lk -n '__fish_seen_subcommand_from dispatch; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from dispatch; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from dispatch; and not __fish_seen_subcommand_from list get create delete help h' -a 'delete' -d 'Delete an agent dispatch' -complete -c lk -n '__fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from dispatch; and __fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from dispatch; and __fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from dispatch; and not __fish_seen_subcommand_from list get create delete help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_lk_no_subcommand' -a 'egress' -d 'Record or stream media from LiveKit to elsewhere' complete -c lk -n '__fish_seen_subcommand_from egress' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from egress; and not __fish_seen_subcommand_from start list stop test-template update-layout update-stream' -a 'start' -d 'Start egresses of various types' -complete -c lk -n '__fish_seen_subcommand_from start' -f -l type -r -d 'Specify `TYPE` of egress (see above)' -complete -c lk -n '__fish_seen_subcommand_from start' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from start; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from start' -f -l type -r -d 'Specify `TYPE` of egress (see above)' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from start' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from start; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from egress; and not __fish_seen_subcommand_from start list stop test-template update-layout update-stream' -a 'list' -d 'List and search active egresses' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l id -r -d 'List a specific egress `ID`, can be used multiple times' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l room -r -d 'Limits list to a certain room `NAME`' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l active -s a -d 'Lists only active egresses' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list' -f -l id -r -d 'List a specific egress `ID`, can be used multiple times' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list' -f -l room -r -d 'Limits list to a certain room `NAME`' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list' -f -l active -s a -d 'Lists only active egresses' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from egress; and not __fish_seen_subcommand_from start list stop test-template update-layout update-stream' -a 'stop' -d 'Stop an active egress' -complete -c lk -n '__fish_seen_subcommand_from stop' -f -l id -r -d 'Egress ID to stop, can be specified multiple times' -complete -c lk -n '__fish_seen_subcommand_from stop' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from stop; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from stop' -f -l id -r -d 'Egress ID to stop, can be specified multiple times' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from stop' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from stop; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from egress; and not __fish_seen_subcommand_from start list stop test-template update-layout update-stream' -a 'test-template' -d 'See what your egress template will look like in a recording' -complete -c lk -n '__fish_seen_subcommand_from test-template' -f -l base-url -r -d 'Base template `URL`' -complete -c lk -n '__fish_seen_subcommand_from test-template' -f -l layout -r -d 'Layout `TYPE`' -complete -c lk -n '__fish_seen_subcommand_from test-template' -f -l publishers -r -d '`NUMBER` of publishers' -complete -c lk -n '__fish_seen_subcommand_from test-template' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from test-template' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from test-template; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from test-template' -f -l base-url -r -d 'Base template `URL`' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from test-template' -f -l layout -r -d 'Layout `TYPE`' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from test-template' -f -l publishers -r -d '`NUMBER` of publishers' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from test-template' -f -l room -r -d '`NAME` of the room' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from test-template' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from test-template; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from egress; and not __fish_seen_subcommand_from start list stop test-template update-layout update-stream' -a 'update-layout' -d 'Updates layout for a live room composite egress' -complete -c lk -n '__fish_seen_subcommand_from update-layout' -f -l id -r -d 'Egress ID' -complete -c lk -n '__fish_seen_subcommand_from update-layout' -f -l layout -r -d 'new web layout' -complete -c lk -n '__fish_seen_subcommand_from update-layout' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from update-layout; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from update-layout' -f -l id -r -d 'Egress ID' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from update-layout' -f -l layout -r -d 'new web layout' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from update-layout' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from update-layout; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from egress; and not __fish_seen_subcommand_from start list stop test-template update-layout update-stream' -a 'update-stream' -d 'Adds or removes RTMP output urls from a live stream' -complete -c lk -n '__fish_seen_subcommand_from update-stream' -f -l id -r -d 'Egress ID' -complete -c lk -n '__fish_seen_subcommand_from update-stream' -f -l add-urls -r -d 'urls to add' -complete -c lk -n '__fish_seen_subcommand_from update-stream' -f -l remove-urls -r -d 'urls to remove' -complete -c lk -n '__fish_seen_subcommand_from update-stream' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from update-stream; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from start-room-composite-egress' -f -l request -r -d 'RoomCompositeEgressRequest as JSON file' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from update-stream' -f -l id -r -d 'Egress ID' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from update-stream' -f -l add-urls -r -d 'urls to add' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from update-stream' -f -l remove-urls -r -d 'urls to remove' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from update-stream' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from update-stream; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from start-room-composite-egress' -f -l request -r -d 'RoomCompositeEgressRequest as JSON file (or - for stdin)' complete -c lk -n '__fish_seen_subcommand_from start-room-composite-egress' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from start-room-composite-egress; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -c lk -n '__fish_seen_subcommand_from start-web-egress' -f -l request -r -d 'WebEgressRequest as json file (see cmd/livekit-cli/examples)' @@ -430,20 +573,20 @@ complete -x -c lk -n '__fish_seen_subcommand_from test-egress-template; and not complete -x -c lk -n '__fish_lk_no_subcommand' -a 'ingress' -d 'Import outside media sources into a LiveKit room' complete -c lk -n '__fish_seen_subcommand_from ingress' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from ingress; and not __fish_seen_subcommand_from create update list delete help h' -a 'create' -d 'Create an ingress' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from ingress; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from ingress; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from ingress; and not __fish_seen_subcommand_from create update list delete help h' -a 'update' -d 'Update an ingress' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from ingress; and __fish_seen_subcommand_from update' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from ingress; and __fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from ingress; and not __fish_seen_subcommand_from create update list delete help h' -a 'list' -d 'List all active ingress' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l room -r -d 'Limits list to a certain room `NAME`' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l id -r -d 'List a specific ingress `ID`' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from ingress; and __fish_seen_subcommand_from list' -f -l room -r -d 'Limits list to a certain room `NAME`' +complete -c lk -n '__fish_seen_subcommand_from ingress; and __fish_seen_subcommand_from list' -f -l id -r -d 'List a specific ingress `ID`' +complete -c lk -n '__fish_seen_subcommand_from ingress; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from ingress; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from ingress; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from ingress; and not __fish_seen_subcommand_from create update list delete help h' -a 'delete' -d 'Delete an ingress' -complete -c lk -n '__fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from ingress; and __fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from ingress; and __fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from ingress; and not __fish_seen_subcommand_from create update list delete help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -c lk -n '__fish_seen_subcommand_from create-ingress' -f -l request -r -d 'CreateIngressRequest as json file (see cmd/lk/examples)' complete -c lk -n '__fish_seen_subcommand_from create-ingress' -f -l help -s h -d 'show help' @@ -461,117 +604,123 @@ complete -x -c lk -n '__fish_seen_subcommand_from delete-ingress; and not __fish complete -x -c lk -n '__fish_lk_no_subcommand' -a 'sip' -d 'Manage SIP Trunks, Dispatch Rules, and Participants' complete -c lk -n '__fish_seen_subcommand_from sip' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from sip; and not __fish_seen_subcommand_from inbound in inbound-trunk outbound out outbound-trunk dispatch dispatch-rule participant help h' -a 'inbound' -d 'Inbound SIP Trunk management' -complete -c lk -n '__fish_seen_subcommand_from inbound in inbound-trunk' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from inbound in inbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'list' -d 'List all inbound SIP Trunks' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from inbound in inbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'create' -d 'Create an inbound SIP Trunk' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l name -r -d 'Sets a new name for the trunk' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l numbers -r -d 'Sets a list of numbers for the trunk' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l media-enc -r -d 'Sets media encryption for the trunk' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l auth-user -r -d 'Set username for authentication' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l auth-pass -r -d 'Set password for authentication' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from inbound in inbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'update' -d 'Update an inbound SIP Trunk' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l id -r -d 'ID for the trunk to update' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l name -r -d 'Sets a new name for the trunk' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l numbers -r -d 'Sets a new list of numbers for the trunk' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l auth-user -r -d 'Set username for authentication' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l auth-pass -r -d 'Set password for authentication' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from inbound in inbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'delete' -d 'Delete a SIP Trunk' -complete -c lk -n '__fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from inbound in inbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'list' -d 'List all inbound SIP Trunks' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'create' -d 'Create an inbound SIP Trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from create' -f -l name -r -d 'Sets a new name for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from create' -f -l numbers -r -d 'Sets a list of numbers for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from create' -f -l media-enc -r -d 'Sets media encryption for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from create' -f -l auth-user -r -d 'Set username for authentication' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from create' -f -l auth-pass -r -d 'Set password for authentication' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'update' -d 'Update an inbound SIP Trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from update' -f -l id -r -d 'ID for the trunk to update' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from update' -f -l name -r -d 'Sets a new name for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from update' -f -l numbers -r -d 'Sets a new list of numbers for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from update' -f -l auth-user -r -d 'Set username for authentication' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from update' -f -l auth-pass -r -d 'Set password for authentication' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from update' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'delete' -d 'Delete a SIP Trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and __fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from inbound in inbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from sip; and not __fish_seen_subcommand_from inbound in inbound-trunk outbound out outbound-trunk dispatch dispatch-rule participant help h' -a 'outbound' -d 'Outbound SIP Trunk management' -complete -c lk -n '__fish_seen_subcommand_from outbound out outbound-trunk' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from outbound out outbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'list' -d 'List all outbound SIP Trunk' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from outbound out outbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'create' -d 'Create an outbound SIP Trunk' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l name -r -d 'Sets a new name for the trunk' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l address -r -d 'Sets a destination address for the trunk' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l transport -r -d 'Sets a transport for the trunk' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l destination-country -r -d 'Sets a destination country for the trunk as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l media-enc -r -d 'Sets media encryption for the trunk' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l numbers -r -d 'Sets a list of numbers for the trunk' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l auth-user -r -d 'Set username for authentication' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l auth-pass -r -d 'Set password for authentication' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from outbound out outbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'update' -d 'Update an outbound SIP Trunk' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l id -r -d 'ID for the trunk to update' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l name -r -d 'Sets a new name for the trunk' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l address -r -d 'Sets a new destination address for the trunk' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l transport -r -d 'Sets a new transport for the trunk' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l destination-country -r -d 'Sets a destination country for the trunk as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l numbers -r -d 'Sets a new list of numbers for the trunk' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l auth-user -r -d 'Set username for authentication' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l auth-pass -r -d 'Set password for authentication' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from outbound out outbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'delete' -d 'Delete SIP Trunk' -complete -c lk -n '__fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from outbound out outbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'list' -d 'List all outbound SIP Trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'create' -d 'Create an outbound SIP Trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from create' -f -l name -r -d 'Sets a new name for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from create' -f -l address -r -d 'Sets a destination address for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from create' -f -l transport -r -d 'Sets a transport for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from create' -f -l destination-country -r -d 'Sets a destination country for the trunk as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from create' -f -l media-enc -r -d 'Sets media encryption for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from create' -f -l numbers -r -d 'Sets a list of numbers for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from create' -f -l auth-user -r -d 'Set username for authentication' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from create' -f -l auth-pass -r -d 'Set password for authentication' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'update' -d 'Update an outbound SIP Trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from update' -f -l id -r -d 'ID for the trunk to update' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from update' -f -l name -r -d 'Sets a new name for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from update' -f -l address -r -d 'Sets a new destination address for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from update' -f -l transport -r -d 'Sets a new transport for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from update' -f -l destination-country -r -d 'Sets a destination country for the trunk as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from update' -f -l numbers -r -d 'Sets a new list of numbers for the trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from update' -f -l auth-user -r -d 'Set username for authentication' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from update' -f -l auth-pass -r -d 'Set password for authentication' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from update' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'delete' -d 'Delete SIP Trunk' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and __fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from outbound out outbound-trunk; and not __fish_seen_subcommand_from list create update delete help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from sip; and not __fish_seen_subcommand_from inbound in inbound-trunk outbound out outbound-trunk dispatch dispatch-rule participant help h' -a 'dispatch' -d 'SIP Dispatch Rule management' -complete -c lk -n '__fish_seen_subcommand_from dispatch dispatch-rule' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from dispatch dispatch-rule; and not __fish_seen_subcommand_from list create update delete help h' -a 'list' -d 'List all SIP Dispatch Rule' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from dispatch dispatch-rule; and not __fish_seen_subcommand_from list create update delete help h' -a 'create' -d 'Create a SIP Dispatch Rule' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l name -r -d 'Sets a new name for the dispatch rule' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l trunks -r -d 'Sets a list of trunks for the dispatch rule' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l direct -r -d 'Sets a direct dispatch to a specified room' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l caller -s individual -r -d 'Sets a individual caller dispatch to a new room with a specific prefix' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l callee -r -d 'Sets a callee number dispatch to a new room with a specific prefix' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l pin -d 'PIN for a dispatch rule' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l randomize -d 'Randomize room name, only applies to callee dispatch' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from dispatch dispatch-rule; and not __fish_seen_subcommand_from list create update delete help h' -a 'update' -d 'Update a SIP Dispatch Rule' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l id -r -d 'ID for the rule to update' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l name -r -d 'Sets a new name for the rule' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l trunks -r -d 'Sets a new list of trunk IDs' -complete -c lk -n '__fish_seen_subcommand_from update' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from dispatch dispatch-rule; and not __fish_seen_subcommand_from list create update delete help h' -a 'delete' -d 'Delete SIP Dispatch Rule' -complete -c lk -n '__fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from dispatch dispatch-rule; and not __fish_seen_subcommand_from list create update delete help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and not __fish_seen_subcommand_from list create update delete help h' -a 'list' -d 'List all SIP Dispatch Rule' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and not __fish_seen_subcommand_from list create update delete help h' -a 'create' -d 'Create a SIP Dispatch Rule' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from create' -f -l name -r -d 'Sets a new name for the dispatch rule' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from create' -f -l trunks -r -d 'Sets a list of trunks for the dispatch rule' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from create' -f -l direct -r -d 'Sets a direct dispatch to a specified room' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from create' -f -l caller -s individual -r -d 'Sets a individual caller dispatch to a new room with a specific prefix' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from create' -f -l callee -r -d 'Sets a callee number dispatch to a new room with a specific prefix' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from create' -f -l randomize -d 'Randomize room name' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and not __fish_seen_subcommand_from list create update delete help h' -a 'update' -d 'Update a SIP Dispatch Rule' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from update' -f -l id -r -d 'ID for the rule to update' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from update' -f -l name -r -d 'Sets a new name for the rule' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from update' -f -l trunks -r -d 'Sets a new list of trunk IDs' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from update' -f -l help -s h -d 'show help' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from update' -f -l direct -r -d 'Sets a direct dispatch to a specified room' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from update' -f -l caller -s individual -r -d 'Sets a individual caller dispatch to a new room with a specific prefix' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from update' -f -l callee -r -d 'Sets a callee number dispatch to a new room with a specific prefix' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from update' -f -l randomize -d 'Randomize room name' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and not __fish_seen_subcommand_from list create update delete help h' -a 'delete' -d 'Delete SIP Dispatch Rule' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and __fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from dispatch dispatch-rule; and not __fish_seen_subcommand_from list create update delete help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from sip; and not __fish_seen_subcommand_from inbound in inbound-trunk outbound out outbound-trunk dispatch dispatch-rule participant help h' -a 'participant' -d 'SIP Participant management' -complete -c lk -n '__fish_seen_subcommand_from participant' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from participant; and not __fish_seen_subcommand_from create transfer help h' -a 'create' -d 'Create a SIP Participant' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l trunk -r -d '`SIP_TRUNK_ID` to use for the call (overrides json config)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l number -r -d '`SIP_NUMBER` to use for the call (overrides json config)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l call -r -d '`SIP_CALL_TO` number to use (overrides json config)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l room -r -d '`ROOM_NAME` to place the call to (overrides json config)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l identity -r -d '`PARTICIPANT_IDENTITY` to use (overrides json config)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l name -r -d '`PARTICIPANT_NAME` to use (overrides json config)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l wait -d 'wait for the call to dial (overrides json config)' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l timeout -r -d 'timeout for the call to dial' -complete -c lk -n '__fish_seen_subcommand_from create' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from participant; and not __fish_seen_subcommand_from create transfer help h' -a 'transfer' -d 'Transfer a SIP Participant' -complete -c lk -n '__fish_seen_subcommand_from transfer' -f -l room -r -d '`NAME` of the room' -complete -c lk -n '__fish_seen_subcommand_from transfer' -f -l identity -r -d '`ID` of participant' -complete -c lk -n '__fish_seen_subcommand_from transfer' -f -l to -r -d '`SIP URL` to transfer the call to. Use \'tel:\' to transfer to a phone' -complete -c lk -n '__fish_seen_subcommand_from transfer' -f -l play-dialtone -d 'if set, a dial tone will be played to the SIP participant while the transfer is being attempted' -complete -c lk -n '__fish_seen_subcommand_from transfer' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from transfer; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from participant; and not __fish_seen_subcommand_from create transfer help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and not __fish_seen_subcommand_from create transfer help h' -a 'create' -d 'Create a SIP Participant' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create' -f -l identity -s i -r -d '`ID` of participant (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create' -f -l trunk -r -d '`SIP_TRUNK_ID` to use for the call (overrides json config)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create' -f -l number -r -d '`SIP_NUMBER` to use for the call (overrides json config)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create' -f -l call -r -d '`SIP_CALL_TO` number to use (overrides json config)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create' -f -l name -r -d '`PARTICIPANT_NAME` to use (overrides json config)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create' -f -l display-name -r -d '`DISPLAY_NAME` for the \'From\' SIP header (overrides json config)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create' -f -l no-display-name -d 'Avoid defaulting the display name, and do a CNAM lookup instead (overrides display-name setting)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create' -f -l wait -d 'wait for the call to dial (overrides json config)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create' -f -l timeout -r -d 'timeout for the call to dial' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create' -f -l header -r -d 'Custom SIP header in format \'Key:Value\' (can be specified multiple times)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and not __fish_seen_subcommand_from create transfer help h' -a 'transfer' -d 'Transfer a SIP Participant' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from transfer' -f -l room -s r -r -d '`NAME` of the room (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from transfer' -f -l identity -s i -r -d '`ID` of participant (supports templates)' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from transfer' -f -l to -r -d '`SIP URL` to transfer the call to. Use \'tel:\' to transfer to a phone' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from transfer' -f -l play-dialtone -d 'if set, a dial tone will be played to the SIP participant while the transfer is being attempted' +complete -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from transfer' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and __fish_seen_subcommand_from transfer; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from sip; and __fish_seen_subcommand_from participant; and not __fish_seen_subcommand_from create transfer help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from sip; and not __fish_seen_subcommand_from inbound in inbound-trunk outbound out outbound-trunk dispatch dispatch-rule participant help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -c lk -n '__fish_seen_subcommand_from list-sip-trunk' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from list-sip-trunk; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -c lk -n '__fish_seen_subcommand_from delete-sip-trunk' -f -l id -r -d 'SIPTrunk ID' complete -c lk -n '__fish_seen_subcommand_from delete-sip-trunk' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from delete-sip-trunk; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from create-sip-dispatch-rule' -f -l request -r -d 'CreateSIPDispatchRuleRequest as JSON file' +complete -c lk -n '__fish_seen_subcommand_from create-sip-dispatch-rule' -f -l request -r -d 'CreateSIPDispatchRuleRequest as JSON file (or - for stdin)' complete -c lk -n '__fish_seen_subcommand_from create-sip-dispatch-rule' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from create-sip-dispatch-rule; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -c lk -n '__fish_seen_subcommand_from list-sip-dispatch-rule' -f -l help -s h -d 'show help' @@ -579,57 +728,103 @@ complete -x -c lk -n '__fish_seen_subcommand_from list-sip-dispatch-rule; and no complete -c lk -n '__fish_seen_subcommand_from delete-sip-dispatch-rule' -f -l id -r -d 'SIPDispatchRule ID' complete -c lk -n '__fish_seen_subcommand_from delete-sip-dispatch-rule' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from delete-sip-dispatch-rule; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -c lk -n '__fish_seen_subcommand_from create-sip-participant' -f -l request -r -d 'CreateSIPParticipantRequest as JSON file' +complete -c lk -n '__fish_seen_subcommand_from create-sip-participant' -f -l request -r -d 'CreateSIPParticipantRequest as JSON file (or - for stdin)' complete -c lk -n '__fish_seen_subcommand_from create-sip-participant' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from create-sip-participant; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_lk_no_subcommand' -a 'number' -d 'Manage phone numbers' +complete -c lk -n '__fish_seen_subcommand_from number' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from number; and not __fish_seen_subcommand_from search purchase list get update release help h' -a 'search' -d 'Search available phone numbers in inventory' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from search' -f -l country-code -r -d 'Filter by country code (e.g., "US", "CA")' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from search' -f -l area-code -r -d 'Filter by area code (e.g., "415")' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from search' -f -l limit -r -d 'Maximum number of results (default: 50)' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from search' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from search' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from search; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from number; and not __fish_seen_subcommand_from search purchase list get update release help h' -a 'purchase' -d 'Purchase phone numbers from inventory' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from purchase' -f -l numbers -r -d 'Phone numbers to purchase (e.g., "+1234567890", "+1234567891")' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from purchase' -f -l sip-dispatch-rule-id -r -d 'SIP dispatch rule ID to apply to all purchased numbers' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from purchase' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from purchase; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from number; and not __fish_seen_subcommand_from search purchase list get update release help h' -a 'list' -d 'List phone numbers for a project' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from list' -f -l limit -r -d 'Maximum number of results per page (default: 50)' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from list' -f -l offset -r -d 'Offset for pagination (default: 0)' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from list' -f -l status -r -d 'Filter by status(es) (active, pending, released, offline). Multiple values can be specified.' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from list' -f -l sip-dispatch-rule-id -r -d 'Filter by SIP dispatch rule ID' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from number; and not __fish_seen_subcommand_from search purchase list get update release help h' -a 'get' -d 'Get a phone number from a project' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from get' -f -l id -r -d 'Use phone number ID for direct lookup' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from get' -f -l number -r -d 'Use phone number string for lookup' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from get' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from get; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from number; and not __fish_seen_subcommand_from search purchase list get update release help h' -a 'update' -d 'Update a phone number in a project' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from update' -f -l id -r -d 'Use phone number ID for direct lookup' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from update' -f -l number -r -d 'Use phone number string for lookup' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from update' -f -l sip-dispatch-rule-id -r -d 'SIP dispatch rule ID to assign to the phone number' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from update' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from number; and not __fish_seen_subcommand_from search purchase list get update release help h' -a 'release' -d 'Release phone numbers' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from release' -f -l ids -r -d 'Use phone number IDs for direct lookup' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from release' -f -l numbers -r -d 'Use phone number strings for lookup' +complete -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from release' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from number; and __fish_seen_subcommand_from release; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from number; and not __fish_seen_subcommand_from search purchase list get update release help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -c lk -n '__fish_seen_subcommand_from replay' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from list load seek close delete' -a 'list' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' -complete -c lk -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from list load seek close delete' -a 'load' -complete -c lk -n '__fish_seen_subcommand_from load' -f -l id -r -d 'Replay `ID`' -complete -c lk -n '__fish_seen_subcommand_from load' -f -l room -r -d 'Playback room name' -complete -c lk -n '__fish_seen_subcommand_from load' -f -l pts -r -d 'Playback start time' -complete -c lk -n '__fish_seen_subcommand_from load' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from load; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from list load seek close delete' -a 'seek' -complete -c lk -n '__fish_seen_subcommand_from seek' -f -l id -r -d 'Playback `ID`' -complete -c lk -n '__fish_seen_subcommand_from seek' -f -l pts -r -d 'Playback start time' -complete -c lk -n '__fish_seen_subcommand_from seek' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from seek; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from list load seek close delete' -a 'close' -complete -c lk -n '__fish_seen_subcommand_from close' -f -l id -r -d 'Playback `ID`' -complete -c lk -n '__fish_seen_subcommand_from close' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from close; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from list load seek close delete' -a 'delete' -complete -c lk -n '__fish_seen_subcommand_from delete' -f -l id -r -d 'Replay `ID`' -complete -c lk -n '__fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from list playback seek close export delete' -a 'list' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from list' -f -l room -r -d 'Playback room name' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from list' -f -l token -r -d 'Pagination token' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from list playback seek close export delete' -a 'playback' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from playback' -f -l id -r -d 'Replay `ID`' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from playback' -f -l room -r -d 'Playback room name' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from playback' -f -l offset -r -d 'Playback start time (ex: 30s, 1m)' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from playback' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from playback; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from list playback seek close export delete' -a 'seek' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from seek' -f -l id -r -d 'Playback `ID`' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from seek' -f -l offset -r -d 'Playback start time (ex: 30s, 1m)' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from seek' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from seek; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from list playback seek close export delete' -a 'close' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from close' -f -l id -r -d 'Playback `ID`' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from close' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from close; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from list playback seek close export delete' -a 'export' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from export' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from export; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from replay; and not __fish_seen_subcommand_from list playback seek close export delete' -a 'delete' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from delete' -f -l id -r -d 'Replay `ID`' +complete -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from delete' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from replay; and __fish_seen_subcommand_from delete; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_lk_no_subcommand' -a 'perf' -d 'Performance testing commands' complete -c lk -n '__fish_seen_subcommand_from perf' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from perf; and not __fish_seen_subcommand_from load-test agent-load-test help h' -a 'load-test' -d 'Run load tests against LiveKit with simulated publishers & subscribers' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l room -r -d '`NAME` of the room (default to random name)' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l duration -r -d '`TIME` duration to run, 1m, 1h (by default will run until canceled)' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l video-publishers -s publishers -r -d '`NUMBER` of participants that would publish video tracks' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l audio-publishers -r -d '`NUMBER` of participants that would publish audio tracks' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l subscribers -r -d '`NUMBER` of participants that would subscribe to tracks' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l identity-prefix -r -d 'Identity `PREFIX` of tester participants (defaults to a random prefix)' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l video-resolution -r -d 'Resolution `QUALITY` of video to publish ("high", "medium", or "low")' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l video-codec -r -d '`CODEC` "h264" or "vp8", both will be used when unset' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l num-per-second -r -d '`NUMBER` of testers to start every second' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l layout -r -d '`LAYOUT` to simulate, choose from "speaker", "3x3", "4x4", "5x5"' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l no-simulcast -d 'Disables simulcast publishing (simulcast is enabled by default)' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l simulate-speakers -d 'Fire random speaker events to simulate speaker changes' -complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from load-test; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l room -r -d '`NAME` of the room (default to random name)' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l duration -r -d '`TIME` duration to run, 1m, 1h (by default will run until canceled)' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l video-publishers -s publishers -r -d '`NUMBER` of participants that would publish video tracks' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l audio-publishers -r -d '`NUMBER` of participants that would publish audio tracks' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l subscribers -r -d '`NUMBER` of participants that would subscribe to tracks' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l identity-prefix -r -d 'Identity `PREFIX` of tester participants (defaults to a random prefix)' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l video-resolution -r -d 'Resolution `QUALITY` of video to publish ("high", "medium", or "low")' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l video-codec -r -d '`CODEC` "h264" or "vp8", both will be used when unset' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l num-per-second -r -d '`NUMBER` of testers to start every second' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l layout -r -d '`LAYOUT` to simulate, choose from "speaker", "3x3", "4x4", "5x5"' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l no-simulcast -d 'Disables simulcast publishing (simulcast is enabled by default)' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l simulate-speakers -d 'Fire random speaker events to simulate speaker changes' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from load-test; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from perf; and not __fish_seen_subcommand_from load-test agent-load-test help h' -a 'agent-load-test' -d 'Run load tests for a running agent' -complete -c lk -n '__fish_seen_subcommand_from agent-load-test' -f -l rooms -r -d '`NUMBER` of rooms to open' -complete -c lk -n '__fish_seen_subcommand_from agent-load-test' -f -l agent-name -r -d 'name of the running agent to dispatch to the rooom' -complete -c lk -n '__fish_seen_subcommand_from agent-load-test' -f -l echo-speech-delay -r -d 'delay between when the echo track speaks and when the agent starts speaking (e.g. 5s, 1m)' -complete -c lk -n '__fish_seen_subcommand_from agent-load-test' -f -l duration -r -d '`TIME` duration to run, 1m, 1h (by default will run until canceled)' -complete -c lk -n '__fish_seen_subcommand_from agent-load-test' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from agent-load-test; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from agent-load-test' -f -l rooms -r -d '`NUMBER` of rooms to open' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from agent-load-test' -f -l agent-name -r -d 'name of the running agent to dispatch to the rooom' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from agent-load-test' -f -l echo-speech-delay -r -d 'delay between when the echo track speaks and when the agent starts speaking (e.g. 5s, 1m)' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from agent-load-test' -f -l duration -r -d '`TIME` duration to run, 1m, 1h (by default will run until canceled)' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from agent-load-test' -f -l attribute -r -d 'set attributes in key=value format, can be used multiple times' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from agent-load-test' -l attribute-file -r -d 'read attributes from a `JSON` file' +complete -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from agent-load-test' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from perf; and __fish_seen_subcommand_from agent-load-test; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from perf; and not __fish_seen_subcommand_from load-test agent-load-test help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l room -r -d '`NAME` of the room (default to random name)' complete -c lk -n '__fish_seen_subcommand_from load-test' -f -l duration -r -d '`TIME` duration to run, 1m, 1h (by default will run until canceled)' diff --git a/cmd/lk/agent_reload.go b/cmd/lk/agent_reload.go index 3ab60116..b5a18293 100644 --- a/cmd/lk/agent_reload.go +++ b/cmd/lk/agent_reload.go @@ -1,5 +1,3 @@ -//go:build console - package main import ( diff --git a/cmd/lk/agent_run.go b/cmd/lk/agent_run.go index 2d41d574..22ce6b4b 100644 --- a/cmd/lk/agent_run.go +++ b/cmd/lk/agent_run.go @@ -1,5 +1,3 @@ -//go:build console - // Copyright 2025 LiveKit, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/cmd/lk/agent_watcher.go b/cmd/lk/agent_watcher.go index 8014a40c..cdab465e 100644 --- a/cmd/lk/agent_watcher.go +++ b/cmd/lk/agent_watcher.go @@ -1,5 +1,3 @@ -//go:build console - // Copyright 2021-2024 LiveKit, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/cmd/lk/console.go b/cmd/lk/console.go index 40e8d65b..724791c2 100644 --- a/cmd/lk/console.go +++ b/cmd/lk/console.go @@ -1,5 +1,3 @@ -//go:build console - // Copyright 2025 LiveKit, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/cmd/lk/console_stub.go b/cmd/lk/console_stub.go deleted file mode 100644 index 9b3deb31..00000000 --- a/cmd/lk/console_stub.go +++ /dev/null @@ -1,6 +0,0 @@ -//go:build !console - -package main - -// No-op: start, dev, console, and simulate commands are only available -// when built with the console tag (go build -tags console). diff --git a/cmd/lk/console_tui.go b/cmd/lk/console_tui.go index 668d8530..a074d08d 100644 --- a/cmd/lk/console_tui.go +++ b/cmd/lk/console_tui.go @@ -1,5 +1,3 @@ -//go:build console - // Copyright 2025 LiveKit, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/cmd/lk/main.go b/cmd/lk/main.go index 8a43cd2c..1e59c142 100644 --- a/cmd/lk/main.go +++ b/cmd/lk/main.go @@ -135,7 +135,7 @@ func initLogger(ctx context.Context, cmd *cli.Command) (context.Context, error) } func generateFishCompletion(ctx context.Context, cmd *cli.Command) error { - fishScript, err := cmd.ToFishCompletion() + fishScript, err := cmd.Root().ToFishCompletion() if err != nil { return err } diff --git a/cmd/lk/simulate.go b/cmd/lk/simulate.go index dcbcff7a..809ffce5 100644 --- a/cmd/lk/simulate.go +++ b/cmd/lk/simulate.go @@ -1,5 +1,3 @@ -//go:build console - // Copyright 2025 LiveKit, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/cmd/lk/simulate_ci.go b/cmd/lk/simulate_ci.go index ec32192c..08e99d56 100644 --- a/cmd/lk/simulate_ci.go +++ b/cmd/lk/simulate_ci.go @@ -1,5 +1,3 @@ -//go:build console - // Copyright 2025 LiveKit, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/cmd/lk/simulate_matrix.go b/cmd/lk/simulate_matrix.go index 2621a7c9..7160f277 100644 --- a/cmd/lk/simulate_matrix.go +++ b/cmd/lk/simulate_matrix.go @@ -1,5 +1,3 @@ -//go:build console - // Copyright 2025 LiveKit, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/cmd/lk/simulate_save.go b/cmd/lk/simulate_save.go new file mode 100644 index 00000000..d67c79b0 --- /dev/null +++ b/cmd/lk/simulate_save.go @@ -0,0 +1,330 @@ +// Copyright 2025 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "context" + "fmt" + "strings" + "time" + + tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/lipgloss" + + "github.com/livekit/protocol/livekit" + lksdk "github.com/livekit/server-sdk-go/v2" +) + +type savePhase int + +const ( + savePhaseLoading savePhase = iota + savePhaseList + savePhaseNewGroup + savePhaseSaving + savePhaseSuccess + savePhaseError +) + +type saveOverlay struct { + active bool + client *lksdk.AgentSimulationClient + job *livekit.SimulationRun_Job + phase savePhase + groups []*livekit.ScenarioGroup + cursor int + groupInput string + err error + successMsg string + spinnerIdx int + width int +} + +// --- Messages --- + +type saveGroupsLoadedMsg struct { + groups []*livekit.ScenarioGroup + err error +} + +type scenarioSavedMsg struct { + groupLabel string + err error +} + +type saveDismissMsg struct{} + +type saveSpinnerTickMsg struct{} + +func saveSpinnerTickCmd() tea.Cmd { + return tea.Tick(80*time.Millisecond, func(time.Time) tea.Msg { + return saveSpinnerTickMsg{} + }) +} + +// --- Lifecycle --- + +func (s *saveOverlay) start(client *lksdk.AgentSimulationClient, job *livekit.SimulationRun_Job, width int) { + *s = saveOverlay{ + active: true, + client: client, + job: job, + phase: savePhaseLoading, + width: width, + } +} + +// --- Async commands --- + +func (s *saveOverlay) fetchGroupsCmd() tea.Cmd { + client := s.client + return func() tea.Msg { + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + resp, err := client.ListScenarioGroups(ctx, &livekit.ScenarioGroup_List_Request{}) + if err != nil { + return saveGroupsLoadedMsg{err: err} + } + return saveGroupsLoadedMsg{groups: resp.GetScenarioGroups()} + } +} + +func (s *saveOverlay) saveScenarioCmd(groupID, groupLabel string) tea.Cmd { + client := s.client + job := s.job + return func() tea.Msg { + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + _, err := client.CreateScenario(ctx, &livekit.Scenario_Create_Request{ + GroupId: groupID, + Label: job.Label, + Instructions: job.Instructions, + AgentExpectations: job.AgentExpectations, + }) + if err != nil { + return scenarioSavedMsg{err: err} + } + return scenarioSavedMsg{groupLabel: groupLabel} + } +} + +func (s *saveOverlay) createGroupAndSaveCmd(groupLabel string) tea.Cmd { + client := s.client + job := s.job + return func() tea.Msg { + ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) + defer cancel() + groupResp, err := client.CreateScenarioGroup(ctx, &livekit.ScenarioGroup_Create_Request{ + Label: groupLabel, + }) + if err != nil { + return scenarioSavedMsg{err: fmt.Errorf("create group: %w", err)} + } + _, err = client.CreateScenario(ctx, &livekit.Scenario_Create_Request{ + GroupId: groupResp.GetScenarioGroup().GetId(), + Label: job.Label, + Instructions: job.Instructions, + AgentExpectations: job.AgentExpectations, + }) + if err != nil { + return scenarioSavedMsg{err: err} + } + return scenarioSavedMsg{groupLabel: groupLabel} + } +} + +// --- Message handling --- + +func (s *saveOverlay) handleMsg(msg tea.Msg) tea.Cmd { + switch msg := msg.(type) { + case saveGroupsLoadedMsg: + if msg.err != nil { + s.phase = savePhaseError + s.err = msg.err + return nil + } + s.groups = msg.groups + s.phase = savePhaseList + s.cursor = 0 + return nil + + case scenarioSavedMsg: + if msg.err != nil { + s.phase = savePhaseError + s.err = msg.err + return nil + } + s.phase = savePhaseSuccess + s.successMsg = msg.groupLabel + return tea.Tick(2*time.Second, func(time.Time) tea.Msg { + return saveDismissMsg{} + }) + + case saveDismissMsg: + s.active = false + return nil + + case saveSpinnerTickMsg: + if s.active && (s.phase == savePhaseLoading || s.phase == savePhaseSaving) { + s.spinnerIdx++ + return saveSpinnerTickCmd() + } + return nil + } + return nil +} + +// --- Key handling --- + +func (s *saveOverlay) handleKey(key string) tea.Cmd { + switch s.phase { + case savePhaseLoading, savePhaseSaving: + if key == "esc" { + s.active = false + } + return nil + + case savePhaseSuccess: + s.active = false + return nil + + case savePhaseError: + switch key { + case "esc", "q": + s.active = false + case "r": + s.phase = savePhaseLoading + s.err = nil + return tea.Batch(s.fetchGroupsCmd(), saveSpinnerTickCmd()) + } + return nil + + case savePhaseNewGroup: + switch key { + case "esc": + s.phase = savePhaseList + s.groupInput = "" + case "enter": + name := strings.TrimSpace(s.groupInput) + if name != "" { + s.phase = savePhaseSaving + return tea.Batch(s.createGroupAndSaveCmd(name), saveSpinnerTickCmd()) + } + case "backspace": + if len(s.groupInput) > 0 { + s.groupInput = s.groupInput[:len(s.groupInput)-1] + } + default: + if len(key) == 1 && key[0] >= 32 { + s.groupInput += key + } + } + return nil + + case savePhaseList: + maxIdx := len(s.groups) // extra slot for "+ New Group..." + switch key { + case "esc", "q": + s.active = false + case "up", "shift+tab": + if s.cursor > 0 { + s.cursor-- + } + case "down", "tab": + if s.cursor < maxIdx { + s.cursor++ + } + case "enter": + if s.cursor < len(s.groups) { + group := s.groups[s.cursor] + s.phase = savePhaseSaving + return tea.Batch(s.saveScenarioCmd(group.Id, group.Label), saveSpinnerTickCmd()) + } + // "+ New Group..." selected + s.phase = savePhaseNewGroup + s.groupInput = "" + } + return nil + } + return nil +} + +// --- Rendering --- + +var ( + saveBoxStyle = lipgloss.NewStyle(). + Border(lipgloss.RoundedBorder()). + BorderForeground(lipgloss.Color("6")). + Padding(0, 1) + saveTitleStyle = lipgloss.NewStyle(). + Foreground(lipgloss.Color("6")). + Bold(true) + saveSelectedStyle = lipgloss.NewStyle(). + Foreground(lipgloss.Color("6")). + Bold(true) + saveNewGroupStyle = lipgloss.NewStyle(). + Foreground(lipgloss.Color("214")) +) + +func (s *saveOverlay) render() string { + boxWidth := min(max(s.width-8, 40), 60) + + var b strings.Builder + title := saveTitleStyle.Render("Save to Scenario Group") + b.WriteString(title + "\n") + + switch s.phase { + case savePhaseLoading: + spinner := simSpinnerFrames[s.spinnerIdx%len(simSpinnerFrames)] + b.WriteString(fmt.Sprintf("\n %s Loading scenario groups...\n", cyanStyle.Render(spinner))) + b.WriteString(dimStyle.Render("\n ESC cancel")) + + case savePhaseError: + b.WriteString(fmt.Sprintf("\n %s %s\n", redStyle.Render("✗"), redStyle.Render(s.err.Error()))) + b.WriteString(dimStyle.Render("\n r retry · ESC back")) + + case savePhaseList: + b.WriteString("\n") + for i, g := range s.groups { + label := g.Label + if i == s.cursor { + b.WriteString(fmt.Sprintf(" %s %s\n", saveSelectedStyle.Render(">"), saveSelectedStyle.Render(label))) + } else { + b.WriteString(fmt.Sprintf(" %s\n", label)) + } + } + // "+ New Group..." option + newLabel := "+ New Group..." + if s.cursor == len(s.groups) { + b.WriteString(fmt.Sprintf(" %s %s\n", saveNewGroupStyle.Render(">"), saveNewGroupStyle.Render(newLabel))) + } else { + b.WriteString(fmt.Sprintf(" %s\n", saveNewGroupStyle.Render(newLabel))) + } + b.WriteString(dimStyle.Render("\n ↑↓ navigate · ENTER select · ESC back")) + + case savePhaseNewGroup: + b.WriteString(fmt.Sprintf("\n Group name: %s%s\n", s.groupInput, cyanStyle.Render("│"))) + b.WriteString(dimStyle.Render("\n ENTER create · ESC cancel")) + + case savePhaseSaving: + spinner := simSpinnerFrames[s.spinnerIdx%len(simSpinnerFrames)] + b.WriteString(fmt.Sprintf("\n %s Saving scenario...\n", cyanStyle.Render(spinner))) + + case savePhaseSuccess: + b.WriteString(fmt.Sprintf("\n %s Saved to %s\n", greenStyle.Render("✓"), boldStyle.Render("\""+s.successMsg+"\""))) + } + + return "\n" + saveBoxStyle.Width(boxWidth).Render(b.String()) + "\n" +} diff --git a/cmd/lk/simulate_tui.go b/cmd/lk/simulate_tui.go index 795ed0d9..6fd7aec0 100644 --- a/cmd/lk/simulate_tui.go +++ b/cmd/lk/simulate_tui.go @@ -1,5 +1,3 @@ -//go:build console - // Copyright 2025 LiveKit, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/install-cli.sh b/install-cli.sh index 70ab9d6a..7cb13482 100755 --- a/install-cli.sh +++ b/install-cli.sh @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# LiveKit install script for Linux +# LiveKit CLI installer for Linux. Downloads the latest GitHub release archive +# and installs the binary + completions system-wide. set -u set -o errtrace @@ -27,102 +28,59 @@ BASH_COMPLETION_PATH="/usr/share/bash-completion/completions" ZSH_COMPLETION_PATH="/usr/share/zsh/site-functions" FISH_COMPLETION_PATH="/usr/share/fish/vendor_completions.d" -log() { printf "%b\n" "$*"; } -abort() { - printf "%s\n" "$@" >&2 - exit 1 -} - -# returns the latest version according to GH -# i.e. 1.0.0 -get_latest_version() -{ - latest_version=$(curl -s https://api.github.com/repos/livekit/$REPO/releases/latest | jq -r '.tag_name' | sed 's/^v//') - printf "%s" "$latest_version" -} - -# Ensure bash is used -if [ -z "${BASH_VERSION:-}" ] -then - abort "This script requires bash" -fi +log() { printf "%b\n" "$*"; } +abort() { printf "%s\n" "$@" >&2; exit 1; } -# Check if $INSTALL_PATH exists -if [ ! -d ${INSTALL_PATH} ] -then - abort "Could not install, ${INSTALL_PATH} doesn't exist" -fi +[ -n "${BASH_VERSION:-}" ] || abort "This script requires bash" +[ -d "$INSTALL_PATH" ] || abort "Could not install, $INSTALL_PATH doesn't exist" +command -v curl >/dev/null || abort "cURL is required and is not found" + +OS="$(uname)" +case "$OS" in + Darwin) abort "Installer not supported on MacOS, please install using Homebrew." ;; + Linux) ;; + *) abort "Installer is only supported on Linux." ;; +esac + +case "$(uname -m)" in + x86_64) ARCH="amd64" ;; + aarch64) ARCH="arm64" ;; + *) abort "Unsupported architecture: $(uname -m)" ;; +esac -# Needs SUDO if no permissions to write SUDO_PREFIX="" -if [ ! -w ${INSTALL_PATH} ] -then +if [ ! -w "$INSTALL_PATH" ]; then SUDO_PREFIX="sudo" - log "sudo is required to install to ${INSTALL_PATH}" -fi - -# Check cURL is installed -if ! command -v curl >/dev/null -then - abort "cURL is required and is not found" -fi - -# OS check -OS="$(uname)" -if [[ "${OS}" == "Darwin" ]] -then - abort "Installer not supported on MacOS, please install using Homebrew." -elif [[ "${OS}" != "Linux" ]] -then - abort "Installer is only supported on Linux." + log "sudo is required to install to $INSTALL_PATH" fi -ARCH="$(uname -m)" +VERSION=$(curl -fsSL https://api.github.com/repos/livekit/$REPO/releases/latest \ + | jq -r '.tag_name' | sed 's/^v//') -# fix arch on linux -if [[ "${ARCH}" == "aarch64" ]] -then - ARCH="arm64" -elif [[ "${ARCH}" == "x86_64" ]] -then - ARCH="amd64" -fi +[[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || abort "Invalid version: $VERSION" -VERSION=$(get_latest_version) ARCHIVE_URL="https://github.com/livekit/$REPO/releases/download/v${VERSION}/${BIN_NAME}_${VERSION}_linux_${ARCH}.tar.gz" -# Ensure version follows SemVer -if ! [[ "${VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] -then - abort "Invalid version: ${VERSION}" -fi - -log "Installing ${REPO} ${VERSION}" -log "Downloading from ${ARCHIVE_URL}..." - -TEMP_DIR_PATH="$(mktemp -d)" - -curl -s -L "${ARCHIVE_URL}" | tar xzf - -C "${TEMP_DIR_PATH}" --wildcards --no-anchored "$BIN_NAME*" +log "Installing $REPO $VERSION" +log "Downloading from $ARCHIVE_URL..." -${SUDO_PREFIX} mv "${TEMP_DIR_PATH}/lk" "${INSTALL_PATH}/lk" -${SUDO_PREFIX} ln -sf "${INSTALL_PATH}/lk" "${INSTALL_PATH}/livekit-cli" +TEMP_DIR=$(mktemp -d) +trap 'rm -rf "$TEMP_DIR"' EXIT -if [ -d "${TEMP_DIR_PATH}/autocomplete" ] -then - if [ -d "${BASH_COMPLETION_PATH}" ] - then - mv "${TEMP_DIR_PATH}/autocomplete/bash_autocomplete" "${BASH_COMPLETION_PATH}/livekit-cli" - fi +curl -fsSL "$ARCHIVE_URL" | tar xzf - -C "$TEMP_DIR" - if [ -d "${ZSH_COMPLETION_PATH}" ] - then - mv "${TEMP_DIR_PATH}/autocomplete/zsh_autocomplete" "${ZSH_COMPLETION_PATH}/_livekit-cli" - fi +$SUDO_PREFIX mv "$TEMP_DIR/$BIN_NAME" "$INSTALL_PATH/$BIN_NAME" +$SUDO_PREFIX ln -sf "$INSTALL_PATH/$BIN_NAME" "$INSTALL_PATH/livekit-cli" - if [ -d "${FISH_COMPLETION_PATH}" ] - then - lk generate-fish-completion -o "${FISH_COMPLETION_PATH}/livekit-cli.fish" - fi +# Install completions if the corresponding system directories exist. The fish +# completion ships in the archive (no need to invoke lk to regenerate it). +if [ -d "$TEMP_DIR/autocomplete" ]; then + [ -d "$BASH_COMPLETION_PATH" ] && \ + $SUDO_PREFIX install -m 0644 "$TEMP_DIR/autocomplete/bash_autocomplete" "$BASH_COMPLETION_PATH/livekit-cli" || true + [ -d "$ZSH_COMPLETION_PATH" ] && \ + $SUDO_PREFIX install -m 0644 "$TEMP_DIR/autocomplete/zsh_autocomplete" "$ZSH_COMPLETION_PATH/_livekit-cli" || true + [ -d "$FISH_COMPLETION_PATH" ] && \ + $SUDO_PREFIX install -m 0644 "$TEMP_DIR/autocomplete/fish_autocomplete" "$FISH_COMPLETION_PATH/livekit-cli.fish" || true fi log "\n$BIN_NAME is installed to $INSTALL_PATH\n" diff --git a/pkg/apm/apm.go b/pkg/apm/apm.go index b8f219d6..12f2e13d 100644 --- a/pkg/apm/apm.go +++ b/pkg/apm/apm.go @@ -1,5 +1,3 @@ -//go:build console - // Package apm provides Go bindings for the WebRTC Audio Processing Module (APM). // It supports echo cancellation (AEC3), noise suppression, automatic gain control, // and high-pass filtering. Audio must be 48kHz int16 PCM in 10ms frames (480 samples/channel). diff --git a/pkg/apm/bridge.go b/pkg/apm/bridge.go index ea15eb0d..e1a9decd 100644 --- a/pkg/apm/bridge.go +++ b/pkg/apm/bridge.go @@ -1,5 +1,3 @@ -//go:build console - package apm // #cgo CXXFLAGS: -I${SRCDIR}/webrtc -I${SRCDIR}/webrtc/third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/api/api.go b/pkg/apm/webrtc/api/api.go index 99ce769c..4047617a 100644 --- a/pkg/apm/webrtc/api/api.go +++ b/pkg/apm/webrtc/api/api.go @@ -1,5 +1,3 @@ -//go:build console - package api // #cgo CXXFLAGS: -I${SRCDIR}/.. -I${SRCDIR}/../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/api/audio/audio.go b/pkg/apm/webrtc/api/audio/audio.go index 8b3f44b8..46ed27ce 100644 --- a/pkg/apm/webrtc/api/audio/audio.go +++ b/pkg/apm/webrtc/api/audio/audio.go @@ -1,5 +1,3 @@ -//go:build console - package audio // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/api/environment/environment.go b/pkg/apm/webrtc/api/environment/environment.go index bd5c25aa..fa2cea10 100644 --- a/pkg/apm/webrtc/api/environment/environment.go +++ b/pkg/apm/webrtc/api/environment/environment.go @@ -1,5 +1,3 @@ -//go:build console - package environment // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/api/numerics/numerics.go b/pkg/apm/webrtc/api/numerics/numerics.go index e61a6f66..c668842f 100644 --- a/pkg/apm/webrtc/api/numerics/numerics.go +++ b/pkg/apm/webrtc/api/numerics/numerics.go @@ -1,5 +1,3 @@ -//go:build console - package numerics // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/api/task_queue/gcd/gcd.go b/pkg/apm/webrtc/api/task_queue/gcd/gcd.go index 5aabb282..6b67772a 100644 --- a/pkg/apm/webrtc/api/task_queue/gcd/gcd.go +++ b/pkg/apm/webrtc/api/task_queue/gcd/gcd.go @@ -1,4 +1,4 @@ -//go:build console && darwin +//go:build darwin package gcd diff --git a/pkg/apm/webrtc/api/task_queue/stdlib/stdlib.go b/pkg/apm/webrtc/api/task_queue/stdlib/stdlib.go index 49af39bd..ea8d757d 100644 --- a/pkg/apm/webrtc/api/task_queue/stdlib/stdlib.go +++ b/pkg/apm/webrtc/api/task_queue/stdlib/stdlib.go @@ -1,4 +1,4 @@ -//go:build console && !darwin +//go:build !darwin package stdlib diff --git a/pkg/apm/webrtc/api/task_queue/task_queue.go b/pkg/apm/webrtc/api/task_queue/task_queue.go index 6419e7e4..02092efc 100644 --- a/pkg/apm/webrtc/api/task_queue/task_queue.go +++ b/pkg/apm/webrtc/api/task_queue/task_queue.go @@ -1,5 +1,3 @@ -//go:build console - package task_queue // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/api/transport/transport.go b/pkg/apm/webrtc/api/transport/transport.go index f122b4d3..2699315c 100644 --- a/pkg/apm/webrtc/api/transport/transport.go +++ b/pkg/apm/webrtc/api/transport/transport.go @@ -1,5 +1,3 @@ -//go:build console - package transport // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/api/units/units.go b/pkg/apm/webrtc/api/units/units.go index 6e234727..bac32eea 100644 --- a/pkg/apm/webrtc/api/units/units.go +++ b/pkg/apm/webrtc/api/units/units.go @@ -1,5 +1,3 @@ -//go:build console - package units // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/common_audio/avx2/avx2.go b/pkg/apm/webrtc/common_audio/avx2/avx2.go index d2952ca2..44906f18 100644 --- a/pkg/apm/webrtc/common_audio/avx2/avx2.go +++ b/pkg/apm/webrtc/common_audio/avx2/avx2.go @@ -1,4 +1,4 @@ -//go:build console && amd64 +//go:build amd64 package avx2 diff --git a/pkg/apm/webrtc/common_audio/common_audio.go b/pkg/apm/webrtc/common_audio/common_audio.go index 38eb6ac8..2519f1c7 100644 --- a/pkg/apm/webrtc/common_audio/common_audio.go +++ b/pkg/apm/webrtc/common_audio/common_audio.go @@ -1,5 +1,3 @@ -//go:build console - package common_audio // #cgo CXXFLAGS: -I${SRCDIR}/.. -I${SRCDIR}/../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/common_audio/common_audio_amd64.go b/pkg/apm/webrtc/common_audio/common_audio_amd64.go index 12acc896..8ab45267 100644 --- a/pkg/apm/webrtc/common_audio/common_audio_amd64.go +++ b/pkg/apm/webrtc/common_audio/common_audio_amd64.go @@ -1,4 +1,4 @@ -//go:build console && amd64 +//go:build amd64 package common_audio diff --git a/pkg/apm/webrtc/common_audio/resampler/avx2/avx2.go b/pkg/apm/webrtc/common_audio/resampler/avx2/avx2.go index 3c693a2e..75001265 100644 --- a/pkg/apm/webrtc/common_audio/resampler/avx2/avx2.go +++ b/pkg/apm/webrtc/common_audio/resampler/avx2/avx2.go @@ -1,4 +1,4 @@ -//go:build console && amd64 +//go:build amd64 package avx2 diff --git a/pkg/apm/webrtc/common_audio/resampler/resampler.go b/pkg/apm/webrtc/common_audio/resampler/resampler.go index 86a19059..5177786f 100644 --- a/pkg/apm/webrtc/common_audio/resampler/resampler.go +++ b/pkg/apm/webrtc/common_audio/resampler/resampler.go @@ -1,5 +1,3 @@ -//go:build console - package resampler // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/common_audio/signal_processing/sp.go b/pkg/apm/webrtc/common_audio/signal_processing/sp.go index 9bb1f9ad..5a941850 100644 --- a/pkg/apm/webrtc/common_audio/signal_processing/sp.go +++ b/pkg/apm/webrtc/common_audio/signal_processing/sp.go @@ -1,5 +1,3 @@ -//go:build console - package signal_processing // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_128/fft_size_128.go b/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_128/fft_size_128.go index b243e9fd..a65a965c 100644 --- a/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_128/fft_size_128.go +++ b/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_128/fft_size_128.go @@ -1,5 +1,3 @@ -//go:build console - package fft_size_128 // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_256/fft_size_256.go b/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_256/fft_size_256.go index 84805d5b..91f96397 100644 --- a/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_256/fft_size_256.go +++ b/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_256/fft_size_256.go @@ -1,5 +1,3 @@ -//go:build console - package fft_size_256 // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.go b/pkg/apm/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.go index ba8f2ed2..e456f9ad 100644 --- a/pkg/apm/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.go +++ b/pkg/apm/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.go @@ -1,5 +1,3 @@ -//go:build console - package spl_sqrt_floor diff --git a/pkg/apm/webrtc/common_audio/vad/vad.go b/pkg/apm/webrtc/common_audio/vad/vad.go index 3120e15b..55ddaff0 100644 --- a/pkg/apm/webrtc/common_audio/vad/vad.go +++ b/pkg/apm/webrtc/common_audio/vad/vad.go @@ -1,5 +1,3 @@ -//go:build console - package vad // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_coding/codecs/isac/main/source/isac.go b/pkg/apm/webrtc/modules/audio_coding/codecs/isac/main/source/isac.go index f09044b7..9fb19bf5 100644 --- a/pkg/apm/webrtc/modules/audio_coding/codecs/isac/main/source/isac.go +++ b/pkg/apm/webrtc/modules/audio_coding/codecs/isac/main/source/isac.go @@ -1,5 +1,3 @@ -//go:build console - package source // #cgo CFLAGS: -I${SRCDIR}/../../../../../.. -std=c11 -Wno-unused-parameter -Wno-sign-compare -Wno-deprecated-declarations diff --git a/pkg/apm/webrtc/modules/audio_processing/aec3/aec3.go b/pkg/apm/webrtc/modules/audio_processing/aec3/aec3.go index 1c450b9e..3f054c96 100644 --- a/pkg/apm/webrtc/modules/audio_processing/aec3/aec3.go +++ b/pkg/apm/webrtc/modules/audio_processing/aec3/aec3.go @@ -1,5 +1,3 @@ -//go:build console - package aec3 // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/aec3/avx2/avx2.go b/pkg/apm/webrtc/modules/audio_processing/aec3/avx2/avx2.go index 9bc38772..40b34900 100644 --- a/pkg/apm/webrtc/modules/audio_processing/aec3/avx2/avx2.go +++ b/pkg/apm/webrtc/modules/audio_processing/aec3/avx2/avx2.go @@ -1,4 +1,4 @@ -//go:build console && amd64 +//go:build amd64 package avx2 diff --git a/pkg/apm/webrtc/modules/audio_processing/aec_dump/aec_dump.go b/pkg/apm/webrtc/modules/audio_processing/aec_dump/aec_dump.go index 24b5af8b..fae5a193 100644 --- a/pkg/apm/webrtc/modules/audio_processing/aec_dump/aec_dump.go +++ b/pkg/apm/webrtc/modules/audio_processing/aec_dump/aec_dump.go @@ -1,5 +1,3 @@ -//go:build console - package aec_dump // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/aecm/aecm.go b/pkg/apm/webrtc/modules/audio_processing/aecm/aecm.go index 8b452a03..fcbcac25 100644 --- a/pkg/apm/webrtc/modules/audio_processing/aecm/aecm.go +++ b/pkg/apm/webrtc/modules/audio_processing/aecm/aecm.go @@ -1,5 +1,3 @@ -//go:build console - package aecm // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/agc/agc.go b/pkg/apm/webrtc/modules/audio_processing/agc/agc.go index 40002767..f1ee2936 100644 --- a/pkg/apm/webrtc/modules/audio_processing/agc/agc.go +++ b/pkg/apm/webrtc/modules/audio_processing/agc/agc.go @@ -1,5 +1,3 @@ -//go:build console - package agc // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/agc/legacy/legacy.go b/pkg/apm/webrtc/modules/audio_processing/agc/legacy/legacy.go index f6999b97..385f1157 100644 --- a/pkg/apm/webrtc/modules/audio_processing/agc/legacy/legacy.go +++ b/pkg/apm/webrtc/modules/audio_processing/agc/legacy/legacy.go @@ -1,5 +1,3 @@ -//go:build console - package legacy // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/agc2/agc2.go b/pkg/apm/webrtc/modules/audio_processing/agc2/agc2.go index 4a8c17ce..e5eb70c2 100644 --- a/pkg/apm/webrtc/modules/audio_processing/agc2/agc2.go +++ b/pkg/apm/webrtc/modules/audio_processing/agc2/agc2.go @@ -1,5 +1,3 @@ -//go:build console - package agc2 // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/avx2/avx2.go b/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/avx2/avx2.go index 2217ca34..0d1ac21b 100644 --- a/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/avx2/avx2.go +++ b/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/avx2/avx2.go @@ -1,4 +1,4 @@ -//go:build console && amd64 +//go:build amd64 package avx2 diff --git a/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad.go b/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad.go index 6a1b5f4a..88dff9ad 100644 --- a/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad.go +++ b/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad.go @@ -1,5 +1,3 @@ -//go:build console - package rnn_vad // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/apm.go b/pkg/apm/webrtc/modules/audio_processing/apm.go index e8400c88..269e1340 100644 --- a/pkg/apm/webrtc/modules/audio_processing/apm.go +++ b/pkg/apm/webrtc/modules/audio_processing/apm.go @@ -1,5 +1,3 @@ -//go:build console - package audio_processing // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/apm_amd64.go b/pkg/apm/webrtc/modules/audio_processing/apm_amd64.go index 51895b8e..36cbc315 100644 --- a/pkg/apm/webrtc/modules/audio_processing/apm_amd64.go +++ b/pkg/apm/webrtc/modules/audio_processing/apm_amd64.go @@ -1,4 +1,4 @@ -//go:build console && amd64 +//go:build amd64 package audio_processing diff --git a/pkg/apm/webrtc/modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster.go b/pkg/apm/webrtc/modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster.go index 19f42952..d6fa065a 100644 --- a/pkg/apm/webrtc/modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster.go +++ b/pkg/apm/webrtc/modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster.go @@ -1,5 +1,3 @@ -//go:build console - package capture_levels_adjuster // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/echo_detector/echo_detector.go b/pkg/apm/webrtc/modules/audio_processing/echo_detector/echo_detector.go index acdbe0e9..493a2c11 100644 --- a/pkg/apm/webrtc/modules/audio_processing/echo_detector/echo_detector.go +++ b/pkg/apm/webrtc/modules/audio_processing/echo_detector/echo_detector.go @@ -1,5 +1,3 @@ -//go:build console - package echo_detector // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/include/include.go b/pkg/apm/webrtc/modules/audio_processing/include/include.go index a84bc198..bd443aa6 100644 --- a/pkg/apm/webrtc/modules/audio_processing/include/include.go +++ b/pkg/apm/webrtc/modules/audio_processing/include/include.go @@ -1,5 +1,3 @@ -//go:build console - package include // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/logging/logging.go b/pkg/apm/webrtc/modules/audio_processing/logging/logging.go index 9d2b4a63..81ad5a68 100644 --- a/pkg/apm/webrtc/modules/audio_processing/logging/logging.go +++ b/pkg/apm/webrtc/modules/audio_processing/logging/logging.go @@ -1,5 +1,3 @@ -//go:build console - package logging // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/ns/ns.go b/pkg/apm/webrtc/modules/audio_processing/ns/ns.go index 25631999..64aafc40 100644 --- a/pkg/apm/webrtc/modules/audio_processing/ns/ns.go +++ b/pkg/apm/webrtc/modules/audio_processing/ns/ns.go @@ -1,5 +1,3 @@ -//go:build console - package ns // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/utility/utility.go b/pkg/apm/webrtc/modules/audio_processing/utility/utility.go index ee7ef97e..66b13052 100644 --- a/pkg/apm/webrtc/modules/audio_processing/utility/utility.go +++ b/pkg/apm/webrtc/modules/audio_processing/utility/utility.go @@ -1,5 +1,3 @@ -//go:build console - package utility // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/modules/audio_processing/vad/vad.go b/pkg/apm/webrtc/modules/audio_processing/vad/vad.go index 20e53da2..6681c101 100644 --- a/pkg/apm/webrtc/modules/audio_processing/vad/vad.go +++ b/pkg/apm/webrtc/modules/audio_processing/vad/vad.go @@ -1,5 +1,3 @@ -//go:build console - package vad // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/rtc_base/containers/containers.go b/pkg/apm/webrtc/rtc_base/containers/containers.go index c9a22c95..d700a81d 100644 --- a/pkg/apm/webrtc/rtc_base/containers/containers.go +++ b/pkg/apm/webrtc/rtc_base/containers/containers.go @@ -1,5 +1,3 @@ -//go:build console - package containers // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/rtc_base/experiments/experiments.go b/pkg/apm/webrtc/rtc_base/experiments/experiments.go index 3998e583..3a49e287 100644 --- a/pkg/apm/webrtc/rtc_base/experiments/experiments.go +++ b/pkg/apm/webrtc/rtc_base/experiments/experiments.go @@ -1,5 +1,3 @@ -//go:build console - package experiments // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/rtc_base/memory/memory.go b/pkg/apm/webrtc/rtc_base/memory/memory.go index 660110d0..822f468c 100644 --- a/pkg/apm/webrtc/rtc_base/memory/memory.go +++ b/pkg/apm/webrtc/rtc_base/memory/memory.go @@ -1,5 +1,3 @@ -//go:build console - package memory // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/rtc_base/numerics/numerics.go b/pkg/apm/webrtc/rtc_base/numerics/numerics.go index e61a6f66..c668842f 100644 --- a/pkg/apm/webrtc/rtc_base/numerics/numerics.go +++ b/pkg/apm/webrtc/rtc_base/numerics/numerics.go @@ -1,5 +1,3 @@ -//go:build console - package numerics // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/rtc_base/rtc_base.go b/pkg/apm/webrtc/rtc_base/rtc_base.go index 3b37bcb3..6e3f12cd 100644 --- a/pkg/apm/webrtc/rtc_base/rtc_base.go +++ b/pkg/apm/webrtc/rtc_base/rtc_base.go @@ -1,5 +1,3 @@ -//go:build console - package rtc_base // #cgo CXXFLAGS: -I${SRCDIR}/.. -I${SRCDIR}/../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/rtc_base/strings/strings.go b/pkg/apm/webrtc/rtc_base/strings/strings.go index a0b85bc0..57591f07 100644 --- a/pkg/apm/webrtc/rtc_base/strings/strings.go +++ b/pkg/apm/webrtc/rtc_base/strings/strings.go @@ -1,5 +1,3 @@ -//go:build console - package strings // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/rtc_base/synchronization/sync.go b/pkg/apm/webrtc/rtc_base/synchronization/sync.go index 6455eb49..38294292 100644 --- a/pkg/apm/webrtc/rtc_base/synchronization/sync.go +++ b/pkg/apm/webrtc/rtc_base/synchronization/sync.go @@ -1,5 +1,3 @@ -//go:build console - package synchronization // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/rtc_base/system/system.go b/pkg/apm/webrtc/rtc_base/system/system.go index 5611e735..b4fcaf4d 100644 --- a/pkg/apm/webrtc/rtc_base/system/system.go +++ b/pkg/apm/webrtc/rtc_base/system/system.go @@ -1,5 +1,3 @@ -//go:build console - package system // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/system_wrappers/source/system.go b/pkg/apm/webrtc/system_wrappers/source/system.go index d4a53283..e75537a3 100644 --- a/pkg/apm/webrtc/system_wrappers/source/system.go +++ b/pkg/apm/webrtc/system_wrappers/source/system.go @@ -1,5 +1,3 @@ -//go:build console - package source // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/base/base.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/base/base.go index d8af2104..187075d0 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/base/base.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/base/base.go @@ -1,5 +1,3 @@ -//go:build console - package base // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/container/container.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/container/container.go index d14fa28b..c55f1144 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/container/container.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/container/container.go @@ -1,5 +1,3 @@ -//go:build console - package container // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/crc/crc.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/crc/crc.go index 6090c125..4cfa5cdc 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/crc/crc.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/crc/crc.go @@ -1,5 +1,3 @@ -//go:build console - package crc // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/debugging/debugging.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/debugging/debugging.go index 6438ccc5..43c08e06 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/debugging/debugging.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/debugging/debugging.go @@ -1,5 +1,3 @@ -//go:build console - package debugging // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/flags/flags.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/flags/flags.go index 567e0131..36ebd43f 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/flags/flags.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/flags/flags.go @@ -1,5 +1,3 @@ -//go:build console - package flags // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/hash/hash.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/hash/hash.go index a23ce5e4..dd73d8b3 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/hash/hash.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/hash/hash.go @@ -1,5 +1,3 @@ -//go:build console - package hash // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/log/log.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/log/log.go index 4c81f98d..a03532a4 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/log/log.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/log/log.go @@ -1,5 +1,3 @@ -//go:build console - package log // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/numeric/numeric.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/numeric/numeric.go index d175449c..4333e15b 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/numeric/numeric.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/numeric/numeric.go @@ -1,5 +1,3 @@ -//go:build console - package numeric // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/profiling/profiling.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/profiling/profiling.go index 23bc7353..ef7975f4 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/profiling/profiling.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/profiling/profiling.go @@ -1,5 +1,3 @@ -//go:build console - package profiling // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/random/random.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/random/random.go index 0aae1914..a497e7e8 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/random/random.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/random/random.go @@ -1,5 +1,3 @@ -//go:build console - package random // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/status/status.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/status/status.go index 243626a6..c3ccdab1 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/status/status.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/status/status.go @@ -1,5 +1,3 @@ -//go:build console - package status // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/strings/strings.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/strings/strings.go index 66f2dfee..20fbe7e8 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/strings/strings.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/strings/strings.go @@ -1,5 +1,3 @@ -//go:build console - package strings // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/synchronization/sync.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/synchronization/sync.go index 95aee9a9..a12614ab 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/synchronization/sync.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/synchronization/sync.go @@ -1,5 +1,3 @@ -//go:build console - package synchronization // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/time/src/src.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/time/src/src.go index 9d67259c..009e28e5 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/time/src/src.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/time/src/src.go @@ -1,5 +1,3 @@ -//go:build console - package src // #cgo CXXFLAGS: -I${SRCDIR}/../../../../.. -I${SRCDIR}/../../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/third_party/pffft/src/pffft.go b/pkg/apm/webrtc/third_party/pffft/src/pffft.go index f7c5e66c..dc7e8300 100644 --- a/pkg/apm/webrtc/third_party/pffft/src/pffft.go +++ b/pkg/apm/webrtc/third_party/pffft/src/pffft.go @@ -1,5 +1,3 @@ -//go:build console - package src // #cgo CFLAGS: -Wno-unused-parameter -Wno-sign-compare diff --git a/pkg/apm/webrtc/third_party/rnnoise/src/src.go b/pkg/apm/webrtc/third_party/rnnoise/src/src.go index b1bd0eb6..722b4221 100644 --- a/pkg/apm/webrtc/third_party/rnnoise/src/src.go +++ b/pkg/apm/webrtc/third_party/rnnoise/src/src.go @@ -1,5 +1,3 @@ -//go:build console - package src // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 diff --git a/pkg/apm/webrtc/webrtc.go b/pkg/apm/webrtc/webrtc.go index c67225ea..b396054e 100644 --- a/pkg/apm/webrtc/webrtc.go +++ b/pkg/apm/webrtc/webrtc.go @@ -1,5 +1,3 @@ -//go:build console - // Package webrtc provides WebRTC audio processing module (APM) source compiled via CGo. // This package and its sub-packages contain the extracted WebRTC APM C++ source. // Import this package (typically via blank import) to link all WebRTC APM object files. diff --git a/pkg/apm/webrtc/webrtc_darwin.go b/pkg/apm/webrtc/webrtc_darwin.go index 952fc952..66ab9cf6 100644 --- a/pkg/apm/webrtc/webrtc_darwin.go +++ b/pkg/apm/webrtc/webrtc_darwin.go @@ -1,5 +1,3 @@ -//go:build console - package webrtc import _ "github.com/livekit/livekit-cli/v2/pkg/apm/webrtc/api/task_queue/gcd" diff --git a/pkg/apm/webrtc/webrtc_linux.go b/pkg/apm/webrtc/webrtc_linux.go index 835db605..52d6ea1e 100644 --- a/pkg/apm/webrtc/webrtc_linux.go +++ b/pkg/apm/webrtc/webrtc_linux.go @@ -1,5 +1,3 @@ -//go:build console - package webrtc import _ "github.com/livekit/livekit-cli/v2/pkg/apm/webrtc/api/task_queue/stdlib" diff --git a/pkg/apm/webrtc/webrtc_windows.go b/pkg/apm/webrtc/webrtc_windows.go index 835db605..52d6ea1e 100644 --- a/pkg/apm/webrtc/webrtc_windows.go +++ b/pkg/apm/webrtc/webrtc_windows.go @@ -1,5 +1,3 @@ -//go:build console - package webrtc import _ "github.com/livekit/livekit-cli/v2/pkg/apm/webrtc/api/task_queue/stdlib" diff --git a/pkg/console/fft.go b/pkg/console/fft.go index b1ac4983..dd800e7a 100644 --- a/pkg/console/fft.go +++ b/pkg/console/fft.go @@ -1,5 +1,3 @@ -//go:build console - package console import ( diff --git a/pkg/console/pipeline.go b/pkg/console/pipeline.go index 2b46cfed..1942cbfa 100644 --- a/pkg/console/pipeline.go +++ b/pkg/console/pipeline.go @@ -1,5 +1,3 @@ -//go:build console - // Package console implements the audio pipeline for the lk console command. // It connects microphone input and speaker output via PortAudio, applies // WebRTC audio processing (echo cancellation, noise suppression), and diff --git a/pkg/console/ringbuffer.go b/pkg/console/ringbuffer.go index 29648bb4..b4b7eba1 100644 --- a/pkg/console/ringbuffer.go +++ b/pkg/console/ringbuffer.go @@ -1,5 +1,3 @@ -//go:build console - package console import ( diff --git a/pkg/portaudio/portaudio.go b/pkg/portaudio/portaudio.go index 5670e538..c5ba06ab 100644 --- a/pkg/portaudio/portaudio.go +++ b/pkg/portaudio/portaudio.go @@ -1,5 +1,3 @@ -//go:build console - // Package portaudio provides Go bindings for PortAudio, compiled from vendored source. package portaudio diff --git a/pkg/portaudio/portaudio_darwin.go b/pkg/portaudio/portaudio_darwin.go index 5a989cb5..cb340a6b 100644 --- a/pkg/portaudio/portaudio_darwin.go +++ b/pkg/portaudio/portaudio_darwin.go @@ -1,5 +1,3 @@ -//go:build console - package portaudio /* diff --git a/pkg/portaudio/portaudio_linux.go b/pkg/portaudio/portaudio_linux.go index f66fbb5d..f9ffbeec 100644 --- a/pkg/portaudio/portaudio_linux.go +++ b/pkg/portaudio/portaudio_linux.go @@ -1,5 +1,3 @@ -//go:build console - package portaudio /* diff --git a/pkg/portaudio/portaudio_windows.go b/pkg/portaudio/portaudio_windows.go index a91e00fe..7a4e362f 100644 --- a/pkg/portaudio/portaudio_windows.go +++ b/pkg/portaudio/portaudio_windows.go @@ -1,5 +1,3 @@ -//go:build console - package portaudio /* diff --git a/scripts/setup-cross.sh b/scripts/setup-cross.sh new file mode 100755 index 00000000..ef534f3c --- /dev/null +++ b/scripts/setup-cross.sh @@ -0,0 +1,142 @@ +#!/usr/bin/env bash +# Prepare per-target cross-compile inputs for `go build` / `goreleaser build`. +# +# Usage: scripts/setup-cross.sh +# target: linux/amd64 | linux/arm64 | windows/amd64 | windows/arm64 | darwin/arm64 +# +# Outputs (under .cross//): +# include/ — headers for the target (linux only) +# lib/ — static libraries for the target (linux only) +# +# For windows targets, also pre-generates MinGW import libraries in zig's lib +# dir (lld needs .a, but zig only bundles .def files). +# +# Idempotent: re-runs skip work if outputs already exist. + +set -euo pipefail + +ALSA_VERSION="1.2.12" +ALSA_URL="https://www.alsa-project.org/files/pub/lib/alsa-lib-${ALSA_VERSION}.tar.bz2" + +target="${1:-}" +if [ -z "$target" ]; then + echo "usage: $0 " >&2 + echo " target: linux/{amd64,arm64} | windows/{amd64,arm64} | darwin/arm64" >&2 + exit 2 +fi + +root="$(cd "$(dirname "$0")/.." && pwd)" +out_dir="$root/.cross/${target//\//_}" +mkdir -p "$out_dir" + +build_alsa() { + local zig_target="$1" host="$2" + local prefix="$out_dir" + local stamp="$prefix/.alsa-${ALSA_VERSION}.stamp" + + if [ -f "$stamp" ] && [ -f "$prefix/lib/libasound.a" ]; then + echo "[$target] alsa-lib ${ALSA_VERSION} already built" + return + fi + + echo "[$target] building alsa-lib ${ALSA_VERSION} with zig cc -target $zig_target" + + local work + work="$(mktemp -d)" + trap "rm -rf '$work'" RETURN + + ( + cd "$work" + curl -fsSL "$ALSA_URL" | tar xjf - + cd "alsa-lib-${ALSA_VERSION}" + + # zig cc wraps clang and accepts a -target triple; we make it look like + # a single binary to configure scripts that don't quote $CC. + local cc_wrap="$work/zigcc" + cat > "$cc_wrap" </dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4)" \ + || make -j1 + make install + ) + + touch "$stamp" + echo "[$target] alsa-lib installed to $prefix" +} + +generate_mingw_libs() { + local machine="$1" + local zig_lib def_dir + # zig 0.14 outputs JSON ("lib_dir": "..."); zig 0.16 outputs ZON + # (.lib_dir = "..."). This pattern matches both. + zig_lib="$(zig env | sed -n 's/.*lib_dir[^"]*"\([^"]*\)".*/\1/p')" + def_dir="$zig_lib/libc/mingw/lib-common" + + if [ ! -d "$def_dir" ]; then + echo "[$target] zig lib dir not found at $def_dir" >&2 + return 1 + fi + + local mingw_out="$out_dir/mingw_lib" + mkdir -p "$mingw_out" + local stamp="$mingw_out/.generated.stamp" + + if [ -f "$stamp" ]; then + echo "[$target] MinGW import libs already generated" + return + fi + + # Go's compiled objects embed COFF /DEFAULTLIB directives (dbghelp, bcrypt, + # ...) that lld resolves directly, bypassing zig's lazy .def→.a generation. + # Generate into a per-arch directory so windows/amd64 and windows/arm64 can + # build in the same goreleaser run without clobbering each other. + local generated=0 + for def in "$def_dir"/*.def; do + local lib + lib="$(basename "$def" .def)" + if zig dlltool -d "$def" -l "$mingw_out/lib${lib}.a" -m "$machine" 2>/dev/null; then + generated=$((generated + 1)) + fi + done + touch "$stamp" + echo "[$target] generated $generated MinGW import libs in $mingw_out" +} + +case "$target" in + linux/amd64) + build_alsa "x86_64-linux-gnu.2.28" "x86_64-linux-gnu" + ;; + linux/arm64) + build_alsa "aarch64-linux-gnu.2.28" "aarch64-linux-gnu" + ;; + windows/amd64) + generate_mingw_libs "i386:x86-64" + ;; + windows/arm64) + generate_mingw_libs "arm64" + ;; + darwin/arm64|darwin/amd64) + echo "[$target] no cross setup needed (native build)" + ;; + *) + echo "unknown target: $target" >&2 + exit 2 + ;; +esac From 1fbd1bcecde2f92f72120c1f1bd99d06fd453f82 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Mon, 8 Jun 2026 15:29:47 -0600 Subject: [PATCH 02/11] chore(build): forward PWD var in build+release actions --- .github/workflows/build.yaml | 5 +++++ .github/workflows/release.yaml | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ae24f2fa..f9a4c82c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -54,6 +54,11 @@ jobs: distribution: goreleaser version: latest args: build --snapshot --clean + env: + # goreleaser-action runs goreleaser via a Node wrapper that doesn't + # forward PWD; the .goreleaser.yaml CGO flags template {{ .Env.PWD }} + # to locate .cross/. Provide it explicitly. + PWD: ${{ github.workspace }} - name: Verify native binary runs run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4b4e03d8..5be8fdd0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -115,3 +115,7 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # goreleaser-action runs goreleaser via a Node wrapper that doesn't + # forward PWD; the .goreleaser.yaml CGO flags template {{ .Env.PWD }} + # to locate .cross/. Provide it explicitly. + PWD: ${{ github.workspace }} From e47b5aa6e94b64ff96ad37a742c406521cf08c2c Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Mon, 8 Jun 2026 20:16:16 -0600 Subject: [PATCH 03/11] chore(build): pull submodules in CI and use necessary CXX flags on windows build --- .github/workflows/release.yaml | 5 ++++- .github/workflows/test.yaml | 9 +++++++++ .goreleaser.yaml | 12 ++++++++---- README.md | 2 +- pkg/apm/bridge.go | 2 +- pkg/apm/webrtc/api/api.go | 2 +- pkg/apm/webrtc/api/audio/audio.go | 2 +- pkg/apm/webrtc/api/environment/environment.go | 2 +- pkg/apm/webrtc/api/numerics/numerics.go | 2 +- pkg/apm/webrtc/api/task_queue/stdlib/stdlib.go | 2 +- pkg/apm/webrtc/api/task_queue/task_queue.go | 2 +- pkg/apm/webrtc/api/transport/transport.go | 2 +- pkg/apm/webrtc/api/units/units.go | 2 +- pkg/apm/webrtc/common_audio/avx2/avx2.go | 2 +- pkg/apm/webrtc/common_audio/common_audio.go | 2 +- pkg/apm/webrtc/common_audio/resampler/avx2/avx2.go | 2 +- pkg/apm/webrtc/common_audio/resampler/resampler.go | 2 +- pkg/apm/webrtc/common_audio/signal_processing/sp.go | 2 +- .../third_party/ooura/fft_size_128/fft_size_128.go | 2 +- .../third_party/ooura/fft_size_256/fft_size_256.go | 2 +- pkg/apm/webrtc/common_audio/vad/vad.go | 2 +- pkg/apm/webrtc/modules/audio_processing/aec3/aec3.go | 2 +- .../modules/audio_processing/aec3/avx2/avx2.go | 2 +- .../modules/audio_processing/aec_dump/aec_dump.go | 2 +- pkg/apm/webrtc/modules/audio_processing/aecm/aecm.go | 2 +- pkg/apm/webrtc/modules/audio_processing/agc/agc.go | 2 +- .../modules/audio_processing/agc/legacy/legacy.go | 2 +- pkg/apm/webrtc/modules/audio_processing/agc2/agc2.go | 2 +- .../audio_processing/agc2/rnn_vad/avx2/avx2.go | 2 +- .../modules/audio_processing/agc2/rnn_vad/rnn_vad.go | 2 +- pkg/apm/webrtc/modules/audio_processing/apm.go | 2 +- .../capture_levels_adjuster.go | 2 +- .../audio_processing/echo_detector/echo_detector.go | 2 +- .../modules/audio_processing/include/include.go | 2 +- .../modules/audio_processing/logging/logging.go | 2 +- pkg/apm/webrtc/modules/audio_processing/ns/ns.go | 2 +- .../modules/audio_processing/utility/utility.go | 2 +- pkg/apm/webrtc/modules/audio_processing/vad/vad.go | 2 +- pkg/apm/webrtc/rtc_base/containers/containers.go | 2 +- pkg/apm/webrtc/rtc_base/experiments/experiments.go | 2 +- pkg/apm/webrtc/rtc_base/memory/memory.go | 2 +- pkg/apm/webrtc/rtc_base/numerics/numerics.go | 2 +- pkg/apm/webrtc/rtc_base/rtc_base.go | 2 +- pkg/apm/webrtc/rtc_base/strings/strings.go | 2 +- pkg/apm/webrtc/rtc_base/synchronization/sync.go | 2 +- pkg/apm/webrtc/rtc_base/system/system.go | 2 +- pkg/apm/webrtc/system_wrappers/source/system.go | 2 +- .../webrtc/third_party/abseil-cpp/absl/base/base.go | 2 +- .../abseil-cpp/absl/container/container.go | 2 +- .../webrtc/third_party/abseil-cpp/absl/crc/crc.go | 2 +- .../abseil-cpp/absl/debugging/debugging.go | 2 +- .../third_party/abseil-cpp/absl/flags/flags.go | 2 +- .../webrtc/third_party/abseil-cpp/absl/hash/hash.go | 2 +- .../webrtc/third_party/abseil-cpp/absl/log/log.go | 2 +- .../third_party/abseil-cpp/absl/numeric/numeric.go | 2 +- .../abseil-cpp/absl/profiling/profiling.go | 2 +- .../third_party/abseil-cpp/absl/random/random.go | 2 +- .../third_party/abseil-cpp/absl/status/status.go | 2 +- .../third_party/abseil-cpp/absl/strings/strings.go | 2 +- .../abseil-cpp/absl/synchronization/sync.go | 2 +- .../third_party/abseil-cpp/absl/time/src/src.go | 2 +- pkg/apm/webrtc/third_party/rnnoise/src/src.go | 2 +- 62 files changed, 80 insertions(+), 64 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5be8fdd0..d2c497b0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,7 +34,10 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: lfs: 'true' - + # pkg/portaudio/pa_src holds the vendored PortAudio C source the cgo + # build links against. + submodules: true + - name: Verify version.go matches tag run: | TAG_VERSION=${GITHUB_REF#refs/tags/v} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index eb1ba066..8cda3e30 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,8 +18,17 @@ jobs: contents: read packages: read + env: + # The WebRTC APM's #cgo windows CXXFLAGS use -fms-extensions (SEH), which + # isn't on cgo's directive allowlist; unlock it for the Windows build. + CGO_CXXFLAGS_ALLOW: -fms-extensions + steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + # pkg/portaudio/pa_src is a submodule with the vendored PortAudio C + # source; needed now that console (cgo) builds unconditionally. + submodules: true - name: Install ALSA headers (Linux) if: matrix.os == 'ubuntu-latest' diff --git a/.goreleaser.yaml b/.goreleaser.yaml index df8ba808..334b2ae4 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -82,9 +82,12 @@ builds: - CGO_ENABLED=1 - CC=zig cc -target x86_64-windows-gnu - CXX=zig c++ -target x86_64-windows-gnu - # -fms-extensions: enable __try/__except (SEH) used by WebRTC - # -DNTDDI_VERSION: target Windows 10 base to skip WinRT includes absent from MinGW - - CGO_CXXFLAGS=-fms-extensions -DNTDDI_VERSION=0x0A000000 -fno-sanitize=all + # SEH (-fms-extensions) and -DNTDDI_VERSION live in the source #cgo windows + # directives so native and cross builds agree; -fms-extensions isn't on + # cgo's directive allowlist, so unlock it here. -fno-sanitize=all is a + # zig-0.16-specific workaround for unresolved UBSan symbols under lld. + - CGO_CXXFLAGS_ALLOW=-fms-extensions + - CGO_CXXFLAGS=-fno-sanitize=all goos: [windows] goarch: [amd64] ldflags: @@ -102,7 +105,8 @@ builds: - CGO_ENABLED=1 - CC=zig cc -target aarch64-windows-gnu - CXX=zig c++ -target aarch64-windows-gnu - - CGO_CXXFLAGS=-fms-extensions -DNTDDI_VERSION=0x0A000000 -fno-sanitize=all + - CGO_CXXFLAGS_ALLOW=-fms-extensions + - CGO_CXXFLAGS=-fno-sanitize=all goos: [windows] goarch: [arm64] ldflags: diff --git a/README.md b/README.md index c011bec6..8776f020 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Every build of `lk` includes the audio/console subsystem (CGO + PortAudio + WebR - **macOS**: nothing to install — CoreAudio frameworks ship with Xcode CLT. - **Linux**: `sudo apt-get install libasound2-dev` (or your distro's ALSA dev package). -- **Windows**: MinGW from the standard Go distribution. +- **Windows**: MinGW from the standard Go distribution, and set `CGO_CXXFLAGS_ALLOW=-fms-extensions` (the WebRTC APM uses SEH, which cgo gates behind this allow-list flag). Then: diff --git a/pkg/apm/bridge.go b/pkg/apm/bridge.go index e1a9decd..adab7379 100644 --- a/pkg/apm/bridge.go +++ b/pkg/apm/bridge.go @@ -3,7 +3,7 @@ package apm // #cgo CXXFLAGS: -I${SRCDIR}/webrtc -I${SRCDIR}/webrtc/third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 // #cgo linux LDFLAGS: -lm -lpthread // #include "bridge.h" diff --git a/pkg/apm/webrtc/api/api.go b/pkg/apm/webrtc/api/api.go index 4047617a..a4d38ea1 100644 --- a/pkg/apm/webrtc/api/api.go +++ b/pkg/apm/webrtc/api/api.go @@ -3,6 +3,6 @@ package api // #cgo CXXFLAGS: -I${SRCDIR}/.. -I${SRCDIR}/../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/api/audio/audio.go b/pkg/apm/webrtc/api/audio/audio.go index 46ed27ce..86192b4e 100644 --- a/pkg/apm/webrtc/api/audio/audio.go +++ b/pkg/apm/webrtc/api/audio/audio.go @@ -3,6 +3,6 @@ package audio // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/api/environment/environment.go b/pkg/apm/webrtc/api/environment/environment.go index fa2cea10..d3253b83 100644 --- a/pkg/apm/webrtc/api/environment/environment.go +++ b/pkg/apm/webrtc/api/environment/environment.go @@ -3,6 +3,6 @@ package environment // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/api/numerics/numerics.go b/pkg/apm/webrtc/api/numerics/numerics.go index c668842f..7b15ad93 100644 --- a/pkg/apm/webrtc/api/numerics/numerics.go +++ b/pkg/apm/webrtc/api/numerics/numerics.go @@ -3,6 +3,6 @@ package numerics // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/api/task_queue/stdlib/stdlib.go b/pkg/apm/webrtc/api/task_queue/stdlib/stdlib.go index ea8d757d..e3296a87 100644 --- a/pkg/apm/webrtc/api/task_queue/stdlib/stdlib.go +++ b/pkg/apm/webrtc/api/task_queue/stdlib/stdlib.go @@ -4,6 +4,6 @@ package stdlib // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/api/task_queue/task_queue.go b/pkg/apm/webrtc/api/task_queue/task_queue.go index 02092efc..1a3b20e8 100644 --- a/pkg/apm/webrtc/api/task_queue/task_queue.go +++ b/pkg/apm/webrtc/api/task_queue/task_queue.go @@ -3,6 +3,6 @@ package task_queue // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/api/transport/transport.go b/pkg/apm/webrtc/api/transport/transport.go index 2699315c..a3625e4c 100644 --- a/pkg/apm/webrtc/api/transport/transport.go +++ b/pkg/apm/webrtc/api/transport/transport.go @@ -3,6 +3,6 @@ package transport // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/api/units/units.go b/pkg/apm/webrtc/api/units/units.go index bac32eea..8f481ee9 100644 --- a/pkg/apm/webrtc/api/units/units.go +++ b/pkg/apm/webrtc/api/units/units.go @@ -3,6 +3,6 @@ package units // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/common_audio/avx2/avx2.go b/pkg/apm/webrtc/common_audio/avx2/avx2.go index 44906f18..344ddc25 100644 --- a/pkg/apm/webrtc/common_audio/avx2/avx2.go +++ b/pkg/apm/webrtc/common_audio/avx2/avx2.go @@ -4,5 +4,5 @@ package avx2 // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -march=haswell -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 import "C" diff --git a/pkg/apm/webrtc/common_audio/common_audio.go b/pkg/apm/webrtc/common_audio/common_audio.go index 2519f1c7..7bd2b964 100644 --- a/pkg/apm/webrtc/common_audio/common_audio.go +++ b/pkg/apm/webrtc/common_audio/common_audio.go @@ -3,7 +3,7 @@ package common_audio // #cgo CXXFLAGS: -I${SRCDIR}/.. -I${SRCDIR}/../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 // #cgo CFLAGS: -I${SRCDIR}/.. -I${SRCDIR}/../third_party/abseil-cpp -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX diff --git a/pkg/apm/webrtc/common_audio/resampler/avx2/avx2.go b/pkg/apm/webrtc/common_audio/resampler/avx2/avx2.go index 75001265..3b6b2c43 100644 --- a/pkg/apm/webrtc/common_audio/resampler/avx2/avx2.go +++ b/pkg/apm/webrtc/common_audio/resampler/avx2/avx2.go @@ -4,5 +4,5 @@ package avx2 // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -march=haswell -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 import "C" diff --git a/pkg/apm/webrtc/common_audio/resampler/resampler.go b/pkg/apm/webrtc/common_audio/resampler/resampler.go index 5177786f..1e963058 100644 --- a/pkg/apm/webrtc/common_audio/resampler/resampler.go +++ b/pkg/apm/webrtc/common_audio/resampler/resampler.go @@ -3,6 +3,6 @@ package resampler // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/common_audio/signal_processing/sp.go b/pkg/apm/webrtc/common_audio/signal_processing/sp.go index 5a941850..46ef2551 100644 --- a/pkg/apm/webrtc/common_audio/signal_processing/sp.go +++ b/pkg/apm/webrtc/common_audio/signal_processing/sp.go @@ -3,7 +3,7 @@ package signal_processing // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 // #cgo CFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX diff --git a/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_128/fft_size_128.go b/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_128/fft_size_128.go index a65a965c..50ef3c54 100644 --- a/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_128/fft_size_128.go +++ b/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_128/fft_size_128.go @@ -3,6 +3,6 @@ package fft_size_128 // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_256/fft_size_256.go b/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_256/fft_size_256.go index 91f96397..d1fdbe9e 100644 --- a/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_256/fft_size_256.go +++ b/pkg/apm/webrtc/common_audio/third_party/ooura/fft_size_256/fft_size_256.go @@ -3,6 +3,6 @@ package fft_size_256 // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/common_audio/vad/vad.go b/pkg/apm/webrtc/common_audio/vad/vad.go index 55ddaff0..990e76be 100644 --- a/pkg/apm/webrtc/common_audio/vad/vad.go +++ b/pkg/apm/webrtc/common_audio/vad/vad.go @@ -3,7 +3,7 @@ package vad // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 // #cgo CFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX diff --git a/pkg/apm/webrtc/modules/audio_processing/aec3/aec3.go b/pkg/apm/webrtc/modules/audio_processing/aec3/aec3.go index 3f054c96..29157fe7 100644 --- a/pkg/apm/webrtc/modules/audio_processing/aec3/aec3.go +++ b/pkg/apm/webrtc/modules/audio_processing/aec3/aec3.go @@ -3,6 +3,6 @@ package aec3 // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/aec3/avx2/avx2.go b/pkg/apm/webrtc/modules/audio_processing/aec3/avx2/avx2.go index 40b34900..4561fa07 100644 --- a/pkg/apm/webrtc/modules/audio_processing/aec3/avx2/avx2.go +++ b/pkg/apm/webrtc/modules/audio_processing/aec3/avx2/avx2.go @@ -4,5 +4,5 @@ package avx2 // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -march=haswell -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/aec_dump/aec_dump.go b/pkg/apm/webrtc/modules/audio_processing/aec_dump/aec_dump.go index fae5a193..ed379b54 100644 --- a/pkg/apm/webrtc/modules/audio_processing/aec_dump/aec_dump.go +++ b/pkg/apm/webrtc/modules/audio_processing/aec_dump/aec_dump.go @@ -3,6 +3,6 @@ package aec_dump // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/aecm/aecm.go b/pkg/apm/webrtc/modules/audio_processing/aecm/aecm.go index fcbcac25..a94f5e11 100644 --- a/pkg/apm/webrtc/modules/audio_processing/aecm/aecm.go +++ b/pkg/apm/webrtc/modules/audio_processing/aecm/aecm.go @@ -3,6 +3,6 @@ package aecm // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/agc/agc.go b/pkg/apm/webrtc/modules/audio_processing/agc/agc.go index f1ee2936..9b105551 100644 --- a/pkg/apm/webrtc/modules/audio_processing/agc/agc.go +++ b/pkg/apm/webrtc/modules/audio_processing/agc/agc.go @@ -3,7 +3,7 @@ package agc // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/agc/legacy/legacy.go b/pkg/apm/webrtc/modules/audio_processing/agc/legacy/legacy.go index 385f1157..183bfaf6 100644 --- a/pkg/apm/webrtc/modules/audio_processing/agc/legacy/legacy.go +++ b/pkg/apm/webrtc/modules/audio_processing/agc/legacy/legacy.go @@ -3,6 +3,6 @@ package legacy // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/agc2/agc2.go b/pkg/apm/webrtc/modules/audio_processing/agc2/agc2.go index e5eb70c2..9b3c6d94 100644 --- a/pkg/apm/webrtc/modules/audio_processing/agc2/agc2.go +++ b/pkg/apm/webrtc/modules/audio_processing/agc2/agc2.go @@ -3,7 +3,7 @@ package agc2 // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/avx2/avx2.go b/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/avx2/avx2.go index 0d1ac21b..c649182e 100644 --- a/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/avx2/avx2.go +++ b/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/avx2/avx2.go @@ -4,5 +4,5 @@ package avx2 // #cgo CXXFLAGS: -I${SRCDIR}/../../../../.. -I${SRCDIR}/../../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -march=haswell -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad.go b/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad.go index 88dff9ad..d369604c 100644 --- a/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad.go +++ b/pkg/apm/webrtc/modules/audio_processing/agc2/rnn_vad/rnn_vad.go @@ -3,6 +3,6 @@ package rnn_vad // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/apm.go b/pkg/apm/webrtc/modules/audio_processing/apm.go index 269e1340..3ba8b376 100644 --- a/pkg/apm/webrtc/modules/audio_processing/apm.go +++ b/pkg/apm/webrtc/modules/audio_processing/apm.go @@ -3,7 +3,7 @@ package audio_processing // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster.go b/pkg/apm/webrtc/modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster.go index d6fa065a..6423be05 100644 --- a/pkg/apm/webrtc/modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster.go +++ b/pkg/apm/webrtc/modules/audio_processing/capture_levels_adjuster/capture_levels_adjuster.go @@ -3,6 +3,6 @@ package capture_levels_adjuster // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/echo_detector/echo_detector.go b/pkg/apm/webrtc/modules/audio_processing/echo_detector/echo_detector.go index 493a2c11..3421d3d3 100644 --- a/pkg/apm/webrtc/modules/audio_processing/echo_detector/echo_detector.go +++ b/pkg/apm/webrtc/modules/audio_processing/echo_detector/echo_detector.go @@ -3,6 +3,6 @@ package echo_detector // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/include/include.go b/pkg/apm/webrtc/modules/audio_processing/include/include.go index bd443aa6..ad195daa 100644 --- a/pkg/apm/webrtc/modules/audio_processing/include/include.go +++ b/pkg/apm/webrtc/modules/audio_processing/include/include.go @@ -3,6 +3,6 @@ package include // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/logging/logging.go b/pkg/apm/webrtc/modules/audio_processing/logging/logging.go index 81ad5a68..5b00856b 100644 --- a/pkg/apm/webrtc/modules/audio_processing/logging/logging.go +++ b/pkg/apm/webrtc/modules/audio_processing/logging/logging.go @@ -3,6 +3,6 @@ package logging // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/ns/ns.go b/pkg/apm/webrtc/modules/audio_processing/ns/ns.go index 64aafc40..5417f2a9 100644 --- a/pkg/apm/webrtc/modules/audio_processing/ns/ns.go +++ b/pkg/apm/webrtc/modules/audio_processing/ns/ns.go @@ -3,6 +3,6 @@ package ns // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/utility/utility.go b/pkg/apm/webrtc/modules/audio_processing/utility/utility.go index 66b13052..a4dc0f48 100644 --- a/pkg/apm/webrtc/modules/audio_processing/utility/utility.go +++ b/pkg/apm/webrtc/modules/audio_processing/utility/utility.go @@ -3,6 +3,6 @@ package utility // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/modules/audio_processing/vad/vad.go b/pkg/apm/webrtc/modules/audio_processing/vad/vad.go index 6681c101..f6d1b8be 100644 --- a/pkg/apm/webrtc/modules/audio_processing/vad/vad.go +++ b/pkg/apm/webrtc/modules/audio_processing/vad/vad.go @@ -3,6 +3,6 @@ package vad // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/rtc_base/containers/containers.go b/pkg/apm/webrtc/rtc_base/containers/containers.go index d700a81d..819b065f 100644 --- a/pkg/apm/webrtc/rtc_base/containers/containers.go +++ b/pkg/apm/webrtc/rtc_base/containers/containers.go @@ -3,6 +3,6 @@ package containers // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/rtc_base/experiments/experiments.go b/pkg/apm/webrtc/rtc_base/experiments/experiments.go index 3a49e287..99dcafbd 100644 --- a/pkg/apm/webrtc/rtc_base/experiments/experiments.go +++ b/pkg/apm/webrtc/rtc_base/experiments/experiments.go @@ -3,6 +3,6 @@ package experiments // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/rtc_base/memory/memory.go b/pkg/apm/webrtc/rtc_base/memory/memory.go index 822f468c..9674a1ce 100644 --- a/pkg/apm/webrtc/rtc_base/memory/memory.go +++ b/pkg/apm/webrtc/rtc_base/memory/memory.go @@ -3,6 +3,6 @@ package memory // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/rtc_base/numerics/numerics.go b/pkg/apm/webrtc/rtc_base/numerics/numerics.go index c668842f..7b15ad93 100644 --- a/pkg/apm/webrtc/rtc_base/numerics/numerics.go +++ b/pkg/apm/webrtc/rtc_base/numerics/numerics.go @@ -3,6 +3,6 @@ package numerics // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/rtc_base/rtc_base.go b/pkg/apm/webrtc/rtc_base/rtc_base.go index 6e3f12cd..42d1eaf9 100644 --- a/pkg/apm/webrtc/rtc_base/rtc_base.go +++ b/pkg/apm/webrtc/rtc_base/rtc_base.go @@ -3,7 +3,7 @@ package rtc_base // #cgo CXXFLAGS: -I${SRCDIR}/.. -I${SRCDIR}/../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/rtc_base/strings/strings.go b/pkg/apm/webrtc/rtc_base/strings/strings.go index 57591f07..ae670ced 100644 --- a/pkg/apm/webrtc/rtc_base/strings/strings.go +++ b/pkg/apm/webrtc/rtc_base/strings/strings.go @@ -3,6 +3,6 @@ package strings // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/rtc_base/synchronization/sync.go b/pkg/apm/webrtc/rtc_base/synchronization/sync.go index 38294292..58f8e45b 100644 --- a/pkg/apm/webrtc/rtc_base/synchronization/sync.go +++ b/pkg/apm/webrtc/rtc_base/synchronization/sync.go @@ -3,6 +3,6 @@ package synchronization // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/rtc_base/system/system.go b/pkg/apm/webrtc/rtc_base/system/system.go index b4fcaf4d..0b389984 100644 --- a/pkg/apm/webrtc/rtc_base/system/system.go +++ b/pkg/apm/webrtc/rtc_base/system/system.go @@ -3,6 +3,6 @@ package system // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/system_wrappers/source/system.go b/pkg/apm/webrtc/system_wrappers/source/system.go index e75537a3..a3e90e45 100644 --- a/pkg/apm/webrtc/system_wrappers/source/system.go +++ b/pkg/apm/webrtc/system_wrappers/source/system.go @@ -3,6 +3,6 @@ package source // #cgo CXXFLAGS: -I${SRCDIR}/../.. -I${SRCDIR}/../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/base/base.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/base/base.go index 187075d0..60732b06 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/base/base.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/base/base.go @@ -3,6 +3,6 @@ package base // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/container/container.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/container/container.go index c55f1144..124350ff 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/container/container.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/container/container.go @@ -3,6 +3,6 @@ package container // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/crc/crc.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/crc/crc.go index 4cfa5cdc..8f4e2b9d 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/crc/crc.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/crc/crc.go @@ -3,6 +3,6 @@ package crc // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/debugging/debugging.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/debugging/debugging.go index 43c08e06..0b47a4ca 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/debugging/debugging.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/debugging/debugging.go @@ -3,6 +3,6 @@ package debugging // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/flags/flags.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/flags/flags.go index 36ebd43f..6f57c745 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/flags/flags.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/flags/flags.go @@ -3,6 +3,6 @@ package flags // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/hash/hash.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/hash/hash.go index dd73d8b3..a1e615b5 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/hash/hash.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/hash/hash.go @@ -3,6 +3,6 @@ package hash // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/log/log.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/log/log.go index a03532a4..0d498e2f 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/log/log.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/log/log.go @@ -3,6 +3,6 @@ package log // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/numeric/numeric.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/numeric/numeric.go index 4333e15b..bf3bc9ce 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/numeric/numeric.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/numeric/numeric.go @@ -3,6 +3,6 @@ package numeric // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/profiling/profiling.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/profiling/profiling.go index ef7975f4..5ef85160 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/profiling/profiling.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/profiling/profiling.go @@ -3,6 +3,6 @@ package profiling // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/random/random.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/random/random.go index a497e7e8..bccc3124 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/random/random.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/random/random.go @@ -3,6 +3,6 @@ package random // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/status/status.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/status/status.go index c3ccdab1..032fe6cd 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/status/status.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/status/status.go @@ -3,6 +3,6 @@ package status // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/strings/strings.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/strings/strings.go index 20fbe7e8..f072e705 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/strings/strings.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/strings/strings.go @@ -3,6 +3,6 @@ package strings // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/synchronization/sync.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/synchronization/sync.go index a12614ab..48108b59 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/synchronization/sync.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/synchronization/sync.go @@ -3,6 +3,6 @@ package synchronization // #cgo CXXFLAGS: -I${SRCDIR}/../../../.. -I${SRCDIR}/../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/abseil-cpp/absl/time/src/src.go b/pkg/apm/webrtc/third_party/abseil-cpp/absl/time/src/src.go index 009e28e5..6aadd7d0 100644 --- a/pkg/apm/webrtc/third_party/abseil-cpp/absl/time/src/src.go +++ b/pkg/apm/webrtc/third_party/abseil-cpp/absl/time/src/src.go @@ -3,6 +3,6 @@ package src // #cgo CXXFLAGS: -I${SRCDIR}/../../../../.. -I${SRCDIR}/../../../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" diff --git a/pkg/apm/webrtc/third_party/rnnoise/src/src.go b/pkg/apm/webrtc/third_party/rnnoise/src/src.go index 722b4221..3e75187a 100644 --- a/pkg/apm/webrtc/third_party/rnnoise/src/src.go +++ b/pkg/apm/webrtc/third_party/rnnoise/src/src.go @@ -3,6 +3,6 @@ package src // #cgo CXXFLAGS: -I${SRCDIR}/../../.. -I${SRCDIR}/../../../third_party/abseil-cpp -std=c++17 -fno-rtti -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD -DNDEBUG -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-shorten-64-to-32 // #cgo darwin CXXFLAGS: -DWEBRTC_MAC -DWEBRTC_POSIX // #cgo linux CXXFLAGS: -DWEBRTC_LINUX -DWEBRTC_POSIX -// #cgo windows CXXFLAGS: -DWEBRTC_WIN +// #cgo windows CXXFLAGS: -DWEBRTC_WIN -fms-extensions -DNTDDI_VERSION=0x0A000000 // #cgo arm64 CXXFLAGS: -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64 import "C" From fade83e71078f90256bf0dc1e322ad9ca2eadb47 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Mon, 8 Jun 2026 20:40:45 -0600 Subject: [PATCH 04/11] chore(lint): fix lint warnings --- cmd/lk/agent_private_link.go | 3 +- cmd/lk/console_tui.go | 12 +- cmd/lk/egress.go | 2 +- cmd/lk/join.go | 8 +- cmd/lk/room.go | 9 +- cmd/lk/simulate_ci.go | 12 +- cmd/lk/simulate_matrix.go | 7 +- cmd/lk/simulate_save.go | 23 +-- cmd/lk/simulate_subprocess.go | 11 +- cmd/lk/simulate_tui.go | 230 ++++++++++++++--------------- cmd/lk/token.go | 5 +- cmd/lk/ulimit_unix.go | 1 - pkg/agentfs/sdk_version_check.go | 4 +- pkg/console/pipeline.go | 4 +- pkg/console/ringbuffer.go | 14 +- pkg/loadtester/agentloadtester.go | 10 +- pkg/loadtester/loadtest.go | 5 +- pkg/loadtester/loadtester.go | 6 +- pkg/loadtester/loadtestprovider.go | 2 +- 19 files changed, 174 insertions(+), 194 deletions(-) diff --git a/cmd/lk/agent_private_link.go b/cmd/lk/agent_private_link.go index 8421f12e..6e74e45b 100644 --- a/cmd/lk/agent_private_link.go +++ b/cmd/lk/agent_private_link.go @@ -9,7 +9,6 @@ import ( lkproto "github.com/livekit/protocol/livekit" "github.com/twitchtv/twirp" "github.com/urfave/cli/v3" - "google.golang.org/protobuf/proto" ) var privateLinkCommands = &cli.Command{ @@ -102,7 +101,7 @@ func buildCreatePrivateLinkRequest(name, region string, port uint32, endpoint, c } if cloudRegion != "" { - req.CloudRegion = proto.String(cloudRegion) + req.CloudRegion = new(cloudRegion) } return req diff --git a/cmd/lk/console_tui.go b/cmd/lk/console_tui.go index a074d08d..0827a9b3 100644 --- a/cmd/lk/console_tui.go +++ b/cmd/lk/console_tui.go @@ -37,7 +37,7 @@ var ( lkCyan = lipgloss.Color("#1fd5f9") lkPurple = lipgloss.Color("#8f83ff") lkGreen = lipgloss.Color("#6BCB77") - lkRed = lipgloss.Color("#EF4444") + lkRed = lipgloss.Color("#EF4444") labelStyle = lipgloss.NewStyle().Foreground(lkPurple) cyanBoldStyle = lipgloss.NewStyle().Foreground(lkCyan).Bold(true) @@ -443,7 +443,7 @@ func (m *consoleModel) handleSessionEvent(ev *agent.AgentSessionEvent) []tea.Cmd if text := formatMetrics(msg.Metrics); text != "" { m.metricsText = text } - } + } cmds = append(cmds, tea.Println(formatChatItem(item))) } @@ -508,7 +508,7 @@ func formatChatItem(item *agent.ChatContext_ChatItem) string { b.WriteString("\n ") b.WriteString(lipgloss.NewStyle().Foreground(lkGreen).Render("● ")) b.WriteString(greenBoldStyle.Render("Agent")) - for _, tl := range strings.Split(text, "\n") { + for tl := range strings.SplitSeq(text, "\n") { b.WriteString("\n ") b.WriteString(tl) } @@ -549,7 +549,8 @@ func (m consoleModel) View() string { if m.waitingForAgent { // Braille spinner (matching Rich's "dots" spinner) frame := spinnerFrames[int(time.Now().UnixMilli()/80)%len(spinnerFrames)] - b.WriteString(" " + dimStyle.Render(frame+" thinking")) + b.WriteString(" ") + b.WriteString(dimStyle.Render(frame + " thinking")) } else { // ── Text input ── w := m.width @@ -566,7 +567,8 @@ func (m consoleModel) View() string { if m.audioError != "" { b.WriteString("\n") - b.WriteString(" " + redStyle.Render("audio: "+m.audioError)) + b.WriteString(" ") + b.WriteString(redStyle.Render("audio: " + m.audioError)) } if m.showShortcuts { diff --git a/cmd/lk/egress.go b/cmd/lk/egress.go index 633c00b6..313d7b28 100644 --- a/cmd/lk/egress.go +++ b/cmd/lk/egress.go @@ -751,7 +751,7 @@ func testEgressTemplate(ctx context.Context, cmd *cli.Command) error { apiSecret := pc.APISecret var testers []*loadtester.LoadTester - for i := 0; i < numPublishers; i++ { + for i := range numPublishers { lt := loadtester.NewLoadTester(loadtester.TesterParams{ URL: serverURL, APIKey: apiKey, diff --git a/cmd/lk/join.go b/cmd/lk/join.go index a62db304..09bc0d5c 100644 --- a/cmd/lk/join.go +++ b/cmd/lk/join.go @@ -303,18 +303,18 @@ func parseSocketFromName(name string) (string, string, string, error) { // e.g. h264://192.168.0.1:1234 (tcp) // e.g. opus:///tmp/my.socket (unix domain socket) - offset := strings.Index(name, mimeDelimiter) - if offset == -1 { + before, after, ok := strings.Cut(name, mimeDelimiter) + if !ok { return "", "", "", fmt.Errorf("did not find delimiter %s in %s", mimeDelimiter, name) } - mimeType := name[:offset] + mimeType := before if mimeType != "h264" && mimeType != "h265" && mimeType != "vp8" && mimeType != "opus" { return "", "", "", fmt.Errorf("unsupported mime type: %s", mimeType) } - address := name[offset+len(mimeDelimiter):] + address := after if len(address) == 0 { return "", "", "", fmt.Errorf("address cannot be empty. input was: %s", name) diff --git a/cmd/lk/room.go b/cmd/lk/room.go index 1b79913d..9ebab693 100644 --- a/cmd/lk/room.go +++ b/cmd/lk/room.go @@ -22,6 +22,7 @@ import ( "os" "os/signal" "regexp" + "slices" "syscall" "github.com/pion/webrtc/v4" @@ -815,13 +816,7 @@ func joinRoom(ctx context.Context, cmd *cli.Command) error { publishUrls := cmd.StringSlice("publish") // Determine simulcast mode by checking if any URL has simulcast format - simulcastMode := false - for _, url := range publishUrls { - if simulcastURLRegex.MatchString(url) { - simulcastMode = true - break - } - } + simulcastMode := slices.ContainsFunc(publishUrls, simulcastURLRegex.MatchString) // Validate publish flags if len(publishUrls) > 3 { diff --git a/cmd/lk/simulate_ci.go b/cmd/lk/simulate_ci.go index 08e99d56..ae387183 100644 --- a/cmd/lk/simulate_ci.go +++ b/cmd/lk/simulate_ci.go @@ -251,14 +251,14 @@ func printCIResults(run *livekit.SimulationRun, agent *AgentProcess) { if job.Instructions != "" { fmt.Fprintln(os.Stdout, "Instructions:") - for _, line := range strings.Split(job.Instructions, "\n") { + for line := range strings.SplitSeq(job.Instructions, "\n") { fmt.Fprintf(os.Stdout, " %s\n", line) } } if job.AgentExpectations != "" { fmt.Fprintln(os.Stdout, "Expected:") - for _, line := range strings.Split(job.AgentExpectations, "\n") { + for line := range strings.SplitSeq(job.AgentExpectations, "\n") { fmt.Fprintf(os.Stdout, " %s\n", line) } } @@ -288,7 +288,7 @@ func printCIResults(run *livekit.SimulationRun, agent *AgentProcess) { fmt.Fprintln(os.Stdout, "::endgroup::") if job.Status == livekit.SimulationRun_Job_STATUS_FAILED && isGitHubActions() { - firstLine := strings.SplitN(job.Error, "\n", 2)[0] + firstLine, _, _ := strings.Cut(job.Error, "\n") fmt.Fprintf(os.Stdout, "::error::Job %d failed: %s\n", i+1, firstLine) } } @@ -312,7 +312,7 @@ func printCISummary(run *livekit.SimulationRun) { if summary.GoingWell != "" { fmt.Fprintln(os.Stdout) fmt.Fprintln(os.Stdout, "Going well:") - for _, line := range strings.Split(summary.GoingWell, "\n") { + for line := range strings.SplitSeq(summary.GoingWell, "\n") { fmt.Fprintf(os.Stdout, " %s\n", line) } } @@ -320,7 +320,7 @@ func printCISummary(run *livekit.SimulationRun) { if summary.ToImprove != "" { fmt.Fprintln(os.Stdout) fmt.Fprintln(os.Stdout, "To improve:") - for _, line := range strings.Split(summary.ToImprove, "\n") { + for line := range strings.SplitSeq(summary.ToImprove, "\n") { fmt.Fprintf(os.Stdout, " %s\n", line) } } @@ -360,7 +360,7 @@ func printCIChatHistory(chatCtx *agent.ChatContext) { default: fmt.Fprintf(os.Stdout, " ● %s\n", msg.Role) } - for _, tl := range strings.Split(text, "\n") { + for tl := range strings.SplitSeq(text, "\n") { fmt.Fprintf(os.Stdout, " %s\n", tl) } case *agent.ChatContext_ChatItem_FunctionCall: diff --git a/cmd/lk/simulate_matrix.go b/cmd/lk/simulate_matrix.go index 7160f277..03f0402b 100644 --- a/cmd/lk/simulate_matrix.go +++ b/cmd/lk/simulate_matrix.go @@ -74,10 +74,7 @@ func matrixTickCmd() tea.Cmd { // matrixAvailHeight is the shared height calculation used by both the job list // and the matrix overlay so the rain area lines up with the list rows. func matrixAvailHeight(h int) int { - availHeight := h - 14 - if availHeight < 5 { - availHeight = 5 - } + availHeight := max(h-14, 5) return availHeight } @@ -117,7 +114,7 @@ func (r *matrixRain) start(width, height int, skipCol []bool) { if skipCol != nil { copy(r.skipCol, skipCol) } - for i := 0; i < width; i++ { + for i := range width { if r.skipCol[i] { // Parked: counts as already swept so it never gates auto-stop. r.sweeps[i] = matrixMaxSweeps diff --git a/cmd/lk/simulate_save.go b/cmd/lk/simulate_save.go index d67c79b0..7e016210 100644 --- a/cmd/lk/simulate_save.go +++ b/cmd/lk/simulate_save.go @@ -30,7 +30,7 @@ import ( type savePhase int const ( - savePhaseLoading savePhase = iota + savePhaseLoading savePhase = iota savePhaseList savePhaseNewGroup savePhaseSaving @@ -283,16 +283,17 @@ func (s *saveOverlay) render() string { var b strings.Builder title := saveTitleStyle.Render("Save to Scenario Group") - b.WriteString(title + "\n") + b.WriteString(title) + b.WriteString("\n") switch s.phase { case savePhaseLoading: spinner := simSpinnerFrames[s.spinnerIdx%len(simSpinnerFrames)] - b.WriteString(fmt.Sprintf("\n %s Loading scenario groups...\n", cyanStyle.Render(spinner))) + fmt.Fprintf(&b, "\n %s Loading scenario groups...\n", cyanStyle.Render(spinner)) b.WriteString(dimStyle.Render("\n ESC cancel")) case savePhaseError: - b.WriteString(fmt.Sprintf("\n %s %s\n", redStyle.Render("✗"), redStyle.Render(s.err.Error()))) + fmt.Fprintf(&b, "\n %s %s\n", redStyle.Render("✗"), redStyle.Render(s.err.Error())) b.WriteString(dimStyle.Render("\n r retry · ESC back")) case savePhaseList: @@ -300,30 +301,30 @@ func (s *saveOverlay) render() string { for i, g := range s.groups { label := g.Label if i == s.cursor { - b.WriteString(fmt.Sprintf(" %s %s\n", saveSelectedStyle.Render(">"), saveSelectedStyle.Render(label))) + fmt.Fprintf(&b, " %s %s\n", saveSelectedStyle.Render(">"), saveSelectedStyle.Render(label)) } else { - b.WriteString(fmt.Sprintf(" %s\n", label)) + fmt.Fprintf(&b, " %s\n", label) } } // "+ New Group..." option newLabel := "+ New Group..." if s.cursor == len(s.groups) { - b.WriteString(fmt.Sprintf(" %s %s\n", saveNewGroupStyle.Render(">"), saveNewGroupStyle.Render(newLabel))) + fmt.Fprintf(&b, " %s %s\n", saveNewGroupStyle.Render(">"), saveNewGroupStyle.Render(newLabel)) } else { - b.WriteString(fmt.Sprintf(" %s\n", saveNewGroupStyle.Render(newLabel))) + fmt.Fprintf(&b, " %s\n", saveNewGroupStyle.Render(newLabel)) } b.WriteString(dimStyle.Render("\n ↑↓ navigate · ENTER select · ESC back")) case savePhaseNewGroup: - b.WriteString(fmt.Sprintf("\n Group name: %s%s\n", s.groupInput, cyanStyle.Render("│"))) + fmt.Fprintf(&b, "\n Group name: %s%s\n", s.groupInput, cyanStyle.Render("│")) b.WriteString(dimStyle.Render("\n ENTER create · ESC cancel")) case savePhaseSaving: spinner := simSpinnerFrames[s.spinnerIdx%len(simSpinnerFrames)] - b.WriteString(fmt.Sprintf("\n %s Saving scenario...\n", cyanStyle.Render(spinner))) + fmt.Fprintf(&b, "\n %s Saving scenario...\n", cyanStyle.Render(spinner)) case savePhaseSuccess: - b.WriteString(fmt.Sprintf("\n %s Saved to %s\n", greenStyle.Render("✓"), boldStyle.Render("\""+s.successMsg+"\""))) + fmt.Fprintf(&b, "\n %s Saved to %s\n", greenStyle.Render("✓"), boldStyle.Render("\""+s.successMsg+"\"")) } return "\n" + saveBoxStyle.Width(boxWidth).Render(b.String()) + "\n" diff --git a/cmd/lk/simulate_subprocess.go b/cmd/lk/simulate_subprocess.go index 2ae582bd..f2749ba4 100644 --- a/cmd/lk/simulate_subprocess.go +++ b/cmd/lk/simulate_subprocess.go @@ -113,13 +113,14 @@ func findEntrypoint(dir, explicit string, projectType agentfs.ProjectType) (stri } } - msg := "no agent entrypoint found, checked:\n" + var msg strings.Builder + msg.WriteString("no agent entrypoint found, checked:\n") for _, p := range checked { - msg += fmt.Sprintf(" - %s\n", p) + fmt.Fprintf(&msg, " - %s\n", p) } - msg += "\nMake sure you are running this command from a directory containing a LiveKit agent.\n" - msg += "Specify the entrypoint file as a positional argument, e.g.: lk agent simulate agent.py" - return "", fmt.Errorf("%s", msg) + msg.WriteString("\nMake sure you are running this command from a directory containing a LiveKit agent.\n") + msg.WriteString("Specify the entrypoint file as a positional argument, e.g.: lk agent simulate agent.py") + return "", fmt.Errorf("%s", msg.String()) } // AgentStartConfig configures how to launch an agent subprocess. diff --git a/cmd/lk/simulate_tui.go b/cmd/lk/simulate_tui.go index 6fd7aec0..91b237bd 100644 --- a/cmd/lk/simulate_tui.go +++ b/cmd/lk/simulate_tui.go @@ -721,16 +721,20 @@ func (m *simulateModel) viewSetup() string { b.WriteString("\n\n") if m.config.pc != nil && m.config.pc.Name != "" { - b.WriteString(dimStyle.Render(" Project: "+m.config.pc.Name) + "\n") + b.WriteString(dimStyle.Render(" Project: " + m.config.pc.Name)) + b.WriteString("\n") } if m.config.pc != nil && m.config.pc.URL != "" { - b.WriteString(dimStyle.Render(" URL: "+m.config.pc.URL) + "\n") + b.WriteString(dimStyle.Render(" URL: " + m.config.pc.URL)) + b.WriteString("\n") } if m.runID != "" { - b.WriteString(dimStyle.Render(" Run: "+m.runID) + "\n") + b.WriteString(dimStyle.Render(" Run: " + m.runID)) + b.WriteString("\n") } if url := m.getDashboardURL(); url != "" { - b.WriteString(dimStyle.Render(" "+url) + "\n") + b.WriteString(dimStyle.Render(" " + url)) + b.WriteString("\n") } // When scenarios come from a file, show that clearly: the group title, how many @@ -761,12 +765,13 @@ func (m *simulateModel) viewSetup() string { if m.run != nil && m.run.GetNumSimulations() > 0 { n = m.run.GetNumSimulations() } - b.WriteString(fmt.Sprintf(" %s Generating %d scenarios %s %s\n", yellowStyle.Render("⏺"), n, m.spinner(), dimStyle.Render(elapsed.String()))) + fmt.Fprintf(&b, " %s Generating %d scenarios %s %s\n", yellowStyle.Render("⏺"), n, m.spinner(), dimStyle.Render(elapsed.String())) } if m.err != nil { b.WriteString("\n") - b.WriteString(redStyle.Render(" "+m.err.Error()) + "\n") + b.WriteString(redStyle.Render(" " + m.err.Error())) + b.WriteString("\n") if m.agent != nil { b.WriteString("\n") b.WriteString(m.renderLogs("")) @@ -800,14 +805,14 @@ func (m *simulateModel) renderSteps() string { if s.elapsed > 0 { elapsed = " " + dimStyle.Render(s.elapsed.Round(time.Millisecond).String()) } - b.WriteString(fmt.Sprintf(" %s %s%s\n", greenStyle.Render("✓"), s.label, elapsed)) + fmt.Fprintf(&b, " %s %s%s\n", greenStyle.Render("✓"), s.label, elapsed) case "running": elapsed := time.Since(m.stepStart).Truncate(time.Second) - b.WriteString(fmt.Sprintf(" %s %s %s %s\n", yellowStyle.Render("⏺"), s.label, m.spinner(), dimStyle.Render(elapsed.String()))) + fmt.Fprintf(&b, " %s %s %s %s\n", yellowStyle.Render("⏺"), s.label, m.spinner(), dimStyle.Render(elapsed.String())) case "failed": - b.WriteString(fmt.Sprintf(" %s %s\n", redStyle.Render("✗"), s.label)) + fmt.Fprintf(&b, " %s %s\n", redStyle.Render("✗"), s.label) default: - b.WriteString(fmt.Sprintf(" %s %s\n", dimStyle.Render("–"), s.label)) + fmt.Fprintf(&b, " %s %s\n", dimStyle.Render("–"), s.label) } } return b.String() @@ -837,13 +842,17 @@ func (m *simulateModel) viewFailed() string { b.WriteString(" " + dimStyle.Render(url)) } b.WriteString("\n\n") - b.WriteString(" " + redStyle.Bold(true).Render("Failed") + "\n\n") + b.WriteString(" ") + b.WriteString(redStyle.Bold(true).Render("Failed")) + b.WriteString("\n\n") if m.run.Error != "" { - for _, line := range strings.Split(m.run.Error, "\n") { - b.WriteString(redStyle.Render(" "+line) + "\n") + for line := range strings.SplitSeq(m.run.Error, "\n") { + b.WriteString(redStyle.Render(" " + line)) + b.WriteString("\n") } } else { - b.WriteString(redStyle.Render(" (no error details available)") + "\n") + b.WriteString(redStyle.Render(" (no error details available)")) + b.WriteString("\n") } b.WriteString("\n") if m.showLogs { @@ -866,13 +875,15 @@ func (m *simulateModel) viewRunning() string { b.WriteString(" ") b.WriteString(dimStyle.Render(m.runID)) if url := m.getDashboardURL(); url != "" { - b.WriteString(" " + dimStyle.Render(url)) + b.WriteString(" ") + b.WriteString(dimStyle.Render(url)) } b.WriteString("\n\n") // Agent description (hidden in detail view) if m.detailJobID == "" && m.run != nil && m.run.AgentDescription != "" { - b.WriteString(boldStyle.Render(" Agent Description") + "\n") + b.WriteString(boldStyle.Render(" Agent Description")) + b.WriteString("\n") if m.showDescription { // Bound the body to a fixed window so opening it never shoves the header // (and the job list below) off-screen; scroll within via ↑↓ / wheel. @@ -890,20 +901,26 @@ func (m *simulateModel) viewRunning() string { end = len(lines) } if start > 0 { - b.WriteString(dimStyle.Render(fmt.Sprintf(" ↑ %d more", start)) + "\n") + b.WriteString(dimStyle.Render(fmt.Sprintf(" ↑ %d more\n", start))) } for _, line := range lines[start:end] { - b.WriteString(" " + line + "\n") + b.WriteString(" ") + b.WriteString(line) + b.WriteString("\n") } if end < len(lines) { - b.WriteString(dimStyle.Render(fmt.Sprintf(" ↓ %d more", len(lines)-end)) + "\n") + b.WriteString(dimStyle.Render(fmt.Sprintf(" ↓ %d more", len(lines)-end))) + b.WriteString("\n") } - b.WriteString(dimStyle.Render(" ↑↓ scroll · d collapse") + "\n\n") + b.WriteString(dimStyle.Render(" ↑↓ scroll · d collapse")) + b.WriteString("\n\n") } else { desc := firstMeaningfulLine(m.run.AgentDescription) if desc != "" { - b.WriteString(dimStyle.Width(m.width-4).Render(" "+desc) + "\n") - b.WriteString(dimStyle.Render(" (press d to expand)") + "\n\n") + b.WriteString(dimStyle.Width(m.width - 4).Render(" " + desc)) + b.WriteString("\n") + b.WriteString(dimStyle.Render(" (press d to expand)")) + b.WriteString("\n\n") } } } @@ -926,11 +943,11 @@ func (m *simulateModel) viewRunning() string { b.WriteString(m.renderJobList()) if m.run.Status == livekit.SimulationRun_STATUS_SUMMARIZING { - b.WriteString(fmt.Sprintf("\n %s %s %s\n", yellowStyle.Render("⏺"), yellowStyle.Render("Generating summary..."), m.spinner())) + fmt.Fprintf(&b, "\n %s %s %s\n", yellowStyle.Render("⏺"), yellowStyle.Render("Generating summary..."), m.spinner()) } else if m.run.Summary != nil { b.WriteString(m.renderSummary()) } else if isTerminalRunStatus(m.run.Status) { - b.WriteString(fmt.Sprintf("\n %s %s\n", yellowStyle.Render("⚠"), yellowStyle.Render("The summary for this run is not available"))) + fmt.Fprintf(&b, "\n %s %s\n", yellowStyle.Render("⚠"), yellowStyle.Render("The summary for this run is not available")) } } @@ -1041,10 +1058,7 @@ func (m *simulateModel) visibleWindow() (jobs []indexedJob, winStart, winEnd, ov m.cursor = len(jobs) - 1 } availHeight := matrixAvailHeight(m.height) - maxJobListHeight := m.height * 2 / 3 - if maxJobListHeight < 5 { - maxJobListHeight = 5 - } + maxJobListHeight := max(m.height*2/3, 5) if availHeight > maxJobListHeight { availHeight = maxJobListHeight } @@ -1063,10 +1077,7 @@ func (m *simulateModel) visibleWindow() (jobs []indexedJob, winStart, winEnd, ov m.scrollOff = 0 } winStart = m.scrollOff - winEnd = m.scrollOff + availHeight - if winEnd > len(jobs) { - winEnd = len(jobs) - } + winEnd = min(m.scrollOff+availHeight, len(jobs)) overflowAbove = winStart overflowBelow = len(jobs) - winEnd return @@ -1231,20 +1242,19 @@ func (m *simulateModel) renderDetail() string { var b strings.Builder b.WriteString("\n") - b.WriteString(fmt.Sprintf(" %s %s %s\n", + fmt.Fprintf(&b, " %s %s %s\n", jobIcon(job), boldStyle.Render(fmt.Sprintf("Job %d", origIdx)), dimStyle.Render(job.Id), - )) + ) if url := simulationJobDashboardURL(m.projectID(), m.runID, job.Id); url != "" { - b.WriteString(" " + dimStyle.Render(url) + "\n") + b.WriteString(" ") + b.WriteString(dimStyle.Render(url)) + b.WriteString("\n") } b.WriteString("\n") - wrapWidth := m.width - 6 - if wrapWidth < 40 { - wrapWidth = 40 - } + wrapWidth := max(m.width-6, 40) wrapStyle := lipgloss.NewStyle().Width(wrapWidth) b.WriteString(boldStyle.Render(" Instructions:")) @@ -1253,8 +1263,10 @@ func (m *simulateModel) renderDetail() string { if instr == "" { instr = "—" } - for _, line := range strings.Split(wrapStyle.Render(instr), "\n") { - b.WriteString(" " + line + "\n") + for line := range strings.SplitSeq(wrapStyle.Render(instr), "\n") { + b.WriteString(" ") + b.WriteString(line) + b.WriteString("\n") } b.WriteString("\n") @@ -1264,8 +1276,9 @@ func (m *simulateModel) renderDetail() string { if expect == "" { expect = "—" } - for _, line := range strings.Split(wrapStyle.Render(expect), "\n") { - b.WriteString(dimStyle.Render(" "+line) + "\n") + for line := range strings.SplitSeq(wrapStyle.Render(expect), "\n") { + b.WriteString(dimStyle.Render(" " + line)) + b.WriteString("\n") } if job.Error != "" { @@ -1273,14 +1286,16 @@ func (m *simulateModel) renderDetail() string { if job.Status == livekit.SimulationRun_Job_STATUS_COMPLETED { b.WriteString(greenStyle.Bold(true).Render(" Result:")) b.WriteString("\n") - for _, line := range strings.Split(wrapStyle.Render(job.Error), "\n") { - b.WriteString(greenStyle.Render(" "+line) + "\n") + for line := range strings.SplitSeq(wrapStyle.Render(job.Error), "\n") { + b.WriteString(greenStyle.Render(" " + line)) + b.WriteString("\n") } } else { b.WriteString(redStyle.Bold(true).Render(" Error:")) b.WriteString("\n") - for _, line := range strings.Split(wrapStyle.Render(job.Error), "\n") { - b.WriteString(redStyle.Render(" "+line) + "\n") + for line := range strings.SplitSeq(wrapStyle.Render(job.Error), "\n") { + b.WriteString(redStyle.Render(" " + line)) + b.WriteString("\n") } } } @@ -1305,15 +1320,14 @@ func (m *simulateModel) renderDetail() string { b.WriteString("\n") b.WriteString(boldStyle.Render(" Logs:")) b.WriteString("\n") - maxWidth := m.width - 4 - if maxWidth < 20 { - maxWidth = 20 - } + maxWidth := max(m.width-4, 20) wrapLogStyle := lipgloss.NewStyle().Width(maxWidth) for _, line := range rawLines { wrapped := wrapLogStyle.Render(line) - for _, wl := range strings.Split(wrapped, "\n") { - b.WriteString(" " + wl + "\n") + for wl := range strings.SplitSeq(wrapped, "\n") { + b.WriteString(" ") + b.WriteString(wl) + b.WriteString("\n") } } } @@ -1325,10 +1339,7 @@ func (m *simulateModel) renderDetail() string { func (m *simulateModel) scrolledDetail() string { content := m.renderDetail() lines := strings.Split(content, "\n") - budget := m.height - 12 - if budget < 5 { - budget = 5 - } + budget := max(m.height-12, 5) if len(lines) <= budget { m.detailScrollOff = 0 return content @@ -1343,10 +1354,7 @@ func (m *simulateModel) scrolledDetail() string { } start := m.detailScrollOff - end := start + budget - if end > len(lines) { - end = len(lines) - } + end := min(start+budget, len(lines)) var b strings.Builder if start > 0 { @@ -1370,23 +1378,22 @@ func (m *simulateModel) renderSummary() string { var b strings.Builder b.WriteString("\n") - b.WriteString(" " + boldStyle.Render("Summary")) - b.WriteString(fmt.Sprintf(" %s %s\n\n", + b.WriteString(" ") + b.WriteString(boldStyle.Render("Summary")) + fmt.Fprintf(&b, " %s %s\n\n", greenStyle.Render(fmt.Sprintf("%d passed", summary.Passed)), - redStyle.Render(fmt.Sprintf("%d failed", summary.Failed)), - )) + redStyle.Render(fmt.Sprintf("%d failed", summary.Failed))) - wrapWidth := m.width - 6 - if wrapWidth < 40 { - wrapWidth = 40 - } + wrapWidth := max(m.width-6, 40) if summary.GoingWell != "" { b.WriteString(greenStyle.Bold(true).Render(" Going well:")) b.WriteString("\n") wrapped := lipgloss.NewStyle().Width(wrapWidth).Render(summary.GoingWell) - for _, line := range strings.Split(wrapped, "\n") { - b.WriteString(" " + line + "\n") + for line := range strings.SplitSeq(wrapped, "\n") { + b.WriteString(" ") + b.WriteString(line) + b.WriteString("\n") } b.WriteString("\n") } @@ -1395,8 +1402,10 @@ func (m *simulateModel) renderSummary() string { b.WriteString(yellowStyle.Bold(true).Render(" To improve:")) b.WriteString("\n") wrapped := lipgloss.NewStyle().Width(wrapWidth).Render(summary.ToImprove) - for _, line := range strings.Split(wrapped, "\n") { - b.WriteString(" " + line + "\n") + for line := range strings.SplitSeq(wrapped, "\n") { + b.WriteString(" ") + b.WriteString(line) + b.WriteString("\n") } b.WriteString("\n") } @@ -1404,24 +1413,28 @@ func (m *simulateModel) renderSummary() string { if len(summary.Issues) > 0 { b.WriteString(redStyle.Bold(true).Render(" Issues:")) b.WriteString("\n") - issueWrap := wrapWidth - 4 // account for " N. " prefix - if issueWrap < 30 { - issueWrap = 30 - } + issueWrap := max( + // account for " N. " prefix + wrapWidth-4, 30) for i, issue := range summary.Issues { prefix := fmt.Sprintf(" %d. ", i+1) descWrapped := lipgloss.NewStyle().Width(issueWrap).Render(issue.Description) for j, line := range strings.Split(descWrapped, "\n") { if j == 0 { - b.WriteString(prefix + line + "\n") + b.WriteString(prefix) + b.WriteString(line) + b.WriteString("\n") } else { - b.WriteString(strings.Repeat(" ", len(prefix)) + line + "\n") + b.WriteString(strings.Repeat(" ", len(prefix))) + b.WriteString(line) + b.WriteString("\n") } } if issue.Suggestion != "" { sugWrapped := lipgloss.NewStyle().Width(issueWrap).Render("Suggestion: " + issue.Suggestion) - for _, line := range strings.Split(sugWrapped, "\n") { - b.WriteString(dimStyle.Render(strings.Repeat(" ", len(prefix))+line) + "\n") + for line := range strings.SplitSeq(sugWrapped, "\n") { + b.WriteString(dimStyle.Render(strings.Repeat(" ", len(prefix)) + line)) + b.WriteString("\n") } } } @@ -1453,10 +1466,7 @@ func (m *simulateModel) renderChatTranscript(jobID string) string { b.WriteString(boldStyle.Render(" Transcript:")) b.WriteString("\n") - wrapWidth := m.width - 8 - if wrapWidth < 40 { - wrapWidth = 40 - } + wrapWidth := max(m.width-8, 40) wrapStyle := lipgloss.NewStyle().Width(wrapWidth) for _, item := range chatCtx.Items { @@ -1470,14 +1480,16 @@ func (m *simulateModel) renderChatTranscript(jobID string) string { b.WriteString("\n") switch msg.Role { case agent.ChatRole_USER: - b.WriteString(fmt.Sprintf(" %s\n", userStyle.Render("You"))) + fmt.Fprintf(&b, " %s\n", userStyle.Render("You")) case agent.ChatRole_ASSISTANT: - b.WriteString(fmt.Sprintf(" %s\n", agentStyle.Render("Agent"))) + fmt.Fprintf(&b, " %s\n", agentStyle.Render("Agent")) default: - b.WriteString(fmt.Sprintf(" %s\n", dimStyle.Render(string(msg.Role)))) + fmt.Fprintf(&b, " %s\n", dimStyle.Render(string(msg.Role))) } - for _, line := range strings.Split(wrapStyle.Render(text), "\n") { - b.WriteString(" " + line + "\n") + for line := range strings.SplitSeq(wrapStyle.Render(text), "\n") { + b.WriteString(" ") + b.WriteString(line) + b.WriteString("\n") } case *agent.ChatContext_ChatItem_FunctionCall: fc := v.FunctionCall @@ -1529,14 +1541,8 @@ func (m *simulateModel) renderLogs(roomName string) string { return "" } var b strings.Builder - logBudget := m.height / 3 - if logBudget < 3 { - logBudget = 3 - } - maxWidth := m.width - 4 - if maxWidth < 20 { - maxWidth = 20 - } + logBudget := max(m.height/3, 3) + maxWidth := max(m.width-4, 20) wrapStyle := lipgloss.NewStyle().Width(maxWidth) var rawLines []string @@ -1548,7 +1554,7 @@ func (m *simulateModel) renderLogs(roomName string) string { var visualLines []string for _, line := range rawLines { wrapped := wrapStyle.Render(line) - for _, wl := range strings.Split(wrapped, "\n") { + for wl := range strings.SplitSeq(wrapped, "\n") { visualLines = append(visualLines, wl) } } @@ -1558,19 +1564,13 @@ func (m *simulateModel) renderLogs(roomName string) string { return b.String() } - maxScroll := total - logBudget - if maxScroll < 0 { - maxScroll = 0 - } + maxScroll := max(total-logBudget, 0) if m.logPinned { // Convert from-bottom offset to stable from-top position // When pinned, new lines arriving shouldn't move the viewport pinnedStart := m.logPinnedTotal - logBudget - m.logScrollOff - newOffset := total - logBudget - pinnedStart - if newOffset < 0 { - newOffset = 0 - } + newOffset := max(total-logBudget-pinnedStart, 0) m.logScrollOff = newOffset } m.logPinnedTotal = total @@ -1582,21 +1582,17 @@ func (m *simulateModel) renderLogs(roomName string) string { m.logScrollOff = 0 } - start := total - logBudget - m.logScrollOff - if start < 0 { - start = 0 - } - end := start + logBudget - if end > total { - end = total - } + start := max(total-logBudget-m.logScrollOff, 0) + end := min(start+logBudget, total) if m.logScrollOff > 0 { b.WriteString(dimStyle.Render(fmt.Sprintf(" ↑ %d more lines above", start))) b.WriteString("\n") } for _, vl := range visualLines[start:end] { - b.WriteString(" " + vl + "\n") + b.WriteString(" ") + b.WriteString(vl) + b.WriteString("\n") } if end < total { b.WriteString(dimStyle.Render(fmt.Sprintf(" ↓ %d more lines below", total-end))) @@ -1607,7 +1603,7 @@ func (m *simulateModel) renderLogs(roomName string) string { // firstMeaningfulLine returns the first non-empty, non-heading line from text. func firstMeaningfulLine(text string) string { - for _, line := range strings.Split(text, "\n") { + for line := range strings.SplitSeq(text, "\n") { line = strings.TrimSpace(line) if line == "" || strings.HasPrefix(line, "#") { continue diff --git a/cmd/lk/token.go b/cmd/lk/token.go index a5f69b47..7b3366d3 100644 --- a/cmd/lk/token.go +++ b/cmd/lk/token.go @@ -20,6 +20,7 @@ import ( "errors" "fmt" "io" + "maps" "os" "slices" "time" @@ -264,9 +265,7 @@ func createToken(ctx context.Context, c *cli.Command) error { if participantAttributes == nil { participantAttributes = make(map[string]string) } - for key, value := range fileAttrs { - participantAttributes[key] = value - } + maps.Copy(participantAttributes, fileAttrs) } // required only for join, will be generated if not provided diff --git a/cmd/lk/ulimit_unix.go b/cmd/lk/ulimit_unix.go index d26e3ba1..bb099a99 100644 --- a/cmd/lk/ulimit_unix.go +++ b/cmd/lk/ulimit_unix.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build linux || darwin || freebsd -// +build linux darwin freebsd package main diff --git a/pkg/agentfs/sdk_version_check.go b/pkg/agentfs/sdk_version_check.go index cf63681c..76cc8b01 100644 --- a/pkg/agentfs/sdk_version_check.go +++ b/pkg/agentfs/sdk_version_check.go @@ -159,8 +159,8 @@ func parsePythonPackageVersion(line string) (string, bool) { // clean up the version string if it contains multiple constraints // handle comma-separated version constraints like ">=1.2.5,<2" if strings.Contains(version, ",") { - parts := strings.Split(version, ",") - for _, part := range parts { + parts := strings.SplitSeq(version, ",") + for part := range parts { trimmed := strings.TrimSpace(part) if regexp.MustCompile(`\d`).MatchString(trimmed) { if strings.ContainsAny(trimmed, "=~><") { diff --git a/pkg/console/pipeline.go b/pkg/console/pipeline.go index 1942cbfa..a975a7bc 100644 --- a/pkg/console/pipeline.go +++ b/pkg/console/pipeline.go @@ -572,7 +572,7 @@ func (p *AudioPipeline) computeMetrics(samples []int16) { // Mean power → dB → normalize to [0,1] const floorDB, hotDB = -70.0, -20.0 var bands [NumFFTBands]float64 - for b := 0; b < nb; b++ { + for b := range nb { c := cnts[b] if c == 0 { c = 1 @@ -611,7 +611,7 @@ func (p *AudioPipeline) computeMetrics(samples []int16) { db := 20 * math.Log10(rms+1e-10) p.mu.Lock() - for b := 0; b < nb; b++ { + for b := range nb { if bands[b] > p.fftBands[b]*decay { p.fftBands[b] = bands[b] } else { diff --git a/pkg/console/ringbuffer.go b/pkg/console/ringbuffer.go index b4b7eba1..18828b4f 100644 --- a/pkg/console/ringbuffer.go +++ b/pkg/console/ringbuffer.go @@ -53,12 +53,9 @@ func (rb *RingBuffer) ReadAvailable(out []int16) int { rb.r.Add(skip) avail = rb.size } - n := len(out) - if n > avail { - n = avail - } + n := min(len(out), avail) r := int(rb.r.Load()) - for i := 0; i < n; i++ { + for i := range n { out[i] = rb.buf[(r+i)%rb.size] } rb.r.Add(int64(n)) @@ -84,12 +81,9 @@ func (rb *RingBuffer) Read(out []int16) bool { rb.r.Add(skip) avail = rb.size } - toCopy := needed - copied - if toCopy > avail { - toCopy = avail - } + toCopy := min(needed-copied, avail) r := int(rb.r.Load()) - for i := 0; i < toCopy; i++ { + for i := range toCopy { out[copied+i] = rb.buf[(r+i)%rb.size] } rb.r.Add(int64(toCopy)) diff --git a/pkg/loadtester/agentloadtester.go b/pkg/loadtester/agentloadtester.go index 43d8e950..acfd4cb5 100644 --- a/pkg/loadtester/agentloadtester.go +++ b/pkg/loadtester/agentloadtester.go @@ -170,12 +170,12 @@ func (r *LoadTestRoom) start(roomName string) error { var err error // make up to 10 reconnect attempts - for i := 0; i < 10; i++ { + for i := range 10 { err = r.room.Join(r.params.URL, lksdk.ConnectInfo{ - APIKey: r.params.APIKey, - APISecret: r.params.APISecret, - RoomName: roomName, - ParticipantIdentity: identity, + APIKey: r.params.APIKey, + APISecret: r.params.APISecret, + RoomName: roomName, + ParticipantIdentity: identity, ParticipantAttributes: r.params.ParticipantAttributes, }) if err == nil { diff --git a/pkg/loadtester/loadtest.go b/pkg/loadtester/loadtest.go index 96b6bf61..8c86ac2e 100644 --- a/pkg/loadtester/loadtest.go +++ b/pkg/loadtester/loadtest.go @@ -297,10 +297,7 @@ func (t *LoadTest) run(ctx context.Context, params Params) (map[string]*testerSt var publishers, testers []*LoadTester group, _ := errgroup.WithContext(ctx) errs := syncmap.Map{} - maxPublishers := params.VideoPublishers - if params.AudioPublishers > maxPublishers { - maxPublishers = params.AudioPublishers - } + maxPublishers := max(params.AudioPublishers, params.VideoPublishers) // throttle pace of join events limiter := rate.NewLimiter(rate.Limit(params.NumPerSecond), 1) diff --git a/pkg/loadtester/loadtester.go b/pkg/loadtester/loadtester.go index 95fdaa06..b9240e80 100644 --- a/pkg/loadtester/loadtester.go +++ b/pkg/loadtester/loadtester.go @@ -115,7 +115,7 @@ func (t *LoadTester) Start() error { }) var err error // make up to 10 reconnect attempts - for i := 0; i < 10; i++ { + for range 10 { err = t.room.Join(t.params.URL, lksdk.ConnectInfo{ APIKey: t.params.APIKey, APISecret: t.params.APISecret, @@ -240,7 +240,7 @@ func (t *LoadTester) getStats() *testerStats { expectedTracks: t.params.expectedTracks, trackStats: make(map[string]*trackStats), } - t.stats.Range(func(key, value interface{}) bool { + t.stats.Range(func(key, value any) bool { stats.trackStats[key.(string)] = value.(*trackStats) return true }) @@ -249,7 +249,7 @@ func (t *LoadTester) getStats() *testerStats { func (t *LoadTester) Reset() { stats := sync.Map{} - t.stats.Range(func(key, value interface{}) bool { + t.stats.Range(func(key, value any) bool { old := value.(*trackStats) stats.Store(key, &trackStats{ trackID: old.trackID, diff --git a/pkg/loadtester/loadtestprovider.go b/pkg/loadtester/loadtestprovider.go index 8da5f7e8..5f85d49e 100644 --- a/pkg/loadtester/loadtestprovider.go +++ b/pkg/loadtester/loadtestprovider.go @@ -79,7 +79,7 @@ func (d *LoadTestDepacketizer) IsPartitionHead(payload []byte) bool { if len(payload) < 4 { return false } - for i := 0; i < 4; i++ { + for i := range 4 { if payload[i] != 0xfa { return false } From 848f51082b2f63abe6da382eff9b2e8cdd81d35a Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Mon, 8 Jun 2026 22:00:41 -0600 Subject: [PATCH 05/11] chore(autocomplete): update fish completion and add go:generate directive --- autocomplete/fish_autocomplete | 9 ++++----- cmd/lk/main.go | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/autocomplete/fish_autocomplete b/autocomplete/fish_autocomplete index ceb5b9ca..724fa552 100644 --- a/autocomplete/fish_autocomplete +++ b/autocomplete/fish_autocomplete @@ -19,9 +19,11 @@ complete -c lk -n '__fish_lk_no_subcommand' -f -l config -r -d 'Config `TOML` to complete -c lk -n '__fish_lk_no_subcommand' -f -l curl -d 'Print curl commands for API actions' complete -c lk -n '__fish_lk_no_subcommand' -f -l verbose complete -c lk -n '__fish_lk_no_subcommand' -f -l yes -s y -d 'Assume yes for confirmations; fail or use default for other prompts (use in CI/non-interactive)' -complete -c lk -n '__fish_lk_no_subcommand' -f -l quiet -s q -d 'Suppress informational output to stderr (warnings and errors still print)' +complete -c lk -n '__fish_lk_no_subcommand' -f -l quiet -s q -s silent -d 'Suppress informational output to stderr (warnings and errors still print)' complete -c lk -n '__fish_lk_no_subcommand' -f -l help -s h -d 'show help' complete -c lk -n '__fish_lk_no_subcommand' -f -l version -s v -d 'print the version' +complete -c lk -n '__fish_lk_no_subcommand' -xa '(lk --generate-shell-completion 2>/dev/null)' +complete -c lk -n '__fish_seen_subcommand_from generate-fish-completion' -xa '(lk generate-fish-completion --generate-shell-completion 2>/dev/null)' complete -c lk -n '__fish_seen_subcommand_from generate-fish-completion' -f -l out -s o -r complete -c lk -n '__fish_seen_subcommand_from generate-fish-completion' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from generate-fish-completion; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' @@ -64,14 +66,12 @@ complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcomma complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l silent -d 'If set, will not prompt for confirmation' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l region -r -d 'Region to deploy the agent to. If unset, will deploy to the nearest region.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l image -r -d 'Pre-built image from the local Docker daemon (e.g. myimage:latest). Requires Docker.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l image-tar -r -d 'Pre-built image from an OCI tar file (e.g. ./image.tar). No Docker daemon required.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'dockerfile' -d 'Generate Dockerfile and .dockerignore for your project' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile' -f -l silent -d 'If set, will not prompt for confirmation' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile' -f -l overwrite -d 'Overwrite existing Dockerfile and/or .dockerignore if they exist' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' @@ -83,7 +83,6 @@ complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_s complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l silent -d 'If set, will not prompt for confirmation' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l region -r -d 'Region to deploy the agent to. If unset, will deploy to the nearest region.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l image -r -d 'Pre-built image from the local Docker daemon (e.g. myimage:latest). Requires Docker.' @@ -116,7 +115,6 @@ complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcomma complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'delete' -d 'Delete an agent' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from delete destroy' -f -l silent -d 'If set, will not prompt for confirmation' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from delete destroy' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from delete destroy' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from delete destroy; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' @@ -507,6 +505,7 @@ complete -x -c lk -n '__fish_seen_subcommand_from egress; and not __fish_seen_su complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list' -f -l id -r -d 'List a specific egress `ID`, can be used multiple times' complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list' -f -l room -r -d 'Limits list to a certain room `NAME`' complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list' -f -l active -s a -d 'Lists only active egresses' +complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list' -f -l limit -r -d 'maximum number of items to return. If unset, defaults to API page size' complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON' complete -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from egress; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' diff --git a/cmd/lk/main.go b/cmd/lk/main.go index 1e59c142..bac4163f 100644 --- a/cmd/lk/main.go +++ b/cmd/lk/main.go @@ -134,6 +134,10 @@ func initLogger(ctx context.Context, cmd *cli.Command) (context.Context, error) return nil, nil } +// Keep autocomplete/fish_autocomplete in sync with the command tree. CI (test.yaml) +// fails if the committed file drifts; run `go generate ./...` to refresh it. +// +//go:generate go run . generate-fish-completion -o ../../autocomplete/fish_autocomplete func generateFishCompletion(ctx context.Context, cmd *cli.Command) error { fishScript, err := cmd.Root().ToFishCompletion() if err != nil { From 9aa63ec44ba899889f7b6038aaa6ac9b79f3abf5 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Mon, 8 Jun 2026 22:34:02 -0600 Subject: [PATCH 06/11] chore(build): reintroduce Makefile --- Makefile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..90421e45 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +# `make` builds the lk binary — the same cgo artifact as `go build ./cmd/lk` +# (see the README), with a submodule init so it also works from a fresh clone. +# It doubles as the build system CodeQL's C/C++ autobuild detects and traces to +# extract the vendored C/C++ (PortAudio + WebRTC APM). +# +# `make install` puts it on $GOBIN with a `livekit-cli` alias for the legacy +# binary name. Releases use .goreleaser.yaml, not this file. + +ifeq (,$(shell go env GOBIN)) +GOBIN := $(shell go env GOPATH)/bin +else +GOBIN := $(shell go env GOBIN) +endif + +ifeq ($(OS),Windows_NT) +EXE := .exe +endif + +# pa_src holds the PortAudio C source the cgo build links against; the submodule +# init makes this work from a fresh clone (and under CodeQL, whose checkout may +# skip submodules). ALSA headers (libasound2-dev) come from CodeQL's automatic +# dependency installation on Linux. +lk$(EXE): + git submodule update --init --recursive + CGO_ENABLED=1 go build -o lk$(EXE) ./cmd/lk + +install: lk$(EXE) + cp lk$(EXE) "$(GOBIN)/lk$(EXE)" + ln -sf "$(GOBIN)/lk$(EXE)" "$(GOBIN)/livekit-cli$(EXE)" From 046870390a8ff558c0547119aa548524c5f8ac8d Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Mon, 8 Jun 2026 23:41:19 -0600 Subject: [PATCH 07/11] fix(build): locate zig lib dir correctly --- scripts/setup-cross.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/setup-cross.sh b/scripts/setup-cross.sh index ef534f3c..209d94a9 100755 --- a/scripts/setup-cross.sh +++ b/scripts/setup-cross.sh @@ -85,12 +85,13 @@ generate_mingw_libs() { local machine="$1" local zig_lib def_dir # zig 0.14 outputs JSON ("lib_dir": "..."); zig 0.16 outputs ZON - # (.lib_dir = "..."). This pattern matches both. - zig_lib="$(zig env | sed -n 's/.*lib_dir[^"]*"\([^"]*\)".*/\1/p')" + # (.lib_dir = "..."). The [":= ]* class spans both separators so the capture + # starts at the value, not the JSON key's closing quote. + zig_lib="$(zig env | sed -n 's/.*lib_dir[":= ]*\([^"]*\)".*/\1/p')" def_dir="$zig_lib/libc/mingw/lib-common" - if [ ! -d "$def_dir" ]; then - echo "[$target] zig lib dir not found at $def_dir" >&2 + if [ -z "$zig_lib" ] || [ ! -d "$def_dir" ]; then + echo "[$target] could not locate zig mingw lib dir (zig_lib='$zig_lib', def_dir='$def_dir')" >&2 return 1 fi From c4143d0083ef23a3b12976bee27b45181f1e1fc2 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Mon, 8 Jun 2026 23:58:56 -0600 Subject: [PATCH 08/11] chore(ci): drop windows-latest from test matrix --- .github/workflows/test.yaml | 10 ++++------ README.md | 8 ++++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8cda3e30..535d551e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,7 +10,10 @@ jobs: test: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + # No windows-latest: its native MinGW GCC can't compile the WebRTC APM + # C++ (clang-only SEH __try/__except). Windows is built+validated by the + # zig cross-build in build.yaml; the audio packages have no unit tests. + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} @@ -18,11 +21,6 @@ jobs: contents: read packages: read - env: - # The WebRTC APM's #cgo windows CXXFLAGS use -fms-extensions (SEH), which - # isn't on cgo's directive allowlist; unlock it for the Windows build. - CGO_CXXFLAGS_ALLOW: -fms-extensions - steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: diff --git a/README.md b/README.md index 8776f020..05820013 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,6 @@ Every build of `lk` includes the audio/console subsystem (CGO + PortAudio + WebR - **macOS**: nothing to install — CoreAudio frameworks ship with Xcode CLT. - **Linux**: `sudo apt-get install libasound2-dev` (or your distro's ALSA dev package). -- **Windows**: MinGW from the standard Go distribution, and set `CGO_CXXFLAGS_ALLOW=-fms-extensions` (the WebRTC APM uses SEH, which cgo gates behind this allow-list flag). Then: @@ -62,7 +61,12 @@ git clone https://github.com/livekit/livekit-cli && cd livekit-cli go build ./cmd/lk ``` -To cross-compile for another platform, install [Zig](https://ziglang.org/download/) 0.14.1 and run a [GoReleaser](https://goreleaser.com/) snapshot build: +The WebRTC APM C++ requires a Clang-based toolchain (it uses MSVC-style SEH on +Windows). macOS and most Linux distros already use Clang for cgo. To build for +**Windows** — or to cross-compile for any platform — install +[Zig](https://ziglang.org/download/) 0.14.1 (used as the Clang C/C++ toolchain) +and run a [GoReleaser](https://goreleaser.com/) snapshot build, which sets the +compiler and flags for you: ```shell goreleaser build --single-target --snapshot --clean From a78a8c713079cb56da98dd1cb0fa79f1b9ce1bf8 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Tue, 9 Jun 2026 09:49:06 -0600 Subject: [PATCH 09/11] chore(ci): build darwin on macOS, decouple docker darwin cgo can't be cross-compiled from Linux (no macOS SDK / CoreAudio), so the single-runner ubuntu pipeline can't build it. Restructure around where each target can build: - build.yaml: split into a ubuntu job (linux + windows via zig, selected with --id) and a macOS job that builds darwin natively (both arm64 and amd64, the latter cross-compiled via Apple clang). - release.yaml: goreleaser runs on macOS so darwin builds natively while zig still cross-compiles linux + windows; it produces all binaries, archives, checksums, and the GitHub release, then stages the linux binaries as an artifact. A separate ubuntu job builds and pushes the multi-arch Docker images from those binaries (macOS runners have no Docker daemon). - .goreleaser.yaml: drop the dockers/docker_manifests blocks (moved to the docker job) and restore the darwin/amd64 build alongside arm64. - Dockerfile: distroless image that COPYs the pre-built lk_linux_ binary selected by TARGETARCH, instead of building in-container. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/build.yaml | 37 ++++++++++++-- .github/workflows/release.yaml | 92 +++++++++++++++++++++++++--------- .goreleaser.yaml | 57 +++++++-------------- Dockerfile | 11 ++-- 4 files changed, 125 insertions(+), 72 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f9a4c82c..2b4876cd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,8 +24,9 @@ permissions: contents: read jobs: + # Linux + Windows are cross-compiled with zig on a (cheap) Linux runner. cross-build: - name: Cross-build (goreleaser snapshot) + name: Cross-build linux+windows (zig) runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 @@ -53,17 +54,45 @@ jobs: with: distribution: goreleaser version: latest - args: build --snapshot --clean + # darwin is excluded here — it can't be cross-compiled from Linux + # (no macOS SDK/CoreAudio); it builds natively in the macos job below. + args: >- + build --snapshot --clean + --id lk-linux-amd64 --id lk-linux-arm64 + --id lk-windows-amd64 --id lk-windows-arm64 env: # goreleaser-action runs goreleaser via a Node wrapper that doesn't # forward PWD; the .goreleaser.yaml CGO flags template {{ .Env.PWD }} # to locate .cross/. Provide it explicitly. PWD: ${{ github.workspace }} - - name: Verify native binary runs + - name: Verify linux binary runs run: | - # Pick the linux-amd64 binary out of dist/ and run --help. binary=$(find dist -type f -name lk -path '*linux*amd64*' | head -n1) test -n "$binary" || { echo "no linux/amd64 binary in dist/"; exit 1; } # Static-libgcc/libstdc++ binary should run on glibc 2.28+ Ubuntu runners. "$binary" --help > /dev/null + + # darwin builds natively on macOS — its cgo links the CoreAudio frameworks, + # which only exist on a Mac. No zig needed. + build-darwin: + name: Build darwin (native) + runs-on: macos-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + submodules: true + + - name: Set up Go + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 + with: + go-version-file: go.mod + + - name: Build and verify + run: | + # arm64 native — build and run. + CGO_ENABLED=1 go build -o /tmp/lk ./cmd/lk + /tmp/lk --help > /dev/null + # amd64 (Intel) cross — Apple clang targets x86_64 from arm64; compile + # only (can't run an x86_64 binary on the arm64 runner). + CGO_ENABLED=1 GOARCH=amd64 go build -o /tmp/lk-amd64 ./cmd/lk diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d2c497b0..1d793fd6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,7 +14,6 @@ name: Release -# on events on: push: tags: @@ -22,13 +21,15 @@ on: permissions: contents: write - packages: write -# workflow tasks jobs: + # GoReleaser runs on macOS so the darwin binary builds natively (CoreAudio + # frameworks only exist on a Mac); zig still cross-compiles linux + windows + # from here. Produces all binaries, archives, checksums, and the GitHub + # release. Docker is handled by the separate job below (macOS has no Docker). release: name: Release - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: Checkout Git LFS uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 @@ -51,7 +52,7 @@ jobs: exit 1 fi echo "✓ Versions match: $CODE_VERSION" - + - name: Verify server-sdk-go version run: | livekit_cli_ver=${GITHUB_REF#refs/tags/} @@ -74,18 +75,11 @@ jobs: - name: Fetch all tags run: git fetch --force --tags - - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5 - with: - path: | - ~/go/pkg/mod - ~/go/bin - ~/.cache - key: livekit-cli - - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 with: go-version-file: go.mod + cache: true - name: Install Zig uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2 @@ -98,6 +92,60 @@ jobs: path: .cross key: cross-${{ runner.os }}-zig0.14.1-alsa1.2.12-${{ hashFiles('scripts/setup-cross.sh') }} + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # goreleaser-action runs goreleaser via a Node wrapper that doesn't + # forward PWD; the .goreleaser.yaml CGO flags template {{ .Env.PWD }} + # to locate .cross/. Provide it explicitly. + PWD: ${{ github.workspace }} + + - name: Stage linux binaries for Docker + run: | + mkdir -p docker-bin + cp dist/lk-linux-amd64_*/lk docker-bin/lk_linux_amd64 + cp dist/lk-linux-arm64_*/lk docker-bin/lk_linux_arm64 + + - name: Upload linux binaries + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 + with: + name: docker-bin + path: docker-bin/ + if-no-files-found: error + + # Build + push multi-arch Docker images on Linux (where the Docker daemon + # lives), reusing the cgo linux binaries staged by the release job. + docker: + name: Release to Docker + needs: release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + + - name: Download linux binaries + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 + with: + name: docker-bin + path: . + + - name: Restore executable bit + run: chmod +x lk_linux_amd64 lk_linux_arm64 + + - name: Docker meta + id: meta + uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5 + with: + images: livekit/livekit-cli + tags: | + type=semver,pattern=v{{version}} + type=semver,pattern=v{{major}}.{{minor}} + - name: Set up QEMU uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3 @@ -110,15 +158,11 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7 + - name: Build and push + uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 with: - distribution: goreleaser - version: latest - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # goreleaser-action runs goreleaser via a Node wrapper that doesn't - # forward PWD; the .goreleaser.yaml CGO flags template {{ .Env.PWD }} - # to locate .cross/. Provide it explicitly. - PWD: ${{ github.workspace }} + context: . + push: true + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 334b2ae4..5797ffd4 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -24,6 +24,20 @@ before: - go mod tidy builds: + # darwin can't be cross-compiled from Linux (no macOS SDK / CoreAudio); it + # builds where goreleaser runs (the macOS release runner). On the arm64 macOS + # runner, amd64 cross-compiles via Apple clang's -arch against the universal + # SDK. The build.yaml smoke test builds both arches the same way. + - id: lk-darwin-amd64 + main: ./cmd/lk + binary: lk + env: + - CGO_ENABLED=1 + goos: [darwin] + goarch: [amd64] + ldflags: + - -s -w + - id: lk-darwin-arm64 main: ./cmd/lk binary: lk @@ -123,46 +137,9 @@ archives: - LICENSE - 'autocomplete/*' -dockers: - - image_templates: - - "livekit/livekit-cli:{{ .Tag }}-amd64" - - "livekit/livekit-cli:v{{ .Major }}.{{ .Minor }}-amd64" - ids: [lk-linux-amd64] - goos: linux - goarch: amd64 - dockerfile: Dockerfile - use: buildx - build_flag_templates: - - "--platform=linux/amd64" - - "--label=org.opencontainers.image.created={{ .Date }}" - - "--label=org.opencontainers.image.version={{ .Version }}" - - "--label=org.opencontainers.image.revision={{ .FullCommit }}" - - "--label=org.opencontainers.image.source={{ .GitURL }}" - - - image_templates: - - "livekit/livekit-cli:{{ .Tag }}-arm64" - - "livekit/livekit-cli:v{{ .Major }}.{{ .Minor }}-arm64" - ids: [lk-linux-arm64] - goos: linux - goarch: arm64 - dockerfile: Dockerfile - use: buildx - build_flag_templates: - - "--platform=linux/arm64" - - "--label=org.opencontainers.image.created={{ .Date }}" - - "--label=org.opencontainers.image.version={{ .Version }}" - - "--label=org.opencontainers.image.revision={{ .FullCommit }}" - - "--label=org.opencontainers.image.source={{ .GitURL }}" - -docker_manifests: - - name_template: "livekit/livekit-cli:{{ .Tag }}" - image_templates: - - "livekit/livekit-cli:{{ .Tag }}-amd64" - - "livekit/livekit-cli:{{ .Tag }}-arm64" - - name_template: "livekit/livekit-cli:v{{ .Major }}.{{ .Minor }}" - image_templates: - - "livekit/livekit-cli:v{{ .Major }}.{{ .Minor }}-amd64" - - "livekit/livekit-cli:v{{ .Major }}.{{ .Minor }}-arm64" +# Docker images are built+pushed by a separate job in release.yaml (on a Linux +# runner with a Docker daemon), since goreleaser runs on macOS here to build the +# darwin binary natively and macOS runners have no Docker. release: github: diff --git a/Dockerfile b/Dockerfile index 16c223c6..ca778a8e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Consumed by goreleaser, which drops the pre-built `lk` binary into the build -# context. Distroless gives us glibc (the binary targets glibc 2.28+) plus CA -# certs for TLS, without a shell or package manager. +# Consumed by the docker job in release.yaml via `docker buildx`. The release +# job (goreleaser, on macOS) cross-builds the cgo Linux binaries with zig and +# stages them as lk_linux_ in the build context; buildx sets TARGETARCH +# per platform. Distroless gives glibc (the binaries target glibc 2.28+) plus CA +# certs, without a shell or package manager. FROM gcr.io/distroless/base-debian12 -COPY lk /lk +ARG TARGETARCH +COPY lk_linux_${TARGETARCH} /lk ENTRYPOINT ["/lk"] From f26d9698ee5801882b285311118a4e26ea8bd19c Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Tue, 9 Jun 2026 09:49:40 -0600 Subject: [PATCH 10/11] chore(build): bump version for release --- cmd/lk/simulate_save.go | 331 ---------------------------------------- go.sum | 2 - version.go | 2 +- 3 files changed, 1 insertion(+), 334 deletions(-) delete mode 100644 cmd/lk/simulate_save.go diff --git a/cmd/lk/simulate_save.go b/cmd/lk/simulate_save.go deleted file mode 100644 index 7e016210..00000000 --- a/cmd/lk/simulate_save.go +++ /dev/null @@ -1,331 +0,0 @@ -// Copyright 2025 LiveKit, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "context" - "fmt" - "strings" - "time" - - tea "github.com/charmbracelet/bubbletea" - "github.com/charmbracelet/lipgloss" - - "github.com/livekit/protocol/livekit" - lksdk "github.com/livekit/server-sdk-go/v2" -) - -type savePhase int - -const ( - savePhaseLoading savePhase = iota - savePhaseList - savePhaseNewGroup - savePhaseSaving - savePhaseSuccess - savePhaseError -) - -type saveOverlay struct { - active bool - client *lksdk.AgentSimulationClient - job *livekit.SimulationRun_Job - phase savePhase - groups []*livekit.ScenarioGroup - cursor int - groupInput string - err error - successMsg string - spinnerIdx int - width int -} - -// --- Messages --- - -type saveGroupsLoadedMsg struct { - groups []*livekit.ScenarioGroup - err error -} - -type scenarioSavedMsg struct { - groupLabel string - err error -} - -type saveDismissMsg struct{} - -type saveSpinnerTickMsg struct{} - -func saveSpinnerTickCmd() tea.Cmd { - return tea.Tick(80*time.Millisecond, func(time.Time) tea.Msg { - return saveSpinnerTickMsg{} - }) -} - -// --- Lifecycle --- - -func (s *saveOverlay) start(client *lksdk.AgentSimulationClient, job *livekit.SimulationRun_Job, width int) { - *s = saveOverlay{ - active: true, - client: client, - job: job, - phase: savePhaseLoading, - width: width, - } -} - -// --- Async commands --- - -func (s *saveOverlay) fetchGroupsCmd() tea.Cmd { - client := s.client - return func() tea.Msg { - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) - defer cancel() - resp, err := client.ListScenarioGroups(ctx, &livekit.ScenarioGroup_List_Request{}) - if err != nil { - return saveGroupsLoadedMsg{err: err} - } - return saveGroupsLoadedMsg{groups: resp.GetScenarioGroups()} - } -} - -func (s *saveOverlay) saveScenarioCmd(groupID, groupLabel string) tea.Cmd { - client := s.client - job := s.job - return func() tea.Msg { - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) - defer cancel() - _, err := client.CreateScenario(ctx, &livekit.Scenario_Create_Request{ - GroupId: groupID, - Label: job.Label, - Instructions: job.Instructions, - AgentExpectations: job.AgentExpectations, - }) - if err != nil { - return scenarioSavedMsg{err: err} - } - return scenarioSavedMsg{groupLabel: groupLabel} - } -} - -func (s *saveOverlay) createGroupAndSaveCmd(groupLabel string) tea.Cmd { - client := s.client - job := s.job - return func() tea.Msg { - ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) - defer cancel() - groupResp, err := client.CreateScenarioGroup(ctx, &livekit.ScenarioGroup_Create_Request{ - Label: groupLabel, - }) - if err != nil { - return scenarioSavedMsg{err: fmt.Errorf("create group: %w", err)} - } - _, err = client.CreateScenario(ctx, &livekit.Scenario_Create_Request{ - GroupId: groupResp.GetScenarioGroup().GetId(), - Label: job.Label, - Instructions: job.Instructions, - AgentExpectations: job.AgentExpectations, - }) - if err != nil { - return scenarioSavedMsg{err: err} - } - return scenarioSavedMsg{groupLabel: groupLabel} - } -} - -// --- Message handling --- - -func (s *saveOverlay) handleMsg(msg tea.Msg) tea.Cmd { - switch msg := msg.(type) { - case saveGroupsLoadedMsg: - if msg.err != nil { - s.phase = savePhaseError - s.err = msg.err - return nil - } - s.groups = msg.groups - s.phase = savePhaseList - s.cursor = 0 - return nil - - case scenarioSavedMsg: - if msg.err != nil { - s.phase = savePhaseError - s.err = msg.err - return nil - } - s.phase = savePhaseSuccess - s.successMsg = msg.groupLabel - return tea.Tick(2*time.Second, func(time.Time) tea.Msg { - return saveDismissMsg{} - }) - - case saveDismissMsg: - s.active = false - return nil - - case saveSpinnerTickMsg: - if s.active && (s.phase == savePhaseLoading || s.phase == savePhaseSaving) { - s.spinnerIdx++ - return saveSpinnerTickCmd() - } - return nil - } - return nil -} - -// --- Key handling --- - -func (s *saveOverlay) handleKey(key string) tea.Cmd { - switch s.phase { - case savePhaseLoading, savePhaseSaving: - if key == "esc" { - s.active = false - } - return nil - - case savePhaseSuccess: - s.active = false - return nil - - case savePhaseError: - switch key { - case "esc", "q": - s.active = false - case "r": - s.phase = savePhaseLoading - s.err = nil - return tea.Batch(s.fetchGroupsCmd(), saveSpinnerTickCmd()) - } - return nil - - case savePhaseNewGroup: - switch key { - case "esc": - s.phase = savePhaseList - s.groupInput = "" - case "enter": - name := strings.TrimSpace(s.groupInput) - if name != "" { - s.phase = savePhaseSaving - return tea.Batch(s.createGroupAndSaveCmd(name), saveSpinnerTickCmd()) - } - case "backspace": - if len(s.groupInput) > 0 { - s.groupInput = s.groupInput[:len(s.groupInput)-1] - } - default: - if len(key) == 1 && key[0] >= 32 { - s.groupInput += key - } - } - return nil - - case savePhaseList: - maxIdx := len(s.groups) // extra slot for "+ New Group..." - switch key { - case "esc", "q": - s.active = false - case "up", "shift+tab": - if s.cursor > 0 { - s.cursor-- - } - case "down", "tab": - if s.cursor < maxIdx { - s.cursor++ - } - case "enter": - if s.cursor < len(s.groups) { - group := s.groups[s.cursor] - s.phase = savePhaseSaving - return tea.Batch(s.saveScenarioCmd(group.Id, group.Label), saveSpinnerTickCmd()) - } - // "+ New Group..." selected - s.phase = savePhaseNewGroup - s.groupInput = "" - } - return nil - } - return nil -} - -// --- Rendering --- - -var ( - saveBoxStyle = lipgloss.NewStyle(). - Border(lipgloss.RoundedBorder()). - BorderForeground(lipgloss.Color("6")). - Padding(0, 1) - saveTitleStyle = lipgloss.NewStyle(). - Foreground(lipgloss.Color("6")). - Bold(true) - saveSelectedStyle = lipgloss.NewStyle(). - Foreground(lipgloss.Color("6")). - Bold(true) - saveNewGroupStyle = lipgloss.NewStyle(). - Foreground(lipgloss.Color("214")) -) - -func (s *saveOverlay) render() string { - boxWidth := min(max(s.width-8, 40), 60) - - var b strings.Builder - title := saveTitleStyle.Render("Save to Scenario Group") - b.WriteString(title) - b.WriteString("\n") - - switch s.phase { - case savePhaseLoading: - spinner := simSpinnerFrames[s.spinnerIdx%len(simSpinnerFrames)] - fmt.Fprintf(&b, "\n %s Loading scenario groups...\n", cyanStyle.Render(spinner)) - b.WriteString(dimStyle.Render("\n ESC cancel")) - - case savePhaseError: - fmt.Fprintf(&b, "\n %s %s\n", redStyle.Render("✗"), redStyle.Render(s.err.Error())) - b.WriteString(dimStyle.Render("\n r retry · ESC back")) - - case savePhaseList: - b.WriteString("\n") - for i, g := range s.groups { - label := g.Label - if i == s.cursor { - fmt.Fprintf(&b, " %s %s\n", saveSelectedStyle.Render(">"), saveSelectedStyle.Render(label)) - } else { - fmt.Fprintf(&b, " %s\n", label) - } - } - // "+ New Group..." option - newLabel := "+ New Group..." - if s.cursor == len(s.groups) { - fmt.Fprintf(&b, " %s %s\n", saveNewGroupStyle.Render(">"), saveNewGroupStyle.Render(newLabel)) - } else { - fmt.Fprintf(&b, " %s\n", saveNewGroupStyle.Render(newLabel)) - } - b.WriteString(dimStyle.Render("\n ↑↓ navigate · ENTER select · ESC back")) - - case savePhaseNewGroup: - fmt.Fprintf(&b, "\n Group name: %s%s\n", s.groupInput, cyanStyle.Render("│")) - b.WriteString(dimStyle.Render("\n ENTER create · ESC cancel")) - - case savePhaseSaving: - spinner := simSpinnerFrames[s.spinnerIdx%len(simSpinnerFrames)] - fmt.Fprintf(&b, "\n %s Saving scenario...\n", cyanStyle.Render(spinner)) - - case savePhaseSuccess: - fmt.Fprintf(&b, "\n %s Saved to %s\n", greenStyle.Render("✓"), boldStyle.Render("\""+s.successMsg+"\"")) - } - - return "\n" + saveBoxStyle.Width(boxWidth).Render(b.String()) + "\n" -} diff --git a/go.sum b/go.sum index 020a0a62..a1004c06 100644 --- a/go.sum +++ b/go.sum @@ -361,8 +361,6 @@ github.com/livekit/protocol v1.46.7-0.20260608020211-e9abadf97706 h1:MVujVVdveJa github.com/livekit/protocol v1.46.7-0.20260608020211-e9abadf97706/go.mod h1:jO+y05AU9Ec4JswDyuzKCZ4bhziOS0CzMqgnbj60Dzs= github.com/livekit/psrpc v0.7.2 h1:6oZ+NODJ2pLyaT6VqDq1F4Qc/3TpDUSpyphj/P9MhQc= github.com/livekit/psrpc v0.7.2/go.mod h1:rAI+m2+/cb4x9RXhLRtUx5ZwdfjjXOl4zi46IjEetaw= -github.com/livekit/server-sdk-go/v2 v2.16.7-0.20260605213610-c2a481bfe315 h1:fgegcgTXkFca26CqCd/L3HbyL9wEoEpHCroOB1fMncQ= -github.com/livekit/server-sdk-go/v2 v2.16.7-0.20260605213610-c2a481bfe315/go.mod h1:08dp12zeUIsiAHXq1CS/umM7wMBa/FXDUezV8n8a2K8= github.com/livekit/server-sdk-go/v2 v2.16.7-0.20260608025623-a5da15b13baa h1:B19yilP7+JjekKMD0WejMh1Kvypdxpr5yxQZiFStRD0= github.com/livekit/server-sdk-go/v2 v2.16.7-0.20260608025623-a5da15b13baa/go.mod h1:SWJD68Rfcwrhze09EYaRiur7ESCBuu0u4fpK+0BGEYo= github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4= diff --git a/version.go b/version.go index 893b8541..0be50891 100644 --- a/version.go +++ b/version.go @@ -15,5 +15,5 @@ package livekitcli const ( - Version = "2.16.4" + Version = "2.16.5" ) From d5a3761659d53500274e2da5b40d3cf6ffe37040 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Tue, 9 Jun 2026 10:08:22 -0600 Subject: [PATCH 11/11] chore(lk): regen fish completions --- autocomplete/fish_autocomplete | 51 ++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/autocomplete/fish_autocomplete b/autocomplete/fish_autocomplete index 724fa552..c3a4f71c 100644 --- a/autocomplete/fish_autocomplete +++ b/autocomplete/fish_autocomplete @@ -53,7 +53,7 @@ complete -x -c lk -n '__fish_seen_subcommand_from app; and __fish_seen_subcomman complete -x -c lk -n '__fish_seen_subcommand_from app; and not __fish_seen_subcommand_from create list-templates install run env help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_lk_no_subcommand' -a 'agent' -d 'Manage LiveKit Cloud Agents' complete -c lk -n '__fish_seen_subcommand_from agent a' -f -l help -s h -d 'show help' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'init' -d 'Initialize a new LiveKit Cloud agent project' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'init' -d 'Initialize a new LiveKit Cloud agent project' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init' -f -l region -r -d 'Region to deploy the agent to. If unset, will deploy to the nearest region.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init' -f -l install -d 'Run installation after creating the application' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init' -f -l help -s h -d 'show help' @@ -61,7 +61,7 @@ complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcomma complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init' -f -l template -r -d '`TEMPLATE` to instantiate, see https://github.com/livekit-examples' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init' -f -l template-url -r -d '`URL` to instantiate, must contain a taskfile.yaml' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from init; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'create' -d 'Create a new LiveKit Cloud Agent' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'create' -d 'Create a new LiveKit Cloud Agent' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' @@ -71,15 +71,15 @@ complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcomma complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l image-tar -r -d 'Pre-built image from an OCI tar file (e.g. ./image.tar). No Docker daemon required.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from create; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'dockerfile' -d 'Generate Dockerfile and .dockerignore for your project' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'dockerfile' -d 'Generate Dockerfile and .dockerignore for your project' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile' -f -l overwrite -d 'Overwrite existing Dockerfile and/or .dockerignore if they exist' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dockerfile; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'config' -d 'Creates a livekit.toml in the working directory for an existing agent.' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'config' -d 'Creates a livekit.toml in the working directory for an existing agent.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from config' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from config' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from config; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'deploy' -d 'Deploy a new version of the agent' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'deploy' -d 'Deploy a new version of the agent' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' @@ -89,48 +89,48 @@ complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcomma complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l image-tar -r -d 'Pre-built image from an OCI tar file (e.g. ./image.tar). No Docker daemon required.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from deploy; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'status' -d 'Get the status of an agent' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'status' -d 'Get the status of an agent' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from status' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from status' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from status; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'update' -d 'Update an agent metadata and secrets. This will restart the agent.' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'update' -d 'Update an agent metadata and secrets. This will restart the agent.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l ignore-empty-secrets -d 'If set, will skip environment variables with empty values from secrets files instead of failing' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'restart' -d 'Restart an agent' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'restart' -d 'Restart an agent' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from restart' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from restart' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from restart; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'rollback' -d 'Rollback an agent to a previous version' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'rollback' -d 'Rollback an agent to a previous version' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from rollback' -f -l version -r -d 'Version to rollback to, defaults to most recent previous to current.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from rollback' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from rollback' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from rollback; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'logs' -d 'Tail logs from agent' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'logs' -d 'Tail logs from agent' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail' -f -l log-type -r -d 'Type of logs to retrieve. Valid values are \'deploy\' and \'build\'' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from logs tail; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'delete' -d 'Delete an agent' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'delete' -d 'Delete an agent' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from delete destroy' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from delete destroy' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from delete destroy; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'versions' -d 'List versions of an agent' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'versions' -d 'List versions of an agent' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from versions' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from versions' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from versions; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'list' -d 'List all LiveKit Cloud Agents' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'list' -d 'List all LiveKit Cloud Agents' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from list' -f -l id -r -d '`IDs` of agent(s)' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'secrets' -d 'List secrets for an agent' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'secrets' -d 'List secrets for an agent' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from secrets' -f -l id -r -d '`ID` of the agent. If unset, and the livekit.toml file is present, will use the id found there.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from secrets' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from secrets; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'update-secrets' -d 'Update secrets for an agent, will cause a re-start of the agent.' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'update-secrets' -d 'Update secrets for an agent, will cause a re-start of the agent.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l secrets -r -d 'KEY=VALUE comma separated secrets. These will be injected as environment variables into the agent. These take precedence over secrets-file.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -l secrets-file -r -d '`FILE` containing secret KEY=VALUE pairs, one per line. These will be injected as environment variables into the agent.' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l secret-mount -r -d 'Local path to a secret file to be mounted on agent environment' @@ -139,7 +139,7 @@ complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcomma complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l overwrite -d 'If set, will overwrite existing secrets' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from update-secrets; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'private-link' -d 'Manage private links for agents' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'private-link' -d 'Manage private links for agents' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and not __fish_seen_subcommand_from create list delete health-status help h' -a 'create' -d 'Create a private link' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from create' -f -l name -r -d 'Private link name' @@ -165,16 +165,16 @@ complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcomma complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from health-status' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and __fish_seen_subcommand_from health-status; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from private-link; and not __fish_seen_subcommand_from create list delete health-status help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'start' -d 'Run an agent in production mode' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'start' -d 'Run an agent in production mode' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from start' -f -l log-level -r -d 'Log level (TRACE, DEBUG, INFO, WARN, ERROR)' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from start' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from start; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'dev' -d 'Run an agent in development mode with auto-reload' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'dev' -d 'Run an agent in development mode with auto-reload' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dev' -f -l log-level -r -d 'Log level (TRACE, DEBUG, INFO, WARN, ERROR)' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dev' -f -l no-reload -d 'Disable auto-reload on file changes' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dev' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from dev; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'console' -d 'Voice chat with an agent via mic/speakers' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'console' -d 'Voice chat with an agent via mic/speakers' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l port -s p -r -d 'TCP port for agent communication' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l input-device -r -d 'Input device index or name substring' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l output-device -r -d 'Output device index or name substring' @@ -184,14 +184,17 @@ complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcomma complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l record -d 'Record audio and session report to console-recordings/' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'simulate' -d 'Run agent simulations against LiveKit Cloud' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'simulate' -d 'Run agent simulations against LiveKit Cloud' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l num-simulations -s n -r -d 'Number of scenarios to generate' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l description -r -d 'Agent description for scenario generation' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l scenario-group-id -r -d 'Use a pre-configured scenario group' -complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l config -r -d 'Path to simulation config `FILE`' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l scenarios -r -d 'Path to a scenarios `FILE` (yaml). If omitted, scenarios are generated from the agent\'s source' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l yes -s y -d 'Skip the source-upload confirmation prompt (required for non-interactive runs that generate from source)' complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' -complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'export-scenarios' -d 'Export a simulation run\'s scenarios to a scenarios.yaml' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from export-scenarios' -f -l output -s o -r -d 'Write to `FILE` instead of stdout' +complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from export-scenarios' -f -l help -s h -d 'show help' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from export-scenarios; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' +complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console simulate export-scenarios help h' -a 'help' -d 'Shows a list of commands or help for one command' complete -x -c lk -n '__fish_lk_no_subcommand' -a 'cloud' -d 'Interact with LiveKit Cloud services' complete -c lk -n '__fish_seen_subcommand_from cloud' -f -l help -s h -d 'show help' complete -x -c lk -n '__fish_seen_subcommand_from cloud; and not __fish_seen_subcommand_from auth help h' -a 'auth' -d 'Authenticate LiveKit Cloud account to link your projects'