refactor: Start the desktop and SSH remote hubs through the bundled Cline CLI (#14792)

* Let hosts choose the hub daemon launcher and defer spawn-only setup

Adds setHubDaemonLauncher so an embedding process can start the hub
daemon through a bundled Cline CLI instead of its own executable, and a
beforeSpawn hook on ensureDetachedHubServer that only runs when a new
daemon is actually started.

* Add programmatic options to cline hub ensure

hub ensure/start gain --json (URL + auth token), --allow-port-fallback,
--no-connectors and --login-shell-path, and the hub command accepts
--discovery-path for a dedicated discovery record. These let the desktop
app and SSH remotes start or reuse a hub through the CLI.

Also extracts the standalone binary compile step into
script/compile-binary.ts so other packages can build the CLI binary.

* Run SSH remote hubs through the Cline CLI

SSH remotes now upload the Cline CLI binary and start or reuse the remote
hub with 'cline hub ensure --json --discovery-path ...', stopping it with
'cline hub stop'. The dedicated remote helper entrypoint is removed;
cleanup records from older releases still stop through the old flag.

* Run the desktop backend on the bundled Cline CLI

The desktop app no longer compiles its own executable. It bundles the
self-contained Cline CLI (externalBin cline-cli) plus the backend as a JS
bundle that runs on the CLI's embedded runtime. At startup the backend has
the CLI run 'hub ensure', which reuses a compatible healthy Hub or starts
one, and any Hub it starts later also goes through the CLI binary. Linux
CLI copies are bundled for SSH remotes.

* Launch the desktop backend through the bundled Cline CLI

The Tauri shell resolves the bundled cline-cli and the backend bundle
(per-platform resource layouts) and starts 'cline-cli run' on it. The
Windows installer stops users of cline-cli.exe, and also stops and removes
the backend executable of earlier releases on upgrade.

* Recognize the CLI-hosted desktop backend in cline doctor --fix

* Update desktop publish workflow and docs for the bundled Cline CLI

Telemetry selfchecks and smoke tests run the backend bundle on the
bundled CLI, and the Windows signature gate verifies cline-cli.exe.

* fix(desktop): address runtime packaging review findings

* fix(desktop): preserve failed hub cleanup and handle exited daemons

* fix(hub): distinguish missing discovery records from read failures

* fix(hub): preserve discovery recovery while enforcing strict shutdown reads

* fix(cli): do not count hub commands as CLI activations (#14870)

* fix(cli): do not count hub commands as CLI activations

The desktop app runs `cline-cli hub ensure` on every launch and the SSH
remote flow runs `cline hub ensure` on every connect. Both went through
runCli(), which captured user.extension_activated unconditionally, so each
desktop launch was double-counted as a CLI activation and every SSH remote
host (with its own distinct id) showed up as a new CLI user.

Skip the activation capture for the hub subcommand; it is plumbing other
clients invoke, not a user activation. Hub-owned task telemetry is
unaffected since the daemon path never enters runCli().

* test(cli): clear the hub command mock between main.test.ts cases

* test(cli): stop stubbing the hub command module in main.test.ts

The module-wide vi.mock("./commands/hub") replaced createHubCommand with
a no-op, so `cline hub dashboard` (routed through createHubCommand) never
reached the dashboard mock and three dashboard tests failed. Drop the
module mock and assert the activation exclusion through
`hub dashboard --no-open`, which is already mocked.

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
This commit is contained in:
Bee
2026-10-13 21:58:41 -07:00
committed by GitHub
co-authored by Saoud Rizwan
parent 1932d5dc37
commit 83ea9a41d1
52 changed files with 1915 additions and 1145 deletions
+127 -103
View File
@@ -335,12 +335,12 @@ jobs:
run: bunx tauri build --target universal-apple-darwin $CONFIG_ARGS
env:
CONFIG_ARGS: ${{ needs.validate.outputs.channel == 'nightly' && '--config src-tauri/tauri.release.conf.json --config src-tauri/tauri.nightly.conf.json' || needs.validate.outputs.channel == 'beta' && '--config src-tauri/tauri.release.conf.json --config src-tauri/tauri.beta.conf.json' || '--config src-tauri/tauri.release.conf.json' }}
# Telemetry config for the sidecar binary. Tauri's beforeBuildCommand
# (`bun run build` -> build:sidecar:bin) compiles the sidecar during
# this step and inlines these values into the binary via `--define`
# (scripts/telemetry-define-args.ts); a packaged app launched from
# Finder/the Dock has no runtime env, so build-time inlining is the
# only way the shipped sidecar can ever report telemetry.
# Telemetry config for the desktop backend and bundled Cline CLI.
# Tauri's beforeBuildCommand (`bun run build` -> build:runtime)
# builds both during this step and inlines these values via
# `--define` (scripts/telemetry-define-args.ts); a packaged app
# launched from Finder/the Dock has no runtime env, so build-time
# inlining is the only way the shipped backend can report telemetry.
TELEMETRY_SERVICE_API_KEY: ${{ secrets.TELEMETRY_SERVICE_API_KEY }}
ERROR_SERVICE_API_KEY: ${{ secrets.ERROR_SERVICE_API_KEY }}
OTEL_TELEMETRY_ENABLED: ${{ secrets.OTEL_TELEMETRY_ENABLED }}
@@ -368,10 +368,11 @@ jobs:
# bare DMG. macOS runners have a GUI session, so opt out of the skip.
TAURI_BUNDLER_DMG_IGNORE_CI: "true"
# Tauri lipos the main binary itself but sidecars are merged by our own
# build-sidecar-bin.ts, so assert every Mach-O in the bundle really
# carries both slices before anything is published. A single-arch
# sidecar would otherwise ship fine and only crash on the other arch.
# Tauri lipos the main binary itself but the bundled Cline CLI is merged
# by our own build-desktop-runtime.ts, so assert every Mach-O in the
# bundle really carries both slices before anything is published. A
# single-arch CLI would otherwise ship fine and only crash on the other
# arch.
- name: Verify bundle is a universal binary
working-directory: apps/examples/desktop-app
env:
@@ -450,49 +451,57 @@ jobs:
echo "Updater endpoint verified: ${WANT:-disabled}"
# Guardrail: assert the telemetry config actually made it into the
# compiled sidecar. Missing env on the build step (or a regression in
# bundled desktop backend. Missing env on the build step (or a regression in
# the --define inlining) would otherwise ship a release with telemetry
# silently disabled — exactly what happened for every release before
# this check existed. Being enabled is not enough on its own: an empty,
# malformed, or non-http(s) OTLP endpoint would still drop every event
# at runtime (the SDK exporters speak OTLP http/json only), so the
# selfcheck must also report a usable endpoint host.
- name: Verify sidecar telemetry config was inlined
- name: Verify CLI and desktop backend telemetry configs were inlined
working-directory: apps/examples/desktop-app
run: |
SELFCHECK=$(./src-tauri/bin/code-sidecar-universal-apple-darwin --telemetry-selfcheck)
echo "$SELFCHECK"
if ! printf '%s' "$SELFCHECK" | grep -q '"enabled":true'; then
echo "Packaged sidecar reports telemetry disabled."
echo "Check the OTEL_* / TELEMETRY_SERVICE_API_KEY env on the"
echo "'Build, sign, and notarize desktop bundle' step and the"
echo "--define inlining in scripts/build-sidecar-bin.ts."
exit 1
fi
if printf '%s' "$SELFCHECK" | grep -Eq '"otlp_endpoint_host":"(invalid-endpoint-url)?"'; then
echo "Packaged sidecar reports telemetry enabled but its OTLP"
echo "endpoint is missing, unparseable, or not an http(s) URL, so"
echo "every event would be dropped at runtime. Check the"
echo "OTEL_EXPORTER_OTLP_ENDPOINT secret."
exit 1
fi
for COMPONENT in cli backend; do
if [ "$COMPONENT" = cli ]; then
SELFCHECK=$(./src-tauri/bin/cline-cli-universal-apple-darwin --telemetry-selfcheck)
else
SELFCHECK=$(BUN_BE_BUN=1 ./src-tauri/bin/cline-cli-universal-apple-darwin run --no-env-file src-tauri/bin/desktop-backend/index.js --telemetry-selfcheck)
fi
echo "$SELFCHECK"
if ! printf '%s' "$SELFCHECK" | grep -q '"enabled":true'; then
echo "Packaged $COMPONENT reports telemetry disabled."
echo "Check the OTEL_* / TELEMETRY_SERVICE_API_KEY env on the"
echo "'Build, sign, and notarize desktop bundle' step and the"
echo "--define inlining in scripts/build-desktop-runtime.ts."
exit 1
fi
if printf '%s' "$SELFCHECK" | grep -Eq '"otlp_endpoint_host":"(invalid-endpoint-url)?"'; then
echo "Packaged $COMPONENT reports telemetry enabled but its OTLP"
echo "endpoint is missing, unparseable, or not an http(s) URL, so"
echo "every event would be dropped at runtime. Check the"
echo "OTEL_EXPORTER_OTLP_ENDPOINT secret."
exit 1
fi
done
# Boot the sidecar that will actually ship — built with the production
# --target, --minify and telemetry defines, on the OS it will run on —
# against an isolated Hub, and require its ready line plus a healthy
# /health. Desktop 0.0.31 shipped a sidecar whose Hub daemon loaded a
# Boot the Cline CLI and desktop backend that will actually ship — built
# with the production --target, --minify and telemetry defines, on the
# OS they will run on — against an isolated Hub started by
# `cline hub ensure`, and require the backend's ready line plus a
# healthy /health. Desktop 0.0.31 shipped a backend whose Hub daemon loaded a
# second copy of @cline/core with a different build id, so the app
# retired its own Hub on every launch and never got past "backend
# unavailable". PR CI runs this same test on ubuntu against a plain
# `bun build --compile`, which catches that resolution class but not a
# build from source, which catches that resolution class but not a
# break specific to the shipped flags or platform; this is the
# release-time half. The test isolates CLINE_DIR and the Hub discovery
# path, so it cannot reach anything else on the runner. Telemetry is
# inlined into the binary, so expect one activation event per publish.
- name: Smoke-test the packaged sidecar against an isolated Hub
# inlined into the backend, so expect one activation event per publish.
- name: Smoke-test the packaged desktop runtime against an isolated Hub
working-directory: apps/examples/desktop-app
env:
CLINE_TEST_SIDECAR_BIN: src-tauri/bin/code-sidecar-universal-apple-darwin
CLINE_TEST_DESKTOP_CLI_BIN: src-tauri/bin/cline-cli-universal-apple-darwin
CLINE_TEST_DESKTOP_BACKEND_BUNDLE: src-tauri/bin/desktop-backend/index.js
run: bun test scripts/desktop-startup.test.ts
- name: Collect artifacts
@@ -615,7 +624,7 @@ jobs:
with:
bun-version: "1.4.2"
# build-sidecar-bin.ts cross-compiles the Linux SSH remote helpers on
# build-desktop-runtime.ts cross-compiles the Linux SSH remote CLIs on
# every platform, and the Windows installer ships them (they are Tauri
# resources, bundle.resources in tauri.conf.json). Bun cross-compiles by
# downloading the target's release zip and extracting the executable
@@ -627,13 +636,13 @@ jobs:
# with the same runtimes from npm (@oven/bun-<target>, byte-identical to
# the zip payload) and the build never enters the broken path. The macOS
# job does not need this; the extractor works there.
- name: Seed Bun cache with Linux remote-helper runtimes
- name: Seed Bun cache with Linux remote CLI runtimes
shell: bash
run: |
BUN_VERSION="$(bun --version)"
CACHE_DIR="${RUNNER_TEMP//\\//}/bun-install-cache"
mkdir -p "$CACHE_DIR"
# Keep these runtimes aligned with build-sidecar-bin.ts, including
# Keep these runtimes aligned with build-desktop-runtime.ts, including
# the baseline x64 runtime needed by SSH hosts without AVX2.
for target in linux-x64-baseline linux-aarch64; do
dest="$CACHE_DIR/bun-$target-v$BUN_VERSION"
@@ -697,7 +706,7 @@ jobs:
- name: Prime Azure Trusted Signing token
run: az account get-access-token --resource https://codesigning.azure.net --query expiresOn --output tsv
# Tauri invokes signCommand once per staged binary (main exe, sidecar,
# Tauri invokes signCommand once per staged binary (main exe, Cline CLI,
# NSIS uninstaller, and the installer itself). The overlay is generated
# here rather than committed because signCommand needs an absolute path
# to the signing script on this runner.
@@ -728,7 +737,7 @@ jobs:
run: bunx tauri build --bundles nsis $CONFIG_ARGS --config "$SIGN_CONF"
env:
CONFIG_ARGS: ${{ needs.validate.outputs.channel == 'nightly' && '--config src-tauri/tauri.release.conf.json --config src-tauri/tauri.nightly.conf.json' || needs.validate.outputs.channel == 'beta' && '--config src-tauri/tauri.release.conf.json --config src-tauri/tauri.beta.conf.json' || '--config src-tauri/tauri.release.conf.json' }}
# Telemetry inlined into the sidecar at compile time, same as macOS.
# Telemetry inlined into the desktop backend at build time, same as macOS.
TELEMETRY_SERVICE_API_KEY: ${{ secrets.TELEMETRY_SERVICE_API_KEY }}
ERROR_SERVICE_API_KEY: ${{ secrets.ERROR_SERVICE_API_KEY }}
OTEL_TELEMETRY_ENABLED: ${{ secrets.OTEL_TELEMETRY_ENABLED }}
@@ -794,33 +803,40 @@ jobs:
fi
echo "Updater endpoint verified: ${WANT:-disabled}"
# Same guardrail as the macOS job, run natively on the Windows sidecar.
- name: Verify sidecar telemetry config was inlined
# Same guardrail as the macOS job, run natively on the Windows build.
- name: Verify CLI and desktop backend telemetry configs were inlined
shell: bash
working-directory: apps/examples/desktop-app
run: |
SELFCHECK=$(./src-tauri/bin/code-sidecar-x86_64-pc-windows-msvc.exe --telemetry-selfcheck)
echo "$SELFCHECK"
if ! printf '%s' "$SELFCHECK" | grep -q '"enabled":true'; then
echo "Packaged sidecar reports telemetry disabled."
echo "Check the OTEL_* / TELEMETRY_SERVICE_API_KEY env on the"
echo "'Build and sign desktop bundle' step and the --define"
echo "inlining in scripts/build-sidecar-bin.ts."
exit 1
fi
if printf '%s' "$SELFCHECK" | grep -Eq '"otlp_endpoint_host":"(invalid-endpoint-url)?"'; then
echo "Packaged sidecar reports telemetry enabled but its OTLP"
echo "endpoint is missing, unparseable, or not an http(s) URL."
echo "Check the OTEL_EXPORTER_OTLP_ENDPOINT secret."
exit 1
fi
for COMPONENT in cli backend; do
if [ "$COMPONENT" = cli ]; then
SELFCHECK=$(./src-tauri/bin/cline-cli-x86_64-pc-windows-msvc.exe --telemetry-selfcheck)
else
SELFCHECK=$(BUN_BE_BUN=1 ./src-tauri/bin/cline-cli-x86_64-pc-windows-msvc.exe run --no-env-file src-tauri/bin/desktop-backend/index.js --telemetry-selfcheck)
fi
echo "$SELFCHECK"
if ! printf '%s' "$SELFCHECK" | grep -q '"enabled":true'; then
echo "Packaged $COMPONENT reports telemetry disabled."
echo "Check the OTEL_* / TELEMETRY_SERVICE_API_KEY env on the"
echo "'Build and sign desktop bundle' step and the --define"
echo "inlining in scripts/build-desktop-runtime.ts."
exit 1
fi
if printf '%s' "$SELFCHECK" | grep -Eq '"otlp_endpoint_host":"(invalid-endpoint-url)?"'; then
echo "Packaged $COMPONENT reports telemetry enabled but its OTLP"
echo "endpoint is missing, unparseable, or not an http(s) URL."
echo "Check the OTEL_EXPORTER_OTLP_ENDPOINT secret."
exit 1
fi
done
# Same release-time gate as the macOS job; see the comment there.
- name: Smoke-test the packaged sidecar against an isolated Hub
- name: Smoke-test the packaged desktop runtime against an isolated Hub
shell: bash
working-directory: apps/examples/desktop-app
env:
CLINE_TEST_SIDECAR_BIN: src-tauri/bin/code-sidecar-x86_64-pc-windows-msvc.exe
CLINE_TEST_DESKTOP_CLI_BIN: src-tauri/bin/cline-cli-x86_64-pc-windows-msvc.exe
CLINE_TEST_DESKTOP_BACKEND_BUNDLE: src-tauri/bin/desktop-backend/index.js
run: bun test scripts/desktop-startup.test.ts
- name: Collect artifacts
@@ -860,11 +876,11 @@ jobs:
shell: pwsh
working-directory: apps/examples/desktop-app
run: |
# The Tauri bundler signs the sidecar in place, so check it here too;
# a WDAC-locked machine blocks the app at runtime if the sidecar it
# spawns is unsigned, even when the installer itself is fine.
$files = @(Get-ChildItem dist/publish/*.exe) + @(Get-Item src-tauri/bin/code-sidecar-x86_64-pc-windows-msvc.exe)
if ($files.Count -lt 2) { throw "expected at least the installer and the sidecar to verify" }
# The Tauri bundler signs the bundled Cline CLI in place, so check it
# here too; a WDAC-locked machine blocks the app at runtime if the
# CLI it spawns is unsigned, even when the installer itself is fine.
$files = @(Get-ChildItem dist/publish/*.exe) + @(Get-Item src-tauri/bin/cline-cli-x86_64-pc-windows-msvc.exe)
if ($files.Count -lt 2) { throw "expected at least the installer and the Cline CLI to verify" }
foreach ($file in $files) {
$sig = Get-AuthenticodeSignature $file.FullName
if ($sig.Status -ne "Valid") {
@@ -900,7 +916,7 @@ jobs:
rpm_arch: x86_64
# Native arm64 runner rather than cross-compiling: WebKitGTK and the
# other GTK build deps have no usable cross toolchain in apt, and a
# native build lets the sidecar smoke test below run the real binary.
# native build lets the runtime smoke test below run the real binary.
- arch: arm64
runner: ubuntu-22.04-arm
target: aarch64-unknown-linux-gnu
@@ -999,13 +1015,13 @@ jobs:
- name: Build desktop bundles
working-directory: apps/examples/desktop-app
# deb and rpm only. The AppImage target is excluded because linuxdeploy
# cannot process the Bun-compiled sidecar (ldd fails on it and patchelf
# cannot process the Bun-compiled Cline CLI (ldd fails on it and patchelf
# corrupts it), which aborts the bundle step. $CONFIG_ARGS is
# deliberately unquoted: it must word-split into separate flags.
run: bunx tauri build --bundles deb,rpm $CONFIG_ARGS
env:
CONFIG_ARGS: ${{ needs.validate.outputs.channel == 'nightly' && '--config src-tauri/tauri.release.conf.json --config src-tauri/tauri.nightly.conf.json' || needs.validate.outputs.channel == 'beta' && '--config src-tauri/tauri.release.conf.json --config src-tauri/tauri.beta.conf.json' || '--config src-tauri/tauri.release.conf.json' }}
# Telemetry inlined into the sidecar at compile time, same as macOS.
# Telemetry inlined into the desktop backend at build time, same as macOS.
TELEMETRY_SERVICE_API_KEY: ${{ secrets.TELEMETRY_SERVICE_API_KEY }}
ERROR_SERVICE_API_KEY: ${{ secrets.ERROR_SERVICE_API_KEY }}
OTEL_TELEMETRY_ENABLED: ${{ secrets.OTEL_TELEMETRY_ENABLED }}
@@ -1057,59 +1073,67 @@ jobs:
fi
echo "Updater endpoint verified: ${WANT:-disabled}"
# Same guardrail as the other build jobs, run on the Linux sidecar.
- name: Verify sidecar telemetry config was inlined
# Same guardrail as the other build jobs, run on the Linux build.
- name: Verify CLI and desktop backend telemetry configs were inlined
working-directory: apps/examples/desktop-app
env:
TARGET: ${{ matrix.target }}
run: |
SELFCHECK=$(./src-tauri/bin/code-sidecar-${TARGET} --telemetry-selfcheck)
echo "$SELFCHECK"
if ! printf '%s' "$SELFCHECK" | grep -q '"enabled":true'; then
echo "Packaged sidecar reports telemetry disabled."
echo "Check the OTEL_* / TELEMETRY_SERVICE_API_KEY env on the"
echo "'Build desktop bundles' step and the --define inlining in"
echo "scripts/build-sidecar-bin.ts."
exit 1
fi
if printf '%s' "$SELFCHECK" | grep -Eq '"otlp_endpoint_host":"(invalid-endpoint-url)?"'; then
echo "Packaged sidecar reports telemetry enabled but its OTLP"
echo "endpoint is missing, unparseable, or not an http(s) URL."
echo "Check the OTEL_EXPORTER_OTLP_ENDPOINT secret."
exit 1
fi
for COMPONENT in cli backend; do
if [ "$COMPONENT" = cli ]; then
SELFCHECK=$(./src-tauri/bin/cline-cli-${TARGET} --telemetry-selfcheck)
else
SELFCHECK=$(BUN_BE_BUN=1 ./src-tauri/bin/cline-cli-${TARGET} run --no-env-file src-tauri/bin/desktop-backend/index.js --telemetry-selfcheck)
fi
echo "$SELFCHECK"
if ! printf '%s' "$SELFCHECK" | grep -q '"enabled":true'; then
echo "Packaged $COMPONENT reports telemetry disabled."
echo "Check the OTEL_* / TELEMETRY_SERVICE_API_KEY env on the"
echo "'Build desktop bundles' step and the --define inlining in"
echo "scripts/build-desktop-runtime.ts."
exit 1
fi
if printf '%s' "$SELFCHECK" | grep -Eq '"otlp_endpoint_host":"(invalid-endpoint-url)?"'; then
echo "Packaged $COMPONENT reports telemetry enabled but its OTLP"
echo "endpoint is missing, unparseable, or not an http(s) URL."
echo "Check the OTEL_EXPORTER_OTLP_ENDPOINT secret."
exit 1
fi
done
# Same release-time gate as the macOS job; see the comment there.
- name: Smoke-test the packaged sidecar against an isolated Hub
- name: Smoke-test the packaged desktop runtime against an isolated Hub
working-directory: apps/examples/desktop-app
env:
CLINE_TEST_SIDECAR_BIN: src-tauri/bin/code-sidecar-${{ matrix.target }}
CLINE_TEST_DESKTOP_CLI_BIN: src-tauri/bin/cline-cli-${{ matrix.target }}
CLINE_TEST_DESKTOP_BACKEND_BUNDLE: src-tauri/bin/desktop-backend/index.js
run: bun test scripts/desktop-startup.test.ts
# Run the SSH remote helper this job bundles (same arch as the runner)
# through the exact command the desktop sends over SSH, then stop the
# Hub it started. Desktop 0.0.38 through 0.0.44 shipped helpers that
# printed --help fine but crashed on every --remote-hub-ensure, because
# UPX packing broke the Bun 1.4 runtime's lazy reads of its own payload
# Run the Linux Cline CLI this job bundles for SSH remotes (same arch as
# the runner) through the exact `hub ensure` / `hub stop` the desktop
# sends over SSH. Desktop 0.0.38 through 0.0.44 shipped remote binaries
# that printed --help fine but crashed on every ensure, because UPX
# packing broke the Bun 1.4 runtime's lazy reads of its own payload
# (#14815, #14781); nothing exercised that path before release. Isolated
# CLINE_DIR and discovery record, as in the sidecar test above. Only the
# CLINE_DIR and discovery record, as in the runtime test above. Only the
# exit status is checked; the ensure output carries the Hub auth token.
- name: Smoke-test the bundled SSH remote helper
- name: Smoke-test the bundled SSH remote CLI
working-directory: apps/examples/desktop-app
env:
HELPER: src-tauri/bin/remote-helpers/cline-remote-helper-${{ matrix.target }}
REMOTE_CLI: src-tauri/bin/remote-helpers/cline-${{ matrix.target }}
run: |
export CLINE_DIR="$(mktemp -d)"
export CLINE_DATA_DIR="$CLINE_DIR/data"
export CLINE_NO_AUTO_UPDATE=1
DISCOVERY="$CLINE_DIR/remote-hub.json"
trap 'timeout 30 "$HELPER" --remote-hub-stop --discovery-path "$DISCOVERY" >/dev/null 2>&1 || true' EXIT
if ! timeout 60 "$HELPER" --remote-hub-ensure --cwd "$CLINE_DIR" --discovery-path "$DISCOVERY" >/dev/null; then
echo "Bundled remote helper failed --remote-hub-ensure; SSH remotes"
echo "would not start from this build. Check scripts/build-sidecar-bin.ts."
trap 'timeout 30 "$REMOTE_CLI" hub stop --discovery-path "$DISCOVERY" >/dev/null 2>&1 || true' EXIT
if ! timeout 60 "$REMOTE_CLI" hub ensure --json --allow-port-fallback --no-connectors --cwd "$CLINE_DIR" --host 127.0.0.1 --port 0 --pathname /hub --discovery-path "$DISCOVERY" >/dev/null; then
echo "Bundled remote CLI failed hub ensure; SSH remotes would not"
echo "start from this build. Check scripts/build-desktop-runtime.ts."
exit 1
fi
timeout 30 "$HELPER" --remote-hub-stop --discovery-path "$DISCOVERY"
echo "Remote helper started and stopped an isolated Hub."
timeout 30 "$REMOTE_CLI" hub stop --discovery-path "$DISCOVERY"
echo "Remote CLI started and stopped an isolated Hub."
- name: Collect artifacts
working-directory: apps/examples/desktop-app
@@ -1373,7 +1397,7 @@ jobs:
# Nightlies have no changelog, so the announcement lists the commits
# since the nearest desktop tag - the previous nightly or the last
# release, whichever is closer - scoped to what ships in the app
# (the sidecar bundles sdk/packages). Runs before this build is
# (the app bundles sdk/packages and the Cline CLI). Runs before this build is
# tagged below so it never compares against itself.
STAMP=${VERSION#*-nightly.}
TAG="desktop-nightly-${STAMP%%.*}"
@@ -1385,7 +1409,7 @@ jobs:
if [ -z "$PREV_TAG" ]; then
BODY="No previous nightly or desktop release tag found to compare against."
else
COMMITS=$(git log "${PREV_TAG}..HEAD" --no-merges --format='%s' -- apps/examples/desktop-app sdk/packages .github/workflows/desktop-publish.yml)
COMMITS=$(git log "${PREV_TAG}..HEAD" --no-merges --format='%s' -- apps/examples/desktop-app apps/cli sdk/packages .github/workflows/desktop-publish.yml)
TOTAL=$(printf "%s" "$COMMITS" | grep -c . || true)
COMPARE="https://github.com/${GITHUB_REPOSITORY}/compare/${PREV_TAG}...$(git rev-parse --short HEAD)"
if [ "$TOTAL" -eq 0 ]; then
+2 -2
View File
@@ -58,7 +58,7 @@ jobs:
run: bun run test:dmg-background
windows-installer:
name: Test x86 installer against x64 sidecars
name: Test x86 installer against x64 app executables
runs-on: windows-latest
timeout-minutes: 10
defaults:
@@ -78,7 +78,7 @@ jobs:
no-cache: true
# Use the same NSIS distribution as the locked Tauri CLI. No workspace
# install or full desktop build: the test compiles a disposable sidecar.
# install or full desktop build: the test compiles a disposable fixture executable.
# The test asserts makensis reports NSIS_VERSION and that bun.lock still
# resolves TAURI_CLI_VERSION, so changing this download or bumping the
# CLI without updating windows-installer.test.ts fails the job.