Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

feat(release): ship stable direct downloads (#92)

Leoc59144349909
diff --git a/.depot/workflows/release-smoke.yml b/.depot/workflows/release-smoke.yml
new file mode 100644
index 000000000..f18024410
--- /dev/null
+++ b/.depot/workflows/release-smoke.yml
@@ -0,0 +1,280 @@
+# Depot CI builds smoke artifacts. It does not publish or release them.
+
+name: Release artifact smoke
+
+on:
+ workflow_dispatch:
+ inputs:
+ version:
+ description: Version used for the smoke artifacts
+ required: true
+ default: 0.0.0-smoke.0
+ type: string
+
+permissions:
+ contents: read
+
+concurrency:
+ group: release-smoke-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ release_smoke:
+ name: Release configuration
+ runs-on: depot-ubuntu-24.04-8
+ timeout-minutes: 15
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+
+ - name: Setup Vite+
+ uses: voidzero-dev/setup-vp@v1
+ with:
+ node-version-file: package.json
+ cache: true
+ run-install: true
+
+ - name: Check public dependencies
+ run: vp run check:public-dependencies
+
+ - name: Run release smoke
+ run: vp run release:smoke
+
+ desktop:
+ name: ${{ matrix.label }}
+ needs: release_smoke
+ runs-on: ${{ matrix.runner }}
+ timeout-minutes: 45
+ env:
+ RELEASE_VERSION: ${{ inputs.version }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - label: macOS arm64 DMG
+ runner: depot-macos-15
+ platform: mac
+ target: dmg
+ arch: arm64
+ extension: dmg
+ rust_target: aarch64-apple-darwin
+ - label: Windows x64 NSIS
+ runner: depot-windows-2025-8
+ platform: win
+ target: nsis
+ arch: x64
+ extension: exe
+ rust_target: x86_64-pc-windows-msvc
+ - label: Linux x64 AppImage
+ runner: depot-ubuntu-24.04-8
+ platform: linux
+ target: AppImage
+ arch: x64
+ extension: AppImage
+ rust_target: x86_64-unknown-linux-gnu
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+
+ - name: Setup Vite+
+ uses: voidzero-dev/setup-vp@v1
+ with:
+ node-version-file: package.json
+ cache: ${{ matrix.platform != 'win' }}
+ run-install: false
+
+ - name: Install desktop dependencies
+ run: vp install --frozen-lockfile --filter=@t3tools/desktop... --filter=akeru-bot... --filter=@t3tools/scripts...
+
+ - name: Setup Rust
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ targets: ${{ matrix.rust_target }}
+
+ - name: Install ImageMagick
+ if: matrix.platform == 'linux'
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y imagemagick
+
+ - name: Import macOS signing certificate
+ if: matrix.platform == 'mac'
+ uses: apple-actions/import-codesign-certs@5142e029c445c10ffc7149d172e540235a065466 # v7.0.0
+ with:
+ p12-file-base64: ${{ secrets.MACOS_CERTIFICATE_P12 }}
+ p12-password: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
+
+ - name: Configure App Store Connect API key
+ if: matrix.platform == 'mac'
+ shell: bash
+ env:
+ APPSTORE_API_KEY_P8: ${{ secrets.APPSTORE_API_KEY_P8 }}
+ APPSTORE_API_KEY_ID: ${{ secrets.APPSTORE_API_KEY_ID }}
+ APPSTORE_ISSUER_ID: ${{ secrets.APPSTORE_ISSUER_ID }}
+ MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }}
+ run: |
+ for variable in \
+ APPSTORE_API_KEY_P8 \
+ APPSTORE_API_KEY_ID \
+ APPSTORE_ISSUER_ID \
+ MACOS_SIGNING_IDENTITY; do
+ if test -z "${!variable}"; then
+ printf 'Required GitHub secret is empty: %s\n' "$variable" >&2
+ exit 1
+ fi
+ done
+ case "$MACOS_SIGNING_IDENTITY" in
+ "Developer ID Application:"*) ;;
+ *)
+ printf 'MACOS_SIGNING_IDENTITY must name a Developer ID Application certificate.\n' >&2
+ exit 1
+ ;;
+ esac
+ printf '%s' "$APPSTORE_API_KEY_P8" > "$RUNNER_TEMP/notarytool-api-key.p8"
+ chmod 600 "$RUNNER_TEMP/notarytool-api-key.p8"
+
+ - name: Build signed macOS artifact
+ if: matrix.platform == 'mac'
+ shell: bash
+ env:
+ APPLE_API_KEY: ${{ runner.temp }}/notarytool-api-key.p8
+ APPLE_API_KEY_ID: ${{ secrets.APPSTORE_API_KEY_ID }}
+ APPLE_API_ISSUER: ${{ secrets.APPSTORE_ISSUER_ID }}
+ CSC_NAME: ${{ secrets.MACOS_SIGNING_IDENTITY }}
+ run: |
+ node scripts/update-release-package-versions.ts "$RELEASE_VERSION"
+ vp run dist:desktop:artifact \
+ --platform mac \
+ --target dmg \
+ --arch arm64 \
+ --build-version "$RELEASE_VERSION" \
+ --signed \
+ --verbose
+
+ - name: Build unsigned desktop artifact
+ if: matrix.platform != 'mac'
+ shell: bash
+ run: |
+ node scripts/update-release-package-versions.ts "$RELEASE_VERSION"
+ vp run dist:desktop:artifact \
+ --platform "${{ matrix.platform }}" \
+ --target "${{ matrix.target }}" \
+ --arch "${{ matrix.arch }}" \
+ --build-version "$RELEASE_VERSION" \
+ --verbose
+
+ - name: Verify artifact
+ shell: bash
+ run: |
+ shopt -s nullglob
+ artifacts=(release/*.${{ matrix.extension }})
+ if (( ${#artifacts[@]} != 1 )); then
+ printf 'Expected one .${{ matrix.extension }} artifact, found %s.\n' "${#artifacts[@]}" >&2
+ exit 1
+ fi
+
+ - name: Notarize, staple, and verify macOS DMG
+ if: matrix.platform == 'mac'
+ shell: bash
+ env:
+ APPLE_API_KEY: ${{ runner.temp }}/notarytool-api-key.p8
+ APPLE_API_KEY_ID: ${{ secrets.APPSTORE_API_KEY_ID }}
+ APPLE_API_ISSUER: ${{ secrets.APPSTORE_ISSUER_ID }}
+ run: |
+ shopt -s nullglob
+ artifacts=(release/*.dmg)
+ if (( ${#artifacts[@]} != 1 )); then
+ printf 'Expected one DMG artifact, found %s.\n' "${#artifacts[@]}" >&2
+ exit 1
+ fi
+ dmg="${artifacts[0]}"
+
+ # electron-builder already submitted and stapled the signed app.
+ # This submission owns the DMG that contains that app.
+ xcrun notarytool submit "$dmg" \
+ --key "$APPLE_API_KEY" \
+ --key-id "$APPLE_API_KEY_ID" \
+ --issuer "$APPLE_API_ISSUER" \
+ --wait
+ xcrun stapler staple "$dmg"
+ xcrun stapler validate "$dmg"
+ spctl --assess --type open --context context:primary-signature --verbose=2 "$dmg"
+
+ mount_point="$RUNNER_TEMP/akeru-dmg"
+ mkdir -p "$mount_point"
+ hdiutil attach "$dmg" -nobrowse -readonly -mountpoint "$mount_point"
+ cleanup() {
+ hdiutil detach "$mount_point" >/dev/null 2>&1 || true
+ }
+ trap cleanup EXIT
+
+ apps=("$mount_point"/*.app)
+ if (( ${#apps[@]} != 1 )); then
+ printf 'Expected one app in the DMG, found %s.\n' "${#apps[@]}" >&2
+ exit 1
+ fi
+ codesign --verify --deep --strict --verbose=2 "${apps[0]}"
+ xcrun stapler validate "${apps[0]}"
+ spctl --assess --type execute --verbose=2 "${apps[0]}"
+
+ - name: Upload smoke artifact
+ uses: actions/upload-artifact@v7
+ with:
+ name: akeru-bot-${{ matrix.platform }}-${{ matrix.arch }}
+ path: release/*.${{ matrix.extension }}
+ if-no-files-found: error
+ retention-days: 7
+
+ cli:
+ name: CLI package
+ needs: release_smoke
+ runs-on: depot-ubuntu-24.04-8
+ timeout-minutes: 20
+ env:
+ RELEASE_VERSION: ${{ inputs.version }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+
+ - name: Setup Vite+
+ uses: voidzero-dev/setup-vp@v1
+ with:
+ node-version-file: package.json
+ cache: true
+ run-install: |
+ args:
+ - --filter=akeru-bot...
+ - --filter=@t3tools/web...
+ - --filter=@t3tools/scripts...
+
+ - name: Build CLI package
+ run: |
+ node scripts/update-release-package-versions.ts "$RELEASE_VERSION"
+ vp run --filter akeru-bot build
+
+ - name: Dry-run CLI package
+ run: node apps/server/scripts/cli.ts publish --dry-run --app-version "$RELEASE_VERSION" --verbose
+
+ marketing:
+ name: Marketing site
+ needs: release_smoke
+ runs-on: depot-ubuntu-24.04-8
+ timeout-minutes: 15
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+
+ - name: Setup Vite+
+ uses: voidzero-dev/setup-vp@v1
+ with:
+ node-version-file: package.json
+ cache: true
+ run-install: |
+ args:
+ - --filter=@t3tools/marketing...
+
+ - name: Typecheck marketing site
+ run: vp run --filter @t3tools/marketing typecheck
+
+ - name: Build marketing site
+ run: vp run --filter @t3tools/marketing build
diff --git a/.depot/workflows/release.yml b/.depot/workflows/release.yml
index f18024410..4be3a95b7 100644
--- a/.depot/workflows/release.yml
+++ b/.depot/workflows/release.yml
@@ -1,31 +1,58 @@
-# Depot CI builds smoke artifacts. It does not publish or release them.
+# Depot builds every stable asset before the final job creates the tag and release.
-name: Release artifact smoke
+name: Stable release
on:
- workflow_dispatch:
- inputs:
- version:
- description: Version used for the smoke artifacts
- required: true
- default: 0.0.0-smoke.0
- type: string
+ push:
+ branches: [main]
+ paths:
+ - apps/server/package.json
+ - apps/desktop/package.json
+ - apps/web/package.json
+ - packages/contracts/package.json
permissions:
- contents: read
+ contents: write
concurrency:
- group: release-smoke-${{ github.ref }}
- cancel-in-progress: true
+ group: stable-release
+ cancel-in-progress: false
jobs:
- release_smoke:
- name: Release configuration
+ preflight:
+ name: Release preflight
runs-on: depot-ubuntu-24.04-8
timeout-minutes: 15
+ outputs:
+ version: ${{ steps.version.outputs.version }}
+ tag: ${{ steps.version.outputs.tag }}
steps:
- name: Checkout
uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+
+ - name: Read stable version
+ id: version
+ shell: bash
+ run: |
+ version="$(node -p "require('./apps/server/package.json').version")"
+ if ! [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ printf 'Stable release version is invalid: %s\n' "$version" >&2
+ exit 1
+ fi
+ for manifest in apps/desktop/package.json apps/web/package.json packages/contracts/package.json; do
+ actual="$(node -p "require('./$manifest').version")"
+ if test "$actual" != "$version"; then
+ printf '%s has version %s, expected %s.\n' "$manifest" "$actual" "$version" >&2
+ exit 1
+ fi
+ done
+ if git rev-parse --verify --quiet "refs/tags/v$version"; then
+ printf 'Stable tag v%s already exists.\n' "$version" >&2
+ exit 1
+ fi
+ printf 'version=%s\ntag=v%s\n' "$version" "$version" >> "$GITHUB_OUTPUT"
- name: Setup Vite+
uses: voidzero-dev/setup-vp@v1
@@ -34,19 +61,19 @@ jobs:
cache: true
run-install: true
- - name: Check public dependencies
- run: vp run check:public-dependencies
-
- - name: Run release smoke
- run: vp run release:smoke
+ - name: Run release checks
+ run: |
+ vp run check:public-dependencies
+ vp run release:smoke
+ vp test run scripts/verify-release-assets.test.ts
desktop:
name: ${{ matrix.label }}
- needs: release_smoke
+ needs: preflight
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
env:
- RELEASE_VERSION: ${{ inputs.version }}
+ RELEASE_VERSION: ${{ needs.preflight.outputs.version }}
strategy:
fail-fast: false
matrix:
@@ -56,28 +83,25 @@ jobs:
platform: mac
target: dmg
arch: arm64
- extension: dmg
rust_target: aarch64-apple-darwin
- label: Windows x64 NSIS
runner: depot-windows-2025-8
platform: win
target: nsis
arch: x64
- extension: exe
rust_target: x86_64-pc-windows-msvc
- label: Linux x64 AppImage
runner: depot-ubuntu-24.04-8
platform: linux
target: AppImage
arch: x64
- extension: AppImage
rust_target: x86_64-unknown-linux-gnu
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Vite+
- uses: voidzero-dev/setup-vp@v1
+ uses: voidzero-dev/setup-vp@8a7496fd44e8a1b0a88a7459e36213b2fefc1d15 # v1
with:
node-version-file: package.json
cache: ${{ matrix.platform != 'win' }}
@@ -87,7 +111,7 @@ jobs:
run: vp install --frozen-lockfile --filter=@t3tools/desktop... --filter=akeru-bot... --filter=@t3tools/scripts...
- name: Setup Rust
- uses: dtolnay/rust-toolchain@stable
+ uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
with:
targets: ${{ matrix.rust_target }}
@@ -97,184 +121,156 @@ jobs:
sudo apt-get update
sudo apt-get install -y imagemagick
+ - name: Validate signing credentials
+ shell: bash
+ env:
+ MACOS_CERTIFICATE_P12: ${{ secrets.MACOS_CERTIFICATE_P12 }}
+ MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
+ MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }}
+ APPSTORE_API_KEY_P8: ${{ secrets.APPSTORE_API_KEY_P8 }}
+ APPSTORE_API_KEY_ID: ${{ secrets.APPSTORE_API_KEY_ID }}
+ APPSTORE_ISSUER_ID: ${{ secrets.APPSTORE_ISSUER_ID }}
+ AZURE_TRUSTED_SIGNING_PUBLISHER_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_PUBLISHER_NAME }}
+ AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }}
+ AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME }}
+ AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
+ AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
+ AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
+ AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
+ run: |
+ signed=false
+ if test "${{ matrix.platform }}" = mac; then
+ values=("$MACOS_CERTIFICATE_P12" "$MACOS_CERTIFICATE_PASSWORD" "$MACOS_SIGNING_IDENTITY" "$APPSTORE_API_KEY_P8" "$APPSTORE_API_KEY_ID" "$APPSTORE_ISSUER_ID")
+ elif test "${{ matrix.platform }}" = win; then
+ values=("$AZURE_TRUSTED_SIGNING_PUBLISHER_NAME" "$AZURE_TRUSTED_SIGNING_ENDPOINT" "$AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME" "$AZURE_TRUSTED_SIGNING_ACCOUNT_NAME" "$AZURE_CLIENT_ID" "$AZURE_TENANT_ID" "$AZURE_CLIENT_SECRET")
+ else
+ values=()
+ fi
+ present=0
+ for value in "${values[@]}"; do test -n "$value" && present=$((present + 1)); done
+ if (( present != 0 && present != ${#values[@]} )); then
+ printf 'Signing credentials must be either complete or absent.\n' >&2
+ exit 1
+ fi
+ if (( present > 0 )); then signed=true; fi
+ printf 'SIGNED=%s\n' "$signed" >> "$GITHUB_ENV"
+
- name: Import macOS signing certificate
- if: matrix.platform == 'mac'
+ if: matrix.platform == 'mac' && env.SIGNED == 'true'
uses: apple-actions/import-codesign-certs@5142e029c445c10ffc7149d172e540235a065466 # v7.0.0
with:
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE_P12 }}
p12-password: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
- - name: Configure App Store Connect API key
- if: matrix.platform == 'mac'
+ - name: Configure macOS notarization
+ if: matrix.platform == 'mac' && env.SIGNED == 'true'
shell: bash
env:
- APPSTORE_API_KEY_P8: ${{ secrets.APPSTORE_API_KEY_P8 }}
- APPSTORE_API_KEY_ID: ${{ secrets.APPSTORE_API_KEY_ID }}
- APPSTORE_ISSUER_ID: ${{ secrets.APPSTORE_ISSUER_ID }}
MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }}
+ APPSTORE_API_KEY_P8: ${{ secrets.APPSTORE_API_KEY_P8 }}
run: |
- for variable in \
- APPSTORE_API_KEY_P8 \
- APPSTORE_API_KEY_ID \
- APPSTORE_ISSUER_ID \
- MACOS_SIGNING_IDENTITY; do
- if test -z "${!variable}"; then
- printf 'Required GitHub secret is empty: %s\n' "$variable" >&2
- exit 1
- fi
- done
case "$MACOS_SIGNING_IDENTITY" in
"Developer ID Application:"*) ;;
- *)
- printf 'MACOS_SIGNING_IDENTITY must name a Developer ID Application certificate.\n' >&2
- exit 1
- ;;
+ *) printf 'MACOS_SIGNING_IDENTITY must name a Developer ID Application certificate.\n' >&2; exit 1 ;;
esac
printf '%s' "$APPSTORE_API_KEY_P8" > "$RUNNER_TEMP/notarytool-api-key.p8"
chmod 600 "$RUNNER_TEMP/notarytool-api-key.p8"
- - name: Build signed macOS artifact
- if: matrix.platform == 'mac'
+ - name: Build desktop artifact
shell: bash
env:
APPLE_API_KEY: ${{ runner.temp }}/notarytool-api-key.p8
APPLE_API_KEY_ID: ${{ secrets.APPSTORE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPSTORE_ISSUER_ID }}
CSC_NAME: ${{ secrets.MACOS_SIGNING_IDENTITY }}
+ AZURE_TRUSTED_SIGNING_PUBLISHER_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_PUBLISHER_NAME }}
+ AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }}
+ AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME }}
+ AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
+ AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
+ AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
+ AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
run: |
- node scripts/update-release-package-versions.ts "$RELEASE_VERSION"
- vp run dist:desktop:artifact \
- --platform mac \
- --target dmg \
- --arch arm64 \
- --build-version "$RELEASE_VERSION" \
- --signed \
- --verbose
+ args=(--platform "${{ matrix.platform }}" --target "${{ matrix.target }}" --arch "${{ matrix.arch }}" --build-version "$RELEASE_VERSION" --verbose)
+ if test "$SIGNED" = true; then args+=(--signed); fi
+ vp run dist:desktop:artifact -- "${args[@]}"
- - name: Build unsigned desktop artifact
- if: matrix.platform != 'mac'
- shell: bash
- run: |
- node scripts/update-release-package-versions.ts "$RELEASE_VERSION"
- vp run dist:desktop:artifact \
- --platform "${{ matrix.platform }}" \
- --target "${{ matrix.target }}" \
- --arch "${{ matrix.arch }}" \
- --build-version "$RELEASE_VERSION" \
- --verbose
-
- - name: Verify artifact
- shell: bash
- run: |
- shopt -s nullglob
- artifacts=(release/*.${{ matrix.extension }})
- if (( ${#artifacts[@]} != 1 )); then
- printf 'Expected one .${{ matrix.extension }} artifact, found %s.\n' "${#artifacts[@]}" >&2
- exit 1
- fi
-
- - name: Notarize, staple, and verify macOS DMG
- if: matrix.platform == 'mac'
+ - name: Notarize and verify macOS DMG
+ if: matrix.platform == 'mac' && env.SIGNED == 'true'
shell: bash
env:
APPLE_API_KEY: ${{ runner.temp }}/notarytool-api-key.p8
APPLE_API_KEY_ID: ${{ secrets.APPSTORE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPSTORE_ISSUER_ID }}
run: |
- shopt -s nullglob
- artifacts=(release/*.dmg)
- if (( ${#artifacts[@]} != 1 )); then
- printf 'Expected one DMG artifact, found %s.\n' "${#artifacts[@]}" >&2
- exit 1
- fi
- dmg="${artifacts[0]}"
-
- # electron-builder already submitted and stapled the signed app.
- # This submission owns the DMG that contains that app.
- xcrun notarytool submit "$dmg" \
- --key "$APPLE_API_KEY" \
- --key-id "$APPLE_API_KEY_ID" \
- --issuer "$APPLE_API_ISSUER" \
- --wait
+ dmg="release/Akeru-Bot-$RELEASE_VERSION-arm64.dmg"
+ xcrun notarytool submit "$dmg" --key "$APPLE_API_KEY" --key-id "$APPLE_API_KEY_ID" --issuer "$APPLE_API_ISSUER" --wait
xcrun stapler staple "$dmg"
xcrun stapler validate "$dmg"
spctl --assess --type open --context context:primary-signature --verbose=2 "$dmg"
-
mount_point="$RUNNER_TEMP/akeru-dmg"
mkdir -p "$mount_point"
hdiutil attach "$dmg" -nobrowse -readonly -mountpoint "$mount_point"
- cleanup() {
- hdiutil detach "$mount_point" >/dev/null 2>&1 || true
- }
- trap cleanup EXIT
-
+ trap 'hdiutil detach "$mount_point" >/dev/null 2>&1 || true' EXIT
apps=("$mount_point"/*.app)
- if (( ${#apps[@]} != 1 )); then
- printf 'Expected one app in the DMG, found %s.\n' "${#apps[@]}" >&2
- exit 1
- fi
+ test "${#apps[@]}" -eq 1
codesign --verify --deep --strict --verbose=2 "${apps[0]}"
xcrun stapler validate "${apps[0]}"
spctl --assess --type execute --verbose=2 "${apps[0]}"
- - name: Upload smoke artifact
+ - name: Upload desktop assets
uses: actions/upload-artifact@v7
with:
- name: akeru-bot-${{ matrix.platform }}-${{ matrix.arch }}
- path: release/*.${{ matrix.extension }}
+ name: stable-${{ matrix.platform }}-${{ matrix.arch }}
+ path: release/*
if-no-files-found: error
retention-days: 7
cli:
- name: CLI package
- needs: release_smoke
+ name: Akeru CLI package
+ needs: preflight
runs-on: depot-ubuntu-24.04-8
timeout-minutes: 20
env:
- RELEASE_VERSION: ${{ inputs.version }}
+ RELEASE_VERSION: ${{ needs.preflight.outputs.version }}
steps:
- - name: Checkout
- uses: actions/checkout@v6
-
- - name: Setup Vite+
- uses: voidzero-dev/setup-vp@v1
+ - uses: actions/checkout@v6
+ - uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
- run-install: |
- args:
- - --filter=akeru-bot...
- - --filter=@t3tools/web...
- - --filter=@t3tools/scripts...
-
- - name: Build CLI package
+ run-install: true
+ - name: Build and check CLI
run: |
- node scripts/update-release-package-versions.ts "$RELEASE_VERSION"
vp run --filter akeru-bot build
+ node apps/server/scripts/cli.ts publish --dry-run --app-version "$RELEASE_VERSION" --verbose
+ mkdir -p release
+ vp pm pack --filter akeru-bot --pack-destination release
+ test -f "release/akeru-bot-$RELEASE_VERSION.tgz"
+ - uses: actions/upload-artifact@v7
+ with:
+ name: stable-cli
+ path: release/akeru-bot-${{ env.RELEASE_VERSION }}.tgz
+ if-no-files-found: error
+ retention-days: 7
- - name: Dry-run CLI package
- run: node apps/server/scripts/cli.ts publish --dry-run --app-version "$RELEASE_VERSION" --verbose
-
- marketing:
- name: Marketing site
- needs: release_smoke
+ release:
+ name: Publish stable release
+ needs: [preflight, desktop, cli]
runs-on: depot-ubuntu-24.04-8
timeout-minutes: 15
+ env:
+ GH_TOKEN: ${{ github.token }}
+ RELEASE_VERSION: ${{ needs.preflight.outputs.version }}
+ RELEASE_TAG: ${{ needs.preflight.outputs.tag }}
steps:
- - name: Checkout
- uses: actions/checkout@v6
-
- - name: Setup Vite+
- uses: voidzero-dev/setup-vp@v1
+ - uses: actions/checkout@v6
+ - uses: actions/download-artifact@v8
with:
- node-version-file: package.json
- cache: true
- run-install: |
- args:
- - --filter=@t3tools/marketing...
-
- - name: Typecheck marketing site
- run: vp run --filter @t3tools/marketing typecheck
-
- - name: Build marketing site
- run: vp run --filter @t3tools/marketing build
+ pattern: stable-*
+ path: release
+ merge-multiple: true
+ - name: Verify names and hashes
+ run: node scripts/verify-release-assets.ts release "$RELEASE_VERSION"
+ - name: Create stable tag and GitHub Release
+ run: gh release create "$RELEASE_TAG" release/* --target "$GITHUB_SHA" --title "Akeru Bot $RELEASE_TAG" --generate-notes
diff --git a/.env.example b/.env.example
index 8b13fdc2a..54e62e95d 100644
--- a/.env.example
+++ b/.env.example
@@ -1,4 +1,30 @@
+# Optional: T3 Connect source builds
+# `cp .env.example .env` enables T3 Connect against the production deployment.
+# These are the same public identifiers baked into official release builds, not
+# secrets. Remove or comment them out to build with cloud features disabled.
+# Do not add server-side secrets to this file.
+
+# Production Clerk instance. To use your own, get these from the Clerk Dashboard
+# under API keys, JWT templates, and OAuth applications.
+T3CODE_CLERK_PUBLISHABLE_KEY=pk_live_Y2xlcmsudDMuY29kZXMk
+T3CODE_CLERK_JWT_TEMPLATE=t3-relay
+T3CODE_CLERK_CLI_OAUTH_CLIENT_ID=hzxSgY2cH10sDU2r
+
+# Optional: signed macOS passkey builds. The RP domain defaults to the Frontend API
+# hostname encoded in T3CODE_CLERK_PUBLISHABLE_KEY. Set the override only when Clerk
+# returns a different RP ID or when multiple domains must be entitled.
+# T3CODE_APPLE_TEAM_ID=ABC1234567
+# T3CODE_MACOS_PROVISIONING_PROFILE=/absolute/path/to/t3code.provisionprofile
+# T3CODE_CLERK_PASSKEY_RP_DOMAINS=example.clerk.accounts.dev,clerk.example.com
+
+# Production relay. For a self-hosted relay, `infra/relay` deploys update it
+# automatically.
+T3CODE_RELAY_URL=https://relay.t3.codes
+
+# Optional: hosted app origin used by the CLI's out-of-band OAuth flow.
+# Defaults to https://app.t3.codes; override to test against a staging deployment.
+
# Public, ingest-only mobile OpenTelemetry configuration.
# T3CODE_MOBILE_OTLP_TRACES_URL=https://api.axiom.co/v1/traces
-# T3CODE_MOBILE_OTLP_TRACES_DATASET=akeru-mobile-traces-dev
+# T3CODE_MOBILE_OTLP_TRACES_DATASET=t3-code-mobile-traces-dev
# T3CODE_MOBILE_OTLP_TRACES_TOKEN=xaat-...
diff --git a/.github/triage/PLAYBOOK.md b/.github/triage/PLAYBOOK.md
index 3d5e9d533..202e364b6 100644
--- a/.github/triage/PLAYBOOK.md
+++ b/.github/triage/PLAYBOOK.md
@@ -36,7 +36,7 @@ cache directory named in the context file, one subdirectory per commit hash:
git clone --depth 1 --filter=blob:none --branch <release-tag> \
https://github.com/opencoredev/akeru-bot <source-cache-dir>/<hash>
-If the tag does not exist (nightly builds), clone `main` instead, and treat file
+If the tag does not exist, clone `main` instead, and treat file
and line references as approximate: the user's build may not match `main`
exactly. If the target directory already exists from an earlier triage run,
reuse it instead of cloning again. Before cloning, delete other entries in the
diff --git a/apps/desktop/resources/dmg/dmg-background-nightly.svg b/apps/desktop/resources/dmg/dmg-background-nightly.svg
deleted file mode 100644
index 2f780c60f..000000000
--- a/apps/desktop/resources/dmg/dmg-background-nightly.svg
+++ /dev/null
@@ -1,64 +0,0 @@
-<svg width="1080" height="760" viewBox="0 0 540 380" fill="none" xmlns="http://www.w3.org/2000/svg">
- <defs>
- <linearGradient id="night-sky" x1="28" y1="0" x2="510" y2="112" gradientUnits="userSpaceOnUse">
- <stop stop-color="#07152F"/>
- <stop offset="0.52" stop-color="#151443"/>
- <stop offset="1" stop-color="#32155B"/>
- </linearGradient>
- <radialGradient id="night-glow" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(420 18) rotate(157) scale(260 126)">
- <stop stop-color="#5165D8" stop-opacity="0.42"/>
- <stop offset="0.55" stop-color="#283075" stop-opacity="0.15"/>
- <stop offset="1" stop-color="#111635" stop-opacity="0"/>
- </radialGradient>
- <linearGradient id="night-cloud" x1="18" y1="62" x2="260" y2="112" gradientUnits="userSpaceOnUse">
- <stop stop-color="#4EA4FF" stop-opacity="0.5"/>
- <stop offset="0.52" stop-color="#696FEA" stop-opacity="0.62"/>
- <stop offset="1" stop-color="#A85BEA" stop-opacity="0.5"/>
- </linearGradient>
- <filter id="night-soft" x="-24" y="35" width="588" height="101" filterUnits="userSpaceOnUse">
- <feGaussianBlur stdDeviation="4"/>
- </filter>
- </defs>
-
- <rect width="540" height="380" fill="#F7F7F5"/>
- <rect width="540" height="112" fill="url(#night-sky)"/>
- <rect width="540" height="112" fill="url(#night-glow)"/>
-
- <g fill="#E4EAFF">
- <circle cx="20" cy="18" r="0.8" opacity="0.82"/>
- <circle cx="76" cy="27" r="0.55" opacity="0.55"/>
- <circle cx="133" cy="13" r="0.65" opacity="0.7"/>
- <circle cx="198" cy="28" r="0.5" opacity="0.5"/>
- <circle cx="258" cy="15" r="0.75" opacity="0.8"/>
- <circle cx="326" cy="29" r="0.5" opacity="0.55"/>
- <circle cx="384" cy="12" r="0.65" opacity="0.72"/>
- <circle cx="455" cy="26" r="0.55" opacity="0.58"/>
- <circle cx="517" cy="15" r="0.75" opacity="0.78"/>
- </g>
- <g stroke="#EEF2FF" stroke-linecap="round" stroke-width="0.65" opacity="0.68">
- <path d="M104 30V34M102 32H106"/>
- <path d="M448 24V28M446 26H450"/>
- </g>
-
- <g filter="url(#night-soft)">
- <path d="M-12 112V101C-12 87 0 76 14 76C18 63 30 54 44 54C58 54 70 62 74 75C79 70 86 67 94 67C110 67 123 79 124 95C132 96 138 101 141 112H-12Z" fill="url(#night-cloud)"/>
- <path d="M374 112C375 98 387 87 401 87C405 72 418 62 434 62C450 62 463 72 467 87C478 87 488 94 492 104C506 103 518 106 526 112H374Z" fill="url(#night-cloud)" opacity="0.82"/>
- </g>
- <path d="M0 111.5H540" stroke="#050A19" stroke-opacity="0.3"/>
- <path d="M32 28H64" stroke="#FFFFFF" stroke-width="2"/>
-
- <g font-family="-apple-system, BlinkMacSystemFont, sans-serif" fill="#FFFFFF">
- <text x="32" y="50" font-size="12" font-weight="600" letter-spacing="1.4">AKERU BOT</text>
- <text x="32" y="82" font-size="22" font-weight="600" letter-spacing="-0.45">Desktop</text>
- <text x="508" y="50" text-anchor="end" font-family="ui-monospace, SFMono-Regular, Menlo, monospace" font-size="8.5" font-weight="600" letter-spacing="1.2" opacity="0.84">NIGHTLY BUILD</text>
- </g>
-
- <path d="M196 224C242 239 307 201 362 220" stroke="#71717A" stroke-width="1.5" stroke-linecap="round" stroke-dasharray="1 7" opacity="0.42"/>
- <circle cx="362" cy="220" r="2" fill="#71717A" opacity="0.55"/>
- <path d="M176 204V227L182 221L187.5 232L192 229.8L186.5 219H194L176 204Z" fill="#71717A" stroke="#F7F7F5" stroke-width="1.5" stroke-linejoin="round"/>
-
- <g font-family="-apple-system, BlinkMacSystemFont, sans-serif" text-anchor="middle">
- <text x="270" y="322" font-size="13" font-weight="600" letter-spacing="-0.1" fill="#18181B">Drag Akeru Bot to Applications</text>
- <text x="270" y="345" font-size="9.5" fill="#71717A">Open it from Applications when the copy finishes.</text>
- </g>
-</svg>
diff --git a/apps/desktop/src/app/DesktopEnvironment.test.ts b/apps/desktop/src/app/DesktopEnvironment.test.ts
index 1f1fe0461..03e86f743 100644
--- a/apps/desktop/src/app/DesktopEnvironment.test.ts
+++ b/apps/desktop/src/app/DesktopEnvironment.test.ts
@@ -131,18 +131,16 @@ describe("DesktopEnvironment", () => {
}),
);
- it.effect("brands Dev, Alpha, and Nightly display names as Akeru Bot", () =>
+ it.effect("brands Dev and stable display names as Akeru Bot", () =>
Effect.gen(function* () {
const development = yield* makeEnvironment(
{},
{ VITE_DEV_SERVER_URL: "http://localhost:5173" },
);
const alpha = yield* makeEnvironment();
- const nightly = yield* makeEnvironment({ appVersion: "0.0.22-nightly.20260101.1" });
assert.equal(development.displayName, "Akeru Bot (Dev)");
assert.equal(alpha.displayName, "Akeru Bot (Alpha)");
- assert.equal(nightly.displayName, "Akeru Bot (Nightly)");
assert.deepEqual(alpha.branding, {
baseName: "Akeru Bot",
stageLabel: "Alpha",
diff --git a/apps/desktop/src/app/DesktopEnvironment.ts b/apps/desktop/src/app/DesktopEnvironment.ts
index 59e25aed6..dac22f1e7 100644
--- a/apps/desktop/src/app/DesktopEnvironment.ts
+++ b/apps/desktop/src/app/DesktopEnvironment.ts
@@ -14,7 +14,6 @@ import * as Path from "effect/Path";
import * as DesktopAppSettings from "../settings/DesktopAppSettings.ts";
import * as DesktopConfig from "./DesktopConfig.ts";
import { resolveDesktopBaseDir, resolveDesktopStateDir } from "./DesktopStatePaths.ts";
-import { isNightlyDesktopVersion } from "../updates/updateChannels.ts";
export interface MakeDesktopEnvironmentInput {
readonly dirname: string;
@@ -95,7 +94,7 @@ function resolveDesktopAppStageLabel(input: {
return "Dev";
}
- return isNightlyDesktopVersion(input.appVersion) ? "Nightly" : "Alpha";
+ return "Alpha";
}
function resolveDesktopAppBranding(input: {
diff --git a/apps/desktop/src/electron/ElectronUpdater.test.ts b/apps/desktop/src/electron/ElectronUpdater.test.ts
index c2acc9ce1..a5cd79452 100644
--- a/apps/desktop/src/electron/ElectronUpdater.test.ts
+++ b/apps/desktop/src/electron/ElectronUpdater.test.ts
@@ -84,17 +84,17 @@ describe("ElectronUpdater", () => {
const cause = new Error("download unavailable");
autoUpdaterMock.downloadUpdate.mockImplementationOnce(() => Promise.reject(cause));
const updater = yield* ElectronUpdater.ElectronUpdater;
- autoUpdaterMock.channel = "nightly";
+ autoUpdaterMock.channel = "beta";
const error = yield* updater.downloadUpdate.pipe(Effect.flip);
assert.instanceOf(error, ElectronUpdater.ElectronUpdaterDownloadUpdateError);
assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
- assert.equal(error.channel, "nightly");
+ assert.equal(error.channel, "beta");
assert.strictEqual(error.cause, cause);
assert.equal(
error.message,
- "Electron updater failed to download the update on channel nightly.",
+ "Electron updater failed to download the update on channel beta.",
);
assert.notInclude(error.message, cause.message);
}).pipe(Effect.provide(ElectronUpdater.layer)),
diff --git a/apps/desktop/src/settings/DesktopAppSettings.test.ts b/apps/desktop/src/settings/DesktopAppSettings.test.ts
index 64c59749a..3ac5a69b0 100644
--- a/apps/desktop/src/settings/DesktopAppSettings.test.ts
+++ b/apps/desktop/src/settings/DesktopAppSettings.test.ts
@@ -28,7 +28,7 @@ const DesktopSettingsPatch = Schema.Struct({
serverExposureMode: Schema.optionalKey(Schema.Literals(["local-only", "network-accessible"])),
tailscaleServeEnabled: Schema.optionalKey(Schema.Boolean),
tailscaleServePort: Schema.optionalKey(Schema.Number),
- updateChannel: Schema.optionalKey(Schema.Literals(["latest", "nightly"])),
+ updateChannel: Schema.optionalKey(Schema.Literal("latest")),
updateChannelConfiguredByUser: Schema.optionalKey(Schema.Boolean),
wslBackendEnabled: Schema.optionalKey(Schema.Boolean),
wslMode: Schema.optionalKey(Schema.Literals(["local", "wsl"])),
@@ -101,25 +101,6 @@ describe("DesktopSettings", () => {
),
);
- it("defaults packaged nightly builds to the nightly update channel", () => {
- assert.deepEqual(
- DesktopAppSettings.resolveDefaultDesktopSettings("0.0.17-nightly.20260415.1"),
- {
- linuxPasswordStore: "auto",
- mainWindowBounds: null,
- mainWindowMaximized: false,
- serverExposureMode: "local-only",
- tailscaleServeEnabled: false,
- tailscaleServePort: 443,
- updateChannel: "nightly",
- updateChannelConfiguredByUser: false,
- wslBackendEnabled: false,
- wslOnly: false,
- wslDistro: null,
- } satisfies DesktopAppSettings.DesktopSettings,
- );
- });
-
it.effect("loads persisted settings and applies semantic updates", () =>
withSettings(
Effect.gen(function* () {
@@ -157,11 +138,6 @@ describe("DesktopSettings", () => {
});
assert.isTrue(tailscale.changed);
assert.equal(tailscale.settings.tailscaleServePort, 9443);
-
- const updateChannel = yield* settings.setUpdateChannel("nightly");
- assert.isTrue(updateChannel.changed);
- assert.equal(updateChannel.settings.updateChannel, "nightly");
- assert.equal(updateChannel.settings.updateChannelConfiguredByUser, true);
}),
),
);
@@ -291,7 +267,7 @@ describe("DesktopSettings", () => {
"serverExposureMode": "network-accessible",
"tailscaleServeEnabled": true,
"tailscaleServePort": 8443,
- "updateChannel": "nightly",
+ "updateChannel": "latest",
"updateChannelConfiguredByUser": true
}\n`,
);
@@ -303,7 +279,7 @@ describe("DesktopSettings", () => {
serverExposureMode: "network-accessible",
tailscaleServeEnabled: true,
tailscaleServePort: 8443,
- updateChannel: "nightly",
+ updateChannel: "latest",
updateChannelConfiguredByUser: true,
wslBackendEnabled: false,
wslOnly: false,
@@ -335,61 +311,6 @@ describe("DesktopSettings", () => {
),
);
- it.effect("migrates legacy implicit update channels to the runtime default", () =>
- withSettings(
- Effect.gen(function* () {
- const settings = yield* DesktopAppSettings.DesktopAppSettings;
- yield* writeSettingsPatch({
- serverExposureMode: "local-only",
- updateChannel: "latest",
- });
-
- assert.deepEqual(yield* settings.load, {
- linuxPasswordStore: "auto",
- mainWindowBounds: null,
- mainWindowMaximized: false,
- serverExposureMode: "local-only",
- tailscaleServeEnabled: false,
- tailscaleServePort: 443,
- updateChannel: "nightly",
- updateChannelConfiguredByUser: false,
- wslBackendEnabled: false,
- wslOnly: false,
- wslDistro: null,
- } satisfies DesktopAppSettings.DesktopSettings);
- }),
- { appVersion: "0.0.17-nightly.20260415.1" },
- ),
- );
-
- it.effect("preserves explicit stable update channel on nightly builds", () =>
- withSettings(
- Effect.gen(function* () {
- const settings = yield* DesktopAppSettings.DesktopAppSettings;
- yield* writeSettingsPatch({
- serverExposureMode: "local-only",
- updateChannel: "latest",
- updateChannelConfiguredByUser: true,
- });
-
- assert.deepEqual(yield* settings.load, {
- linuxPasswordStore: "auto",
- mainWindowBounds: null,
- mainWindowMaximized: false,
- serverExposureMode: "local-only",
- tailscaleServeEnabled: false,
- tailscaleServePort: 443,
- updateChannel: "latest",
- updateChannelConfiguredByUser: true,
- wslBackendEnabled: false,
- wslOnly: false,
- wslDistro: null,
- } satisfies DesktopAppSettings.DesktopSettings);
- }),
- { appVersion: "0.0.17-nightly.20260415.1" },
- ),
- );
-
it.effect("normalizes invalid persisted Tailscale Serve ports", () =>
withSettings(
Effect.gen(function* () {
diff --git a/apps/desktop/src/settings/DesktopAppSettings.ts b/apps/desktop/src/settings/DesktopAppSettings.ts
index aefc67525..726ab2e78 100644
--- a/apps/desktop/src/settings/DesktopAppSettings.ts
+++ b/apps/desktop/src/settings/DesktopAppSettings.ts
@@ -211,10 +211,7 @@ function normalizeDesktopSettingsDocument(
const defaultSettings = resolveDefaultDesktopSettings(appVersion);
const mainWindowBounds = normalizeMainWindowBounds(parsed.mainWindowBounds);
const parsedUpdateChannel = Option.fromNullishOr(parsed.updateChannel);
- const isLegacySettings = parsed.updateChannelConfiguredByUser === undefined;
- const updateChannelConfiguredByUser =
- parsed.updateChannelConfiguredByUser === true ||
- (isLegacySettings && Option.contains(parsedUpdateChannel, "nightly"));
+ const updateChannelConfiguredByUser = parsed.updateChannelConfiguredByUser === true;
// Newer form wins when both are present; otherwise fall back to the legacy
// `wslMode === "wsl"` signal so users coming off the swap-mode build keep
diff --git a/apps/desktop/src/updates/DesktopUpdates.test.ts b/apps/desktop/src/updates/DesktopUpdates.test.ts
index dd3cd1aaf..55a6560e4 100644
--- a/apps/desktop/src/updates/DesktopUpdates.test.ts
+++ b/apps/desktop/src/updates/DesktopUpdates.test.ts
@@ -314,7 +314,7 @@ describe("DesktopUpdates", () => {
).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
});
- it.effect("enables nightly full changelog release notes and broadcasts summaries", () => {
+ it.effect("normalizes stable release notes and broadcasts summaries", () => {
const harness = makeHarness();
return Effect.scoped(
@@ -322,18 +322,15 @@ describe("DesktopUpdates", () => {
const updates = yield* DesktopUpdates.DesktopUpdates;
yield* updates.configure;
- yield* updates.setChannel("nightly");
- assert.equal(harness.fullChangelog(), true);
-
harness.emit("update-available", {
- version: "1.2.4-nightly.20260709.766",
+ version: "1.2.4",
releaseNotes: [
{
- version: "1.2.4-nightly.20260709.766",
+ version: "1.2.4",
note: `<h2>What's Changed</h2><ul><li>feat(client): persist offline environment data by <a>@juliusmarminge</a> in <a>#3795</a></li></ul><h2>Full Changelog</h2>`,
},
{
- version: "1.2.4-nightly.20260709.765",
+ version: "1.2.3",
note: "- [codex] Upgrade Clerk stack by @juliusmarminge in #3821",
},
],
@@ -344,11 +341,11 @@ describe("DesktopUpdates", () => {
assert.equal(state.status, "available");
assert.deepEqual(state.releaseNotes, [
{
- version: "1.2.4-nightly.20260709.766",
+ version: "1.2.4",
items: ["feat(client): persist offline environment data by @juliusmarminge in #3795"],
},
{
- version: "1.2.4-nightly.20260709.765",
+ version: "1.2.3",
items: ["[codex] Upgrade Clerk stack by @juliusmarminge in #3821"],
},
]);
@@ -430,36 +427,6 @@ describe("DesktopUpdates", () => {
).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
});
- it.effect("preserves a queued installer when the feed offers another channel", () => {
- const harness = makeHarness();
-
- return Effect.scoped(
- Effect.gen(function* () {
- const updates = yield* DesktopUpdates.DesktopUpdates;
- yield* updates.configure;
-
- harness.emit("update-available", {
- version: "1.2.4",
- releaseNotes: "## What's changed\n- fix: queued update",
- });
- yield* flushCallbacks;
- harness.emit("update-downloaded", { version: "1.2.4" });
- yield* flushCallbacks;
-
- yield* updates.check("poll");
- harness.emit("update-available", { version: "1.2.5-nightly.20260710.1" });
- yield* flushCallbacks;
-
- const state = yield* updates.getState;
- assert.equal(state.status, "downloaded");
- assert.equal(state.availableVersion, "1.2.4");
- assert.equal(state.downloadedVersion, "1.2.4");
- assert.deepEqual(state.releaseNotes, [{ version: "1.2.4", items: ["fix: queued update"] }]);
- assert.equal(state.downloadPercent, 100);
- }),
- ).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
- });
-
it.effect(
"rejects install while a refresh check is in progress and releases the reservation",
() =>
@@ -649,9 +616,6 @@ describe("DesktopUpdates", () => {
assert.equal(failedState.status, "available");
assert.equal(failedState.errorContext, "download");
assert.equal(failedState.message, "Desktop update download action failed unexpectedly.");
-
- const changedState = yield* updates.setChannel("nightly");
- assert.equal(changedState.channel, "nightly");
}),
).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
});
@@ -718,28 +682,6 @@ describe("DesktopUpdates", () => {
assert.equal(failedState.status, "downloaded");
assert.equal(failedState.errorContext, "install");
assert.equal(failedState.message, "Desktop update install action failed unexpectedly.");
-
- const changedState = yield* updates.setChannel("nightly");
- assert.equal(changedState.channel, "nightly");
- }),
- ).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
- });
-
- it.effect("persists channel changes through the settings service", () => {
- const harness = makeHarness();
-
- return Effect.scoped(
- Effect.gen(function* () {
- const settings = yield* DesktopAppSettings.DesktopAppSettings;
- const updates = yield* DesktopUpdates.DesktopUpdates;
- yield* updates.configure;
-
- const state = yield* updates.setChannel("nightly");
- const persistedSettings = yield* settings.get;
-
- assert.equal(state.channel, "nightly");
- assert.equal(persistedSettings.updateChannel, "nightly");
- assert.equal(persistedSettings.updateChannelConfiguredByUser, true);
}),
).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
});
@@ -781,13 +723,13 @@ describe("DesktopUpdates", () => {
const checkFiber = yield* updates.check("manual").pipe(Effect.forkScoped);
yield* Deferred.await(checkStarted);
- const exit = yield* Effect.exit(updates.setChannel("nightly"));
+ const exit = yield* Effect.exit(updates.setChannel("latest"));
assert.equal(exit._tag, "Failure");
if (exit._tag === "Failure") {
const error = Cause.squash(exit.cause);
assert.instanceOf(error, DesktopUpdates.DesktopUpdateActionInProgressError);
assert.equal(error.action, "check");
- assert.equal(error.requestedChannel, "nightly");
+ assert.equal(error.requestedChannel, "latest");
}
yield* Deferred.succeed(releaseCheck, undefined);
@@ -796,67 +738,4 @@ describe("DesktopUpdates", () => {
).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
}),
);
-
- it.effect("rejects checks while an update channel change is being persisted", () =>
- Effect.gen(function* () {
- const channelChangeStarted = yield* Deferred.make<void>();
- const releaseChannelChange = yield* Deferred.make<void>();
- const harness = makeHarness({
- beforeSetUpdateChannel: Deferred.succeed(channelChangeStarted, undefined).pipe(
- Effect.andThen(Deferred.await(releaseChannelChange)),
- ),
- });
-
- yield* Effect.scoped(
- Effect.gen(function* () {
- const updates = yield* DesktopUpdates.DesktopUpdates;
- yield* updates.configure;
-
- const channelFiber = yield* updates.setChannel("nightly").pipe(Effect.forkScoped);
- yield* Deferred.await(channelChangeStarted);
-
- const checkResult = yield* updates.check("manual");
- assert.isFalse(checkResult.checked);
- assert.equal(harness.checkCount(), 0);
-
- yield* Deferred.succeed(releaseChannelChange, undefined);
- const state = yield* Fiber.join(channelFiber);
-
- assert.equal(state.channel, "nightly");
- assert.equal(harness.checkCount(), 1);
- }),
- ).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
- }),
- );
-
- it.effect("preserves settings failure context when an update channel cannot be persisted", () => {
- const diskFailure = new Error("disk exploded");
- const settingsFailure = new DesktopAppSettings.DesktopSettingsWriteError({
- operation: "replace-settings-file",
- path: "/tmp/settings.json",
- cause: diskFailure,
- });
- const harness = makeHarness({ setUpdateChannelError: settingsFailure });
-
- return Effect.scoped(
- Effect.gen(function* () {
- const updates = yield* DesktopUpdates.DesktopUpdates;
- yield* updates.configure;
-
- const error = yield* updates.setChannel("nightly").pipe(Effect.flip);
-
- assert.instanceOf(error, DesktopUpdates.DesktopUpdateChannelPersistenceError);
- assert.isTrue(DesktopUpdates.isDesktopUpdateSetChannelError(error));
- assert.equal(error.channel, "nightly");
- assert.strictEqual(error.cause, settingsFailure);
- assert.strictEqual(error.cause.cause, diskFailure);
- assert.equal(error.message, "Failed to persist the nightly desktop update channel.");
- assert.notInclude(error.message, diskFailure.message);
-
- const checkResult = yield* updates.check("manual");
- assert.isTrue(checkResult.checked);
- assert.equal(harness.checkCount(), 1);
- }),
- ).pipe(Effect.provide(Layer.merge(TestClock.layer(), harness.layer)));
- });
});
diff --git a/apps/desktop/src/updates/DesktopUpdates.ts b/apps/desktop/src/updates/DesktopUpdates.ts
index 483ace0ff..894b12f53 100644
--- a/apps/desktop/src/updates/DesktopUpdates.ts
+++ b/apps/desktop/src/updates/DesktopUpdates.ts
@@ -335,16 +335,15 @@ export const make = Effect.gen(function* () {
channel: DesktopUpdateChannel,
) {
yield* Effect.annotateCurrentSpan({ channel });
- const allowsPrerelease = channel === "nightly";
yield* electronUpdater.setChannel(channel);
- yield* electronUpdater.setAllowPrerelease(allowsPrerelease);
- yield* electronUpdater.setAllowDowngrade(allowsPrerelease);
- yield* electronUpdater.setFullChangelog(allowsPrerelease);
+ yield* electronUpdater.setAllowPrerelease(false);
+ yield* electronUpdater.setAllowDowngrade(false);
+ yield* electronUpdater.setFullChangelog(false);
yield* logUpdaterInfo("using update channel", {
channel,
- allowPrerelease: allowsPrerelease,
- allowDowngrade: allowsPrerelease,
- fullChangelog: allowsPrerelease,
+ allowPrerelease: false,
+ allowDowngrade: false,
+ fullChangelog: false,
});
});
diff --git a/apps/desktop/src/updates/updateChannels.ts b/apps/desktop/src/updates/updateChannels.ts
index 731910e44..0ff2cee04 100644
--- a/apps/desktop/src/updates/updateChannels.ts
+++ b/apps/desktop/src/updates/updateChannels.ts
@@ -1,11 +1,5 @@
import type { DesktopUpdateChannel } from "@t3tools/contracts";
-const NIGHTLY_VERSION_PATTERN = /-nightly\.\d{8}\.\d+$/;
-
-export function isNightlyDesktopVersion(version: string): boolean {
- return NIGHTLY_VERSION_PATTERN.test(version);
-}
-
-export function resolveDefaultDesktopUpdateChannel(appVersion: string): DesktopUpdateChannel {
- return isNightlyDesktopVersion(appVersion) ? "nightly" : "latest";
+export function resolveDefaultDesktopUpdateChannel(_appVersion: string): DesktopUpdateChannel {
+ return "latest";
}
diff --git a/apps/desktop/src/updates/updateMachine.test.ts b/apps/desktop/src/updates/updateMachine.test.ts
index e25da9e95..6223c72e7 100644
--- a/apps/desktop/src/updates/updateMachine.test.ts
+++ b/apps/desktop/src/updates/updateMachine.test.ts
@@ -229,11 +229,11 @@ describe("updateMachine", () => {
it("clears release notes when checking again", () => {
const state = reduceDesktopUpdateStateOnCheckStart(
{
- ...createInitialDesktopUpdateState("1.0.0", runtimeInfo, "nightly"),
+ ...createInitialDesktopUpdateState("1.0.0", runtimeInfo, "latest"),
enabled: true,
status: "available",
- availableVersion: "1.1.0-nightly.1",
- releaseNotes: [{ version: "1.1.0-nightly.1", items: ["feat: old note"] }],
+ availableVersion: "1.1.0",
+ releaseNotes: [{ version: "1.1.0", items: ["feat: old note"] }],
},
"2026-03-04T00:00:00.000Z",
);
diff --git a/apps/marketing/package.json b/apps/marketing/package.json
index 912faf881..2ada40529 100644
--- a/apps/marketing/package.json
+++ b/apps/marketing/package.json
@@ -15,6 +15,7 @@
},
"devDependencies": {
"@astrojs/check": "^0.9.7",
+ "@effect/vitest": "catalog:",
"@vercel/config": "^0.3.0",
"typescript": "catalog:"
}
diff --git a/apps/marketing/src/lib/installPrompt.test.ts b/apps/marketing/src/lib/installPrompt.test.ts
new file mode 100644
index 000000000..db868d176
--- /dev/null
+++ b/apps/marketing/src/lib/installPrompt.test.ts
@@ -0,0 +1,38 @@
+import { describe, expect, it } from "vite-plus/test";
+import { INSTALL_SUCCESS_MESSAGE, installPromptForPlatform } from "./installPrompt";
+import { MAC_INSTALL_PROMPT } from "./macInstallPrompt";
+import { windowsInstallPrompt } from "./installPrompts";
+
+describe("installPromptForPlatform", () => {
+ it("selects the verified prompt for every shipped platform", () => {
+ expect(installPromptForPlatform("mac")).toBe(MAC_INSTALL_PROMPT);
+ expect(installPromptForPlatform("win")).toBe(windowsInstallPrompt);
+ expect(installPromptForPlatform("linux")).toMatch(/x86_64 or amd64/);
+ });
+
+ it("selects the verified Linux x64 AppImage prompt", () => {
+ const prompt = installPromptForPlatform("linux");
+
+ expect(prompt).not.toBeNull();
+ expect(prompt).toMatch(/x86_64 or amd64/);
+ expect(prompt).toMatch(/github\.com\/opencoredev\/akeru-bot/);
+ expect(prompt).toMatch(/SHA256SUMS to contain that asset's exact filename/);
+ expect(prompt).toMatch(/Ask me where to save/);
+ expect(prompt).toMatch(/Only after verification, make that AppImage executable/);
+ });
+
+ it("refuses unsupported platforms", () => {
+ expect(installPromptForPlatform("android")).toBeNull();
+ });
+
+ it("gates the exact success sentence on launch verification", () => {
+ for (const platform of ["mac", "win", "linux"]) {
+ const prompt = installPromptForPlatform(platform)!;
+ expect(prompt.split(INSTALL_SUCCESS_MESSAGE)).toHaveLength(2);
+ expect(prompt).toMatch(/only after|Only after/);
+ expect(prompt).toMatch(/checksum/i);
+ expect(prompt).toMatch(/launch/i);
+ expect(prompt).toMatch(/process|window/i);
+ }
+ });
+});
diff --git a/apps/marketing/src/lib/installPrompt.ts b/apps/marketing/src/lib/installPrompt.ts
new file mode 100644
index 000000000..f5eeba9ca
--- /dev/null
+++ b/apps/marketing/src/lib/installPrompt.ts
@@ -0,0 +1,12 @@
+import { MAC_INSTALL_PROMPT } from "./macInstallPrompt";
+import { windowsInstallPrompt } from "./installPrompts";
+
+export const INSTALL_SUCCESS_MESSAGE = "You can open the app now with no issues.";
+
+const LINUX_X64_INSTALL_PROMPT = `Install the latest stable Akeru Bot AppImage for me. Before downloading, require uname -m to return x86_64 or amd64 and stop for every other architecture. Use only the latest release from https://github.com/opencoredev/akeru-bot and download its x86_64 AppImage plus SHA256SUMS. Ask me where to save the AppImage. Require SHA256SUMS to contain that asset's exact filename and require the downloaded file's SHA-256 to match. Stop if the checksum is missing or mismatched. Only after verification, make that AppImage executable. Do not chmod any other file and do not install it system-wide. Launch the verified AppImage, then verify its process or window is running. If any step fails, report the failure and do not claim success. Only after launch verification, output exactly: ${INSTALL_SUCCESS_MESSAGE}`;
+
+export function installPromptForPlatform(platform: string): string | null {
+ if (platform === "mac") return MAC_INSTALL_PROMPT;
+ if (platform === "linux") return LINUX_X64_INSTALL_PROMPT;
+ return platform === "win" ? windowsInstallPrompt : null;
+}
diff --git a/apps/marketing/src/lib/installPrompts.test.ts b/apps/marketing/src/lib/installPrompts.test.ts
new file mode 100644
index 000000000..56f8d5d2a
--- /dev/null
+++ b/apps/marketing/src/lib/installPrompts.test.ts
@@ -0,0 +1,28 @@
+import { describe, expect, it } from "vite-plus/test";
+
+import {
+ VERIFIED_INSTALL_SUCCESS,
+ verifiedInstallSuccess,
+ windowsInstallPrompt,
+} from "./installPrompts";
+
+describe("Windows install prompt", () => {
+ it("reports success only after every verification passes", () => {
+ expect(verifiedInstallSuccess({ checksum: true, install: true, launch: true })).toBe(
+ VERIFIED_INSTALL_SUCCESS,
+ );
+ expect(verifiedInstallSuccess({ checksum: false, install: true, launch: true })).toBeNull();
+ expect(verifiedInstallSuccess({ checksum: true, install: false, launch: true })).toBeNull();
+ expect(verifiedInstallSuccess({ checksum: true, install: true, launch: false })).toBeNull();
+ });
+
+ it("pins the official source and preserves Windows security controls", () => {
+ expect(windowsInstallPrompt).toContain("opencoredev/akeru-bot");
+ expect(windowsInstallPrompt).toContain("SHA256SUMS");
+ expect(windowsInstallPrompt).toContain("Refuse ARM64");
+ expect(windowsInstallPrompt).toContain("Akeru-Bot-<version>-x64.exe");
+ expect(windowsInstallPrompt).toContain("Unblock-File");
+ expect(windowsInstallPrompt).toContain("Do not disable or change SmartScreen");
+ expect(windowsInstallPrompt.endsWith("all succeed.")).toBe(true);
+ });
+});
diff --git a/apps/marketing/src/lib/installPrompts.ts b/apps/marketing/src/lib/installPrompts.ts
new file mode 100644
index 000000000..b733f6b3e
--- /dev/null
+++ b/apps/marketing/src/lib/installPrompts.ts
@@ -0,0 +1,11 @@
+export const VERIFIED_INSTALL_SUCCESS = "You can open the app now with no issues.";
+
+export const windowsInstallPrompt = `Install the latest stable Windows release of Akeru Bot from opencoredev/akeru-bot. Use PowerShell and stop on every failed check. Detect the native Windows architecture first. Continue only for AMD64 as x64. Refuse ARM64, x86, and every other architecture because the official release supports Windows x64 only. Fetch the latest stable release only from https://api.github.com/repos/opencoredev/akeru-bot/releases/latest and require a stable vX.Y.Z tag. Download its exact Akeru-Bot-<version>-x64.exe asset and SHA256SUMS. Require both download URLs to start with https://github.com/opencoredev/akeru-bot/releases/download/. Find one SHA256SUMS entry whose filename exactly matches the installer. Stop if the entry is missing, duplicated, malformed, or if Get-FileHash -Algorithm SHA256 does not match it. Only after the hash matches, run Unblock-File on that installer. Do not disable or change SmartScreen, antivirus software, or any system-wide security setting. Run the installer and ask me only for a native Windows administrator confirmation if Windows requires one. Launch Akeru Bot, then verify its running process has an Akeru Bot window or that its executable is the installed Akeru Bot executable. Do not claim success after only starting the installer or process. Say exactly "${VERIFIED_INSTALL_SUCCESS}" only after checksum verification, completed installation, launch, and process or window verification all succeed.`;
+
+export function verifiedInstallSuccess(input: {
+ checksum: boolean;
+ install: boolean;
+ launch: boolean;
+}): string | null {
+ return input.checksum && input.install && input.launch ? VERIFIED_INSTALL_SUCCESS : null;
+}
diff --git a/apps/marketing/src/lib/macInstallPrompt.test.ts b/apps/marketing/src/lib/macInstallPrompt.test.ts
new file mode 100644
index 000000000..5ac8d37d2
--- /dev/null
+++ b/apps/marketing/src/lib/macInstallPrompt.test.ts
@@ -0,0 +1,43 @@
+import { describe, expect, it } from "vite-plus/test";
+
+import {
+ MAC_INSTALL_SUCCESS,
+ checksumForAsset,
+ macInstallSuccess,
+ selectMacInstallAsset,
+} from "./macInstallPrompt";
+
+const assets = [
+ { name: "Akeru-Bot-1.0.0-arm64.dmg", browser_download_url: "https://example.test/arm" },
+];
+
+describe("macOS install prompt", () => {
+ it("selects the matching release asset and refuses unavailable architectures", () => {
+ expect(selectMacInstallAsset("arm64", assets)).toBe(assets[0]);
+ expect(selectMacInstallAsset("x86_64", assets)).toBeNull();
+ expect(selectMacInstallAsset("powerpc", assets)).toBeNull();
+ });
+
+ it("requires an exact SHA256SUMS entry for the selected asset", () => {
+ const digest = "a".repeat(64);
+ const checksums = `${digest} Akeru-Bot-1.0.0-arm64.dmg\n${"b".repeat(64)} other.dmg`;
+
+ expect(checksumForAsset(checksums, assets[0]!.name)).toBe(digest);
+ expect(checksumForAsset(checksums, "Akeru-Bot-1.0.0-x64.dmg")).toBeNull();
+ expect(checksumForAsset(`not-a-hash ${assets[0]!.name}`, assets[0]!.name)).toBeNull();
+ });
+
+ it("reports success only after every verification gate passes", () => {
+ const verified = {
+ checksumVerified: true,
+ installed: true,
+ launched: true,
+ appVisible: true,
+ };
+
+ expect(macInstallSuccess(verified)).toBe(MAC_INSTALL_SUCCESS);
+ for (const gate of Object.keys(verified) as Array<keyof typeof verified>) {
+ expect(macInstallSuccess({ ...verified, [gate]: false })).toBeNull();
+ }
+ });
+});
diff --git a/apps/marketing/src/lib/macInstallPrompt.ts b/apps/marketing/src/lib/macInstallPrompt.ts
new file mode 100644
index 000000000..d7d23a268
--- /dev/null
+++ b/apps/marketing/src/lib/macInstallPrompt.ts
@@ -0,0 +1,30 @@
+import type { ReleaseAsset } from "./releases";
+
+export const MAC_INSTALL_SUCCESS = "You can open the app now with no issues.";
+
+export const MAC_INSTALL_PROMPT = `Install the latest unsigned macOS release of Akeru Bot from opencoredev/akeru-bot. Use no other repository or download source. Detect the Mac architecture with uname -m before downloading. Continue only for arm64 and stop for x86_64 or every other architecture because the official release supports Apple silicon only. Download the exact Akeru-Bot-<version>-arm64.dmg asset and SHA256SUMS from the same latest stable vX.Y.Z GitHub release. Require an exact checksum entry for the DMG, verify it with shasum -a 256, and stop on a missing or mismatched checksum. Mount the verified DMG and install Akeru Bot.app in /Applications. Ask only for the native macOS administrator confirmation if /Applications requires it. Remove com.apple.quarantine only from the installed /Applications/Akeru Bot.app. Never disable Gatekeeper or change any system-wide security setting. Launch /Applications/Akeru Bot.app and verify that its process or window exists. Say exactly "${MAC_INSTALL_SUCCESS}" only after the checksum, install, launch, and process or window checks all succeed.`;
+
+export function selectMacInstallAsset(
+ architecture: string,
+ assets: ReadonlyArray<ReleaseAsset>,
+): ReleaseAsset | null {
+ if (architecture !== "arm64") return null;
+ return assets.find((asset) => asset.name.endsWith("-arm64.dmg")) ?? null;
+}
+
+export function checksumForAsset(checksums: string, assetName: string): string | null {
+ for (const line of checksums.split(/\r?\n/)) {
+ const match = /^([a-f\d]{64})[ \t]+\*?(.+)$/i.exec(line);
+ if (match?.[2] === assetName) return match[1]?.toLowerCase() ?? null;
+ }
+ return null;
+}
+
+export function macInstallSuccess(input: {
+ checksumVerified: boolean;
+ installed: boolean;
+ launched: boolean;
+ appVisible: boolean;
+}): string | null {
+ return Object.values(input).every(Boolean) ? MAC_INSTALL_SUCCESS : null;
+}
diff --git a/apps/marketing/src/lib/releases.test.ts b/apps/marketing/src/lib/releases.test.ts
new file mode 100644
index 000000000..2f0c88c43
--- /dev/null
+++ b/apps/marketing/src/lib/releases.test.ts
@@ -0,0 +1,141 @@
+import * as NodeAssert from "node:assert/strict";
+import { describe, it } from "vite-plus/test";
+
+import {
+ blockDownloadUntilResolved,
+ detectDownloadTarget,
+ RELEASES_URL,
+ requiresUnsignedInstall,
+ resolveAssetDownload,
+ selectReleaseAsset,
+ type Release,
+} from "./releases";
+
+const release = {
+ tag_name: "v1.2.3",
+ html_url: "https://github.com/opencoredev/akeru-bot/releases/tag/v1.2.3",
+ assets: [
+ {
+ name: "Akeru-Bot-1.2.3-arm64.dmg",
+ browser_download_url: "https://downloads.example/mac",
+ },
+ {
+ name: "Akeru-Bot-1.2.3-x64.exe",
+ browser_download_url: "https://downloads.example/windows",
+ },
+ {
+ name: "Akeru-Bot-1.2.3-x64.AppImage",
+ browser_download_url: "https://downloads.example/linux",
+ },
+ ],
+} satisfies Release;
+
+describe("release downloads", () => {
+ it("selects safe assets for supported platforms", () => {
+ const cases = [
+ ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "arm64.dmg", "mac"],
+ ["Mozilla/5.0 (Windows NT 10.0; Win64; x64)", "x64.exe", "win"],
+ ["Mozilla/5.0 (X11; Linux x86_64)", "x64.AppImage", "linux"],
+ ] as const;
+
+ for (const [userAgent, suffix, os] of cases) {
+ const target = detectDownloadTarget(userAgent);
+ NodeAssert.equal(target?.os, os);
+ NodeAssert.equal(target?.assetSuffix, suffix);
+ NodeAssert.equal(
+ selectReleaseAsset(release, suffix)?.browser_download_url,
+ release.assets.find((asset) => asset.name.endsWith(suffix))?.browser_download_url,
+ );
+ }
+ });
+
+ it("does not advertise macOS Intel or unknown systems", () => {
+ NodeAssert.equal(detectDownloadTarget("Macintosh; Intel Mac OS X")?.assetSuffix, "arm64.dmg");
+ NodeAssert.equal(detectDownloadTarget("Mozilla/5.0 (Android 16)"), null);
+ });
+
+ it("blocks a fast click until the primary download resolves", () => {
+ class Link extends EventTarget {
+ href = "https://wrong.example";
+ attributes = new Map<string, string>();
+ removeAttribute(name: string) {
+ this.attributes.delete(name);
+ if (name === "href") this.href = "";
+ }
+ setAttribute(name: string, value: string) {
+ this.attributes.set(name, value);
+ }
+ }
+
+ const link = new Link();
+ const resolve = blockDownloadUntilResolved(link);
+ const pendingClick = new Event("click", { cancelable: true });
+ link.dispatchEvent(pendingClick);
+ NodeAssert.equal(pendingClick.defaultPrevented, true);
+ NodeAssert.equal(link.attributes.get("aria-disabled"), "true");
+
+ resolve("https://downloads.example/mac");
+ const readyClick = new Event("click", { cancelable: true });
+ link.dispatchEvent(readyClick);
+ NodeAssert.equal(readyClick.defaultPrevented, false);
+ NodeAssert.equal(link.href, "https://downloads.example/mac");
+ });
+
+ it("uses one resolver for direct assets and fallback links", async () => {
+ class Link extends EventTarget {
+ href = RELEASES_URL;
+ attributes = new Map<string, string>();
+ removeAttribute(name: string) {
+ this.attributes.delete(name);
+ if (name === "href") this.href = "";
+ }
+ setAttribute(name: string, value: string) {
+ this.attributes.set(name, value);
+ }
+ }
+
+ let finishRelease!: (value: Release) => void;
+ const pendingRelease = new Promise<Release>((resolve) => {
+ finishRelease = resolve;
+ });
+ const link = new Link();
+ const resolving = resolveAssetDownload(link, "x64.exe", pendingRelease);
+ const pendingClick = new Event("click", { cancelable: true });
+ link.dispatchEvent(pendingClick);
+ NodeAssert.equal(pendingClick.defaultPrevented, true);
+ NodeAssert.equal(link.attributes.get("aria-disabled"), "true");
+
+ finishRelease(release);
+ NodeAssert.equal(await resolving, release.assets[1]);
+ NodeAssert.equal(link.href, "https://downloads.example/windows");
+
+ const fallback = new Link();
+ NodeAssert.equal(
+ await resolveAssetDownload(fallback, "x64.exe", Promise.reject(new Error("offline"))),
+ null,
+ );
+ NodeAssert.equal(fallback.href, RELEASES_URL);
+ NodeAssert.equal(fallback.attributes.has("aria-disabled"), false);
+ });
+
+ it("accepts only the exact asset for the stable tag", () => {
+ NodeAssert.equal(selectReleaseAsset(release, "arm64.dmg"), release.assets[0]);
+ NodeAssert.equal(
+ selectReleaseAsset(
+ {
+ ...release,
+ assets: [{ name: "Akeru-Bot-preview-1.2.3-arm64.dmg", browser_download_url: "bad" }],
+ },
+ "arm64.dmg",
+ ),
+ null,
+ );
+ NodeAssert.equal(selectReleaseAsset({ ...release, tag_name: "preview" }, "arm64.dmg"), null);
+ });
+
+ it("prompts only for unsigned Windows and Linux artifacts", () => {
+ NodeAssert.equal(requiresUnsignedInstall("arm64.dmg"), false);
+ NodeAssert.equal(requiresUnsignedInstall("x64.exe"), true);
+ NodeAssert.equal(requiresUnsignedInstall("x64.AppImage"), true);
+ });
+});
diff --git a/apps/marketing/src/lib/releases.ts b/apps/marketing/src/lib/releases.ts
index c05030f75..611abe426 100644
--- a/apps/marketing/src/lib/releases.ts
+++ b/apps/marketing/src/lib/releases.ts
@@ -16,15 +16,126 @@ export interface Release {
assets: ReleaseAsset[];
}
+export type DownloadTarget = {
+ os: "mac" | "win" | "linux";
+ label: string;
+ assetSuffix: string;
+ unsigned: boolean;
+};
+
+const TARGETS = {
+ mac: {
+ os: "mac",
+ label: "Download for macOS",
+ assetSuffix: "arm64.dmg",
+ unsigned: false,
+ },
+ win: {
+ os: "win",
+ label: "Download for Windows",
+ assetSuffix: "x64.exe",
+ unsigned: true,
+ },
+ linux: {
+ os: "linux",
+ label: "Download for Linux",
+ assetSuffix: "x64.AppImage",
+ unsigned: true,
+ },
+} as const satisfies Record<string, DownloadTarget>;
+
+export function detectDownloadTarget(userAgent: string): DownloadTarget | null {
+ if (/Windows/i.test(userAgent)) return TARGETS.win;
+ if (/Macintosh|Mac OS X/i.test(userAgent)) return TARGETS.mac;
+ if (/Linux/i.test(userAgent)) return TARGETS.linux;
+ return null;
+}
+
+export function selectReleaseAsset(release: Release, assetSuffix: string): ReleaseAsset | null {
+ const version = /^v(\d+\.\d+\.\d+)$/.exec(release.tag_name)?.[1];
+ if (!version) return null;
+
+ const assetName = `Akeru-Bot-${version}-${assetSuffix}`;
+ return release.assets.find((asset) => asset.name === assetName) ?? null;
+}
+
+export function requiresUnsignedInstall(assetSuffix: string): boolean {
+ return assetSuffix === TARGETS.win.assetSuffix || assetSuffix === TARGETS.linux.assetSuffix;
+}
+
+type DownloadLink = EventTarget & {
+ href: string;
+ removeAttribute(name: string): void;
+ setAttribute(name: string, value: string): void;
+};
+
+export function blockDownloadUntilResolved(link: DownloadLink): (url: string) => void {
+ const blockClick = (event: Event) => event.preventDefault();
+ link.removeAttribute("href");
+ link.setAttribute("aria-disabled", "true");
+ link.addEventListener("click", blockClick);
+
+ return (url) => {
+ link.href = url;
+ link.removeAttribute("aria-disabled");
+ link.removeEventListener("click", blockClick);
+ };
+}
+
+export async function resolveAssetDownload(
+ link: DownloadLink,
+ assetSuffix: string,
+ release: Promise<Release> = fetchLatestRelease(),
+): Promise<ReleaseAsset | null> {
+ const resolve = blockDownloadUntilResolved(link);
+
+ try {
+ const asset = selectReleaseAsset(await release, assetSuffix);
+ resolve(asset?.browser_download_url ?? RELEASES_URL);
+ return asset;
+ } catch {
+ resolve(RELEASES_URL);
+ return null;
+ }
+}
+
export async function fetchLatestRelease(): Promise<Release> {
const cached = sessionStorage.getItem(CACHE_KEY);
- if (cached) return JSON.parse(cached);
+ if (cached) {
+ try {
+ const data: unknown = JSON.parse(cached);
+ if (isRelease(data)) return data;
+ sessionStorage.removeItem(CACHE_KEY);
+ } catch {
+ sessionStorage.removeItem(CACHE_KEY);
+ }
+ }
- const data = await fetch(API_URL).then((r) => r.json());
+ const response = await fetch(API_URL);
+ if (!response.ok) throw new Error(`GitHub release request failed: ${response.status}`);
- if (data?.assets) {
- sessionStorage.setItem(CACHE_KEY, JSON.stringify(data));
- }
+ const data: unknown = await response.json();
+ if (!isRelease(data)) throw new Error("GitHub returned an invalid release");
+
+ sessionStorage.setItem(CACHE_KEY, JSON.stringify(data));
return data;
}
+
+function isRelease(value: unknown): value is Release {
+ if (!value || typeof value !== "object") return false;
+ const release = value as Record<string, unknown>;
+ return (
+ typeof release.tag_name === "string" &&
+ /^v\d+\.\d+\.\d+$/.test(release.tag_name) &&
+ typeof release.html_url === "string" &&
+ Array.isArray(release.assets) &&
+ release.assets.every(
+ (asset) =>
+ asset &&
+ typeof asset === "object" &&
+ typeof asset.name === "string" &&
+ typeof asset.browser_download_url === "string",
+ )
+ );
+}
diff --git a/apps/marketing/src/pages/download.astro b/apps/marketing/src/pages/download.astro
index ed1f3d54a..9271c0720 100644
--- a/apps/marketing/src/pages/download.astro
+++ b/apps/marketing/src/pages/download.astro
@@ -47,7 +47,7 @@ import { RELEASES_URL } from "../lib/releases";
<h2 class="platform-name">Linux</h2>
</div>
<div class="download-cards">
- <a class="download-card" data-asset="x86_64.AppImage" href={RELEASES_URL}>
+ <a class="download-card" data-asset="x64.AppImage" href={RELEASES_URL}>
<span class="card-arch">x86_64</span>
<span class="card-format">AppImage</span>
</a>
@@ -57,24 +57,38 @@ import { RELEASES_URL } from "../lib/releases";
</div>
<p class="releases-link">
- Looking for older versions? Check the{" "}
+ Looking for another version?{" "}
<a href={RELEASES_URL} target="_blank" rel="noopener noreferrer">
- GitHub releases page<span aria-hidden="true"> &#8599;</span>
+ All downloads<span aria-hidden="true"> &#8599;</span>
</a>
</p>
</div>
</Layout>
<script>
- import { fetchLatestRelease, RELEASES_URL } from "../lib/releases";
+ import {
+ fetchLatestRelease,
+ requiresUnsignedInstall,
+ resolveAssetDownload,
+ } from "../lib/releases";
+
+ const UNSIGNED_PROMPT =
+ "This build is unsigned. Your system may ask you to confirm the install. Continue?";
async function init() {
const versionLabel = document.getElementById("version-label");
// Only release-asset links; mobile store cards have no data-asset and keep their href.
const cards = document.querySelectorAll<HTMLAnchorElement>("a[data-asset]");
+ const releasePromise = fetchLatestRelease();
+ const cardDownloads = Array.from(cards, async (card) => {
+ const suffix = card.dataset.asset;
+ if (!suffix) return;
+ const asset = await resolveAssetDownload(card, suffix, releasePromise);
+ card.dataset.unsigned = asset && requiresUnsignedInstall(suffix) ? "true" : "";
+ });
try {
- const release = await fetchLatestRelease();
+ const release = await releasePromise;
if (versionLabel && release.tag_name) {
versionLabel.textContent = `Latest (${release.tag_name})`;
@@ -86,25 +100,18 @@ import { RELEASES_URL } from "../lib/releases";
changelogLink.style.display = "";
}
- cards.forEach((card) => {
- const suffix = card.dataset.asset;
- if (!suffix) return;
-
- const match = (release.assets ?? []).find((a) => a.name.endsWith(`-${suffix}`));
- if (match) {
- card.href = match.browser_download_url;
- } else {
- card.href = RELEASES_URL;
- }
- });
} catch {
if (versionLabel) {
versionLabel.textContent = "Could not load release info.";
}
- cards.forEach((card) => {
- card.href = RELEASES_URL;
- });
}
+ await Promise.all(cardDownloads);
+
+ document.querySelectorAll<HTMLAnchorElement>("a[data-unsigned='true']").forEach((link) => {
+ link.addEventListener("click", (event) => {
+ if (!window.confirm(UNSIGNED_PROMPT)) event.preventDefault();
+ });
+ });
}
init();
diff --git a/apps/marketing/src/pages/index.astro b/apps/marketing/src/pages/index.astro
index e010db834..57f9f63e0 100644
--- a/apps/marketing/src/pages/index.astro
+++ b/apps/marketing/src/pages/index.astro
@@ -1,6 +1,6 @@
---
import Layout from "../layouts/Layout.astro";
-import { GITHUB_REPOSITORY_URL, docsUrl } from "../lib/site";
+import { docsUrl } from "../lib/site";
import { RELEASES_URL } from "../lib/releases";
// Stroke icons are Hugeicons outlines drawn on a 24x24 grid.
@@ -64,7 +64,7 @@ const LINUX_MARK = `<path fill-rule="evenodd" clip-rule="evenodd" d="M9.8 18.2C8
const platforms = [
{ os: "mac", name: "macOS", detail: "Apple silicon · DMG", mark: APPLE_MARK, asset: "arm64.dmg" },
{ os: "win", name: "Windows", detail: "x64 · Installer", mark: WINDOWS_MARK, asset: "x64.exe" },
- { os: "linux", name: "Linux", detail: "x64 · AppImage", mark: LINUX_MARK, asset: "x86_64.AppImage" },
+ { os: "linux", name: "Linux", detail: "x64 · AppImage", mark: LINUX_MARK, asset: "x64.AppImage", unsigned: true },
];
const DOWNLOAD_GLYPH = `<path d="M7 11.5L12 17.5L17 11.5H14L14 3H10L10 11.5H7Z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square" />
@@ -81,7 +81,7 @@ const DOWNLOAD_GLYPH = `<path d="M7 11.5L12 17.5L17 11.5H14L14 3H10L10 11.5H7Z"
subscription, on your machine or a cloud sandbox.
</p>
<div class="hero-actions">
- <a id="download-btn" class="btn-primary" data-os="mac" href={RELEASES_URL}>
+ <a id="download-btn" class="btn-primary" data-os="mac" aria-disabled="true">
<svg class="os-mark" data-os="mac" width="17" height="17" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" set:html={APPLE_MARK} />
<svg class="os-mark" data-os="win" width="17" height="17" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" set:html={WINDOWS_MARK} />
<svg class="os-mark" data-os="linux" width="17" height="17" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" set:html={LINUX_MARK} />
@@ -95,6 +95,9 @@ const DOWNLOAD_GLYPH = `<path d="M7 11.5L12 17.5L17 11.5H14L14 3H10L10 11.5H7Z"
<span>Read the docs</span>
</a>
</div>
+ <aside id="install-notice" class="install-notice" hidden>
+ <button id="copy-install-prompt" type="button">Copy verified install prompt</button>
+ </aside>
</div>
<div class="hero-shot">
<img
@@ -175,62 +178,77 @@ const DOWNLOAD_GLYPH = `<path d="M7 11.5L12 17.5L17 11.5H14L14 3H10L10 11.5H7Z"
))
}
</div>
- <a class="btn-outline" href={GITHUB_REPOSITORY_URL} target="_blank" rel="noopener noreferrer">
- View on GitHub
+ <a class="btn-outline" href={RELEASES_URL} target="_blank" rel="noopener noreferrer">
+ All downloads
</a>
</div>
</section>
</Layout>
<script>
- import { fetchLatestRelease, RELEASES_URL, type ReleaseAsset } from "../lib/releases";
-
- type Platform = { os: "mac" | "win" | "linux"; label: string; asset: string };
-
- function detectPlatform(): Platform | null {
- const ua = navigator.userAgent;
- if (/Win/i.test(ua)) return { os: "win", label: "Download for Windows", asset: "x64.exe" };
- if (/Mac/i.test(ua)) return { os: "mac", label: "Download for macOS", asset: "arm64.dmg" };
- if (/Linux/i.test(ua)) return { os: "linux", label: "Download for Linux", asset: "x86_64.AppImage" };
- return null;
- }
-
- function assetUrl(assets: ReleaseAsset[], suffix: string): string | null {
- return assets.find((a) => a.name.endsWith(`-${suffix}`))?.browser_download_url ?? null;
- }
+ import { installPromptForPlatform } from "../lib/installPrompt";
+ import {
+ detectDownloadTarget,
+ fetchLatestRelease,
+ RELEASES_URL,
+ requiresUnsignedInstall,
+ resolveAssetDownload,
+ } from "../lib/releases";
+
+ const UNSIGNED_PROMPT =
+ "This build is unsigned. Your system may ask you to confirm the install. Continue?";
async function init() {
const button = document.getElementById("download-btn") as HTMLAnchorElement | null;
const label = document.getElementById("download-label");
const cards = document.querySelectorAll<HTMLAnchorElement>("a[data-asset]");
+ const installNotice = document.getElementById("install-notice");
+ const copyPrompt = document.getElementById("copy-install-prompt") as HTMLButtonElement | null;
// Macs always get the arm64 build. Browsers cannot reliably tell Apple Silicon
// from Intel (the UA lies, GPU strings lie), and the release workflow ships no
// Intel build. Do NOT add arch detection here.
- const platform = detectPlatform();
+ const platform = detectDownloadTarget(navigator.userAgent);
if (platform) {
if (label) label.textContent = platform.label;
- if (button) button.dataset.os = platform.os;
+ if (button) {
+ button.dataset.os = platform.os;
+ button.dataset.asset = platform.assetSuffix;
+ }
+ const prompt = installPromptForPlatform(platform.os);
+ installNotice?.toggleAttribute("hidden", !prompt);
+ copyPrompt?.addEventListener("click", async () => {
+ if (!prompt) return;
+ await navigator.clipboard.writeText(prompt);
+ copyPrompt.textContent = "Copied";
+ });
+ } else if (button && label) {
+ label.textContent = "All downloads";
+ button.href = RELEASES_URL;
+ button.removeAttribute("aria-disabled");
}
- try {
- const release = await fetchLatestRelease();
- const assets = release.assets ?? [];
-
- if (button && platform) {
- button.href = assetUrl(assets, platform.asset) ?? RELEASES_URL;
- }
+ const release = fetchLatestRelease();
+ const cardDownloads = Array.from(cards, async (card) => {
+ const suffix = card.dataset.asset;
+ if (!suffix || card === button) return;
+ const asset = await resolveAssetDownload(card, suffix, release);
+ card.dataset.unsigned = asset && requiresUnsignedInstall(suffix) ? "true" : "";
+ });
+
+ if (button && platform) {
+ const asset = await resolveAssetDownload(button, platform.assetSuffix, release);
+ button.dataset.unsigned = asset && platform.unsigned ? "true" : "";
+ if (!asset && label) label.textContent = "All downloads";
+ if (!asset) installNotice?.setAttribute("hidden", "");
+ }
+ await Promise.all(cardDownloads);
- cards.forEach((card) => {
- const suffix = card.dataset.asset;
- card.href = (suffix && assetUrl(assets, suffix)) || RELEASES_URL;
- });
- } catch {
- if (button) button.href = RELEASES_URL;
- cards.forEach((card) => {
- card.href = RELEASES_URL;
+ document.querySelectorAll<HTMLAnchorElement>("a[data-unsigned='true']").forEach((link) => {
+ link.addEventListener("click", (event) => {
+ if (!window.confirm(UNSIGNED_PROMPT)) event.preventDefault();
});
- }
+ });
}
init();
diff --git a/apps/mobile/README.md b/apps/mobile/README.md
index 86b163e37..cd2058822 100644
--- a/apps/mobile/README.md
+++ b/apps/mobile/README.md
@@ -1,82 +1,99 @@
-# Akeru Bot Mobile
+# T3 Code Mobile
-Akeru Bot Mobile is the React Native client for iOS and Android. It connects directly to an Akeru
-Bot server through pairing, a saved bearer connection, LAN access, or Tailscale.
+> [!WARNING]
+> T3 Code Mobile is currently in development and is not distributed yet. If you want to try it out, you can build it from source.
-## Requirements
+## Quickstart
-The app uses native modules and does not run in Expo Go. Use the Expo development client.
+> [!NOTE]
+> Uses native modules so using Expo Go is not supported. You need to use the Expo Dev Client.
+
+This app has two variants:
+
+- `development`: Expo dev client, installable side-by-side as `T3 Code Dev`
+- `production`: store/release build as `T3 Code`
Run commands from `apps/mobile`.
+T3 Connect is optional and disabled in a fresh clone. Public configuration belongs in the
+repository-root `.env` or `.env.local`, not an `apps/mobile/.env` file. See
+[`../../.env.example`](../../.env.example).
+
## Development
-Start Metro:
+Start Metro for the dev client:
```bash
vp run dev:client
```
-Build and run the local iOS development app:
+Build and run the local iOS dev client:
```bash
vp run ios:dev
```
-Build a self-contained iOS release app:
+If your Xcode account only has a Personal Team, use a bundle identifier you control and opt into the
+reduced-capability local build. Personal Team builds omit the widget and share extensions, push
+entitlement, and native Sign in with Apple entitlement; builds without this opt-in are unchanged.
```bash
-vp run ios:release
+T3CODE_IOS_PERSONAL_TEAM=1 \
+T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID=com.example.t3code.dev \
+vp run ios:dev
```
-Build the local preview app:
+Build and install a self-contained Release app that does not need Metro:
```bash
-vp run ios:preview
+vp run ios:release
```
-A Personal Team build needs a bundle identifier that you control:
+The Personal Team equivalent also needs a unique bundle identifier:
```bash
T3CODE_IOS_PERSONAL_TEAM=1 \
-T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID=com.example.akeru.dev \
-vp run ios:dev
+T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID=com.example.t3code \
+vp run ios:release
```
-Personal Team builds omit extensions and entitlements that require a paid Apple Developer account.
+Force the review diff highlighter engine:
-## Configuration
+```bash
+EXPO_PUBLIC_REVIEW_HIGHLIGHTER_ENGINE=javascript vp run ios:dev
+```
+
+`javascript` is the default and recommended setting for the review diff screen. Set `EXPO_PUBLIC_REVIEW_HIGHLIGHTER_ENGINE=native` only when you explicitly want to test the native Shiki engine.
-Inspect the resolved Expo configuration:
+Inspect the resolved Expo config for a variant:
```bash
vp run config:dev
-vp run config:preview
+vp run config:prod
```
-The JavaScript review highlighter is the default. Set
-`EXPO_PUBLIC_REVIEW_HIGHLIGHTER_ENGINE=native` only when testing the native engine.
-
-Run native static checks:
+Run static checks for mobile native code:
```bash
node ../../scripts/mobile-native-static-check.ts
```
-The task runs SwiftLint, ktlint, and detekt when those tools are installed.
+The native lint task runs SwiftLint for Swift plus ktlint and detekt for Kotlin. Missing native tools are reported as warnings and skipped locally. CI installs the default toolset from `apps/mobile/Brewfile` before running the native checks.
-## EAS builds
+## EAS Builds
-CI can use Expo fingerprinting to reuse compatible preview builds. Manual commands are:
+For the production EAS environment, set `T3CODE_CLERK_PUBLISHABLE_KEY`,
+`T3CODE_CLERK_JWT_TEMPLATE`, and `T3CODE_RELAY_URL`
+as EAS environment variables. Expo config maps the canonical values into the mobile build.
+
+Create a cloud dev-client build:
```bash
-vp run eas:ios:preview:dev
vp run eas:ios:dev
-vp run eas:ios:preview
-vp run eas:android:dev
-vp run eas:android:preview:dev
-vp run eas:android:preview
```
-No hosted account or hosted transport configuration is required. The app stores saved
-environment records on the device and connects to each server directly.
+Android equivalents:
+
+```bash
+vp run eas:android:dev
+```
diff --git a/apps/mobile/app.config.ts b/apps/mobile/app.config.ts
index 5cbc4ce63..8e1c8e592 100644
--- a/apps/mobile/app.config.ts
+++ b/apps/mobile/app.config.ts
@@ -3,7 +3,7 @@ import type { ExpoConfig } from "expo/config";
import { BRAND_ASSET_PATHS } from "../../scripts/lib/brand-assets.ts";
import { loadRepoEnv } from "../../scripts/lib/public-config.ts";
-type AppVariant = "development" | "preview" | "production";
+type AppVariant = "development" | "production";
const repoEnv = loadRepoEnv();
Object.assign(process.env, repoEnv);
@@ -37,17 +37,6 @@ const DEVELOPMENT_ASSETS = {
androidNotificationColor: "#00639B",
} as const;
-const PREVIEW_ASSETS = {
- appIcon: fromRepoRoot(BRAND_ASSET_PATHS.nightlyIosIconPng),
- iosIcon: fromRepoRoot(BRAND_ASSET_PATHS.nightlyIconComposerProject),
- splashIcon: fromRepoRoot(BRAND_ASSET_PATHS.nightlyIosIconPng),
- androidAdaptiveForeground: fromRepoRoot(BRAND_ASSET_PATHS.nightlyLinuxIconPng),
- androidAdaptiveBackgroundColor: "#111533",
- androidMonochromeIcon: "./assets/android-icon-mark.png",
- androidNotificationIcon: "./assets/android-notification-icon.png",
- androidNotificationColor: "#7565C7",
-} as const;
-
const RELEASE_ASSETS = {
appIcon: fromRepoRoot(BRAND_ASSET_PATHS.productionIosIconPng),
iosIcon: fromRepoRoot(BRAND_ASSET_PATHS.productionIconComposerProject),
@@ -67,13 +56,6 @@ const VARIANT_CONFIG = {
androidPackage: "com.t3tools.t3code.dev",
assets: DEVELOPMENT_ASSETS,
},
- preview: {
- appName: "T3 Code Preview",
- scheme: "t3code-preview",
- iosBundleIdentifier: "com.t3tools.t3code.preview",
- androidPackage: "com.t3tools.t3code.preview",
- assets: PREVIEW_ASSETS,
- },
production: {
appName: "T3 Code",
scheme: "t3code",
@@ -86,7 +68,6 @@ const VARIANT_CONFIG = {
function resolveAppVariant(value: string | undefined): AppVariant {
switch (value) {
case "development":
- case "preview":
case "production":
return value;
default:
diff --git a/apps/mobile/eas.json b/apps/mobile/eas.json
index a1d315b7e..68a274d17 100644
--- a/apps/mobile/eas.json
+++ b/apps/mobile/eas.json
@@ -15,31 +15,6 @@
"developmentClient": true,
"distribution": "internal"
},
- "preview": {
- "corepack": true,
- "env": {
- "APP_VARIANT": "preview",
- "NODE_OPTIONS": "--max-old-space-size=4096"
- },
- "channel": "preview",
- "environment": "preview",
- "distribution": "internal"
- },
- "preview:dev": {
- "corepack": true,
- "env": {
- "APP_VARIANT": "preview",
- "MOBILE_VERSION_POLICY": "fingerprint",
- "NODE_OPTIONS": "--max-old-space-size=4096"
- },
- "channel": "preview",
- "environment": "preview",
- "developmentClient": true,
- "distribution": "internal",
- "android": {
- "buildType": "apk"
- }
- },
"production": {
"corepack": true,
"env": {
diff --git a/apps/mobile/package.json b/apps/mobile/package.json
index cc4797366..738a8b440 100644
--- a/apps/mobile/package.json
+++ b/apps/mobile/package.json
@@ -6,36 +6,25 @@
"scripts": {
"dev": "expo start --clear",
"dev:client": "APP_VARIANT=development expo start --dev-client --scheme t3code-dev --clear --lan",
- "dev:client:preview": "eas env:exec preview 'EXPO_NO_DOTENV=1 APP_VARIANT=preview expo start --dev-client --scheme t3code-preview --clear --lan'",
"start": "expo start",
"start:dev": "APP_VARIANT=development expo start",
- "start:preview": "APP_VARIANT=preview expo start",
"start:prod": "APP_VARIANT=production expo start",
"showcase": "APP_VARIANT=production EXPO_PUBLIC_SHOWCASE=1 expo start --dev-client --scheme t3code --clear",
"screenshots": "node ../../scripts/mobile-showcase.ts",
"android": "EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform android && expo run:android",
"android:dev": "APP_VARIANT=development EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform android && REACT_NATIVE_PACKAGER_HOSTNAME=localhost expo run:android",
- "android:preview": "APP_VARIANT=preview EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform android && expo run:android",
"android:prod": "APP_VARIANT=production EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform android && expo run:android",
"eas:android:dev": "eas build --profile development -p android",
- "eas:android:preview": "eas build --profile preview -p android",
- "eas:android:preview:dev": "eas build --profile preview:dev -p android",
"eas:android:prod": "eas build --profile production -p android",
"ios": "EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform ios && expo run:ios",
"ios:dev": "APP_VARIANT=development EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform ios && expo run:ios",
- "ios:preview": "APP_VARIANT=preview EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform ios && expo run:ios",
"ios:prod": "APP_VARIANT=production EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform ios && expo run:ios",
"ios:release": "APP_VARIANT=production EXPO_NO_GIT_STATUS=1 expo prebuild --clean --platform ios && expo run:ios --configuration Release --no-bundler",
"eas:ios:dev": "eas build --profile development -p ios",
- "eas:ios:preview": "eas build --profile preview -p ios",
- "eas:ios:preview:dev": "eas build --profile preview:dev -p ios",
"eas:ios:prod": "eas build --profile production -p ios",
"eas:dev": "eas build --profile development",
- "eas:preview": "eas build --profile preview",
- "eas:preview:dev": "eas build --profile preview:dev",
"eas:prod": "eas build --profile production",
"config:dev": "APP_VARIANT=development expo config",
- "config:preview": "APP_VARIANT=preview expo config",
"config:prod": "APP_VARIANT=production expo config",
"profile:android:hermes": "mkdir -p profiles/review && react-native profile-hermes profiles/review",
"sync:pierre-icons": "node modules/t3-markdown-text/scripts/sync-pierre-file-icons.mjs",
diff --git a/apps/mobile/src/App.tsx b/apps/mobile/src/App.tsx
index a34e2c448..7eedc5303 100644
--- a/apps/mobile/src/App.tsx
+++ b/apps/mobile/src/App.tsx
@@ -35,7 +35,7 @@ void SplashScreen.preventAutoHideAsync().catch(() => {
});
const appLinking = {
- prefixes: [Linking.createURL("/"), "t3code://", "t3code-dev://", "t3code-preview://"],
+ prefixes: [Linking.createURL("/"), "t3code://", "t3code-dev://"],
// The Expo dev client launches the app via
// <scheme>://expo-development-client/?url=<packager> — that URL addresses
// the launcher, not app navigation. Without this filter it falls through
diff --git a/apps/mobile/src/components/BrandMark.tsx b/apps/mobile/src/components/BrandMark.tsx
index c8f1d4385..af11db02a 100644
--- a/apps/mobile/src/components/BrandMark.tsx
+++ b/apps/mobile/src/components/BrandMark.tsx
@@ -8,11 +8,8 @@ const appVariant = Constants.expoConfig?.extra?.appVariant;
const BRAND_MARK_SOURCE =
appVariant === "development"
? require("../../../../assets/dev/blueprint-ios-1024.png")
- : appVariant === "preview"
- ? require("../../../../assets/nightly/nightly-ios-1024.png")
- : require("../../../../assets/prod/black-ios-1024.png");
-const DEFAULT_STAGE_LABEL =
- appVariant === "development" ? "Dev" : appVariant === "preview" ? "Preview" : "Alpha";
+ : require("../../../../assets/prod/black-ios-1024.png");
+const DEFAULT_STAGE_LABEL = appVariant === "development" ? "Dev" : "Alpha";
export function BrandMark(props: { readonly compact?: boolean; readonly stageLabel?: string }) {
const compact = props.compact ?? false;
diff --git a/apps/mobile/src/lib/mobileBranding.test.ts b/apps/mobile/src/lib/mobileBranding.test.ts
index 48a84b3f9..d082c8f92 100644
--- a/apps/mobile/src/lib/mobileBranding.test.ts
+++ b/apps/mobile/src/lib/mobileBranding.test.ts
@@ -5,7 +5,6 @@ import { resolveMobileStageLabel } from "./mobileBranding";
describe("resolveMobileStageLabel", () => {
it.each([
["development", "Dev"],
- ["preview", "Nightly"],
["production", "Alpha"],
[undefined, "Alpha"],
])("maps %s builds to %s", (appVariant, expected) => {
diff --git a/apps/mobile/src/lib/mobileBranding.ts b/apps/mobile/src/lib/mobileBranding.ts
index 9fd602083..20e86dfc1 100644
--- a/apps/mobile/src/lib/mobileBranding.ts
+++ b/apps/mobile/src/lib/mobileBranding.ts
@@ -1,7 +1,6 @@
-export type MobileStageLabel = "Alpha" | "Dev" | "Nightly";
+export type MobileStageLabel = "Alpha" | "Dev";
export function resolveMobileStageLabel(appVariant: unknown): MobileStageLabel {
if (appVariant === "development") return "Dev";
- if (appVariant === "preview") return "Nightly";
return "Alpha";
}
diff --git a/apps/server/scripts/cli.ts b/apps/server/scripts/cli.ts
index 2de5b702a..b8fcc40e8 100644
--- a/apps/server/scripts/cli.ts
+++ b/apps/server/scripts/cli.ts
@@ -190,7 +190,7 @@ const createVpPmPublishArgs = (config: PublishCommandConfig): ReadonlyArray<stri
const args = [
"publish",
"--filter",
- "t3",
+ "akeru-bot",
"--access",
config.access,
"--tag",
diff --git a/apps/server/src/cli/invocation.test.ts b/apps/server/src/cli/invocation.test.ts
index fea417f93..3e985029f 100644
--- a/apps/server/src/cli/invocation.test.ts
+++ b/apps/server/src/cli/invocation.test.ts
@@ -54,8 +54,8 @@ it("treats stable installs as direct invocations", () => {
assert.isNull(detectCliRunner(""));
});
-it("re-suggests the nightly channel only for nightly builds", () => {
- assert.equal(suggestedPackageSpec("0.0.31-nightly.20260729"), "akeru-bot@nightly");
+it("suggests the stable package for every installed version", () => {
+ assert.equal(suggestedPackageSpec("0.0.31-nightly.20260729"), "akeru-bot");
assert.equal(suggestedPackageSpec("0.0.31"), "akeru-bot");
});
@@ -66,7 +66,7 @@ it("formats serve suggestions to match the launching command", () => {
entryPath: "/home/leo/.npm/_npx/abc/node_modules/akeru-bot/dist/bin.mjs",
version: "0.0.31-nightly.20260729",
}),
- "npx akeru-bot@nightly serve",
+ "npx akeru-bot serve",
);
assert.equal(
formatCliCommand({
diff --git a/apps/server/src/cli/invocation.ts b/apps/server/src/cli/invocation.ts
index 53b02e293..73df451b5 100644
--- a/apps/server/src/cli/invocation.ts
+++ b/apps/server/src/cli/invocation.ts
@@ -38,19 +38,17 @@ export function detectCliRunner(entryPath: string): CliRunner | null {
/**
* The `akeru-bot` package spec to suggest. The literal spec the user typed
- * (for example, `akeru-bot@nightly`) is resolved away before our process
- * starts, so re-derive it from the running version. Nightly builds re-suggest
- * the nightly channel. Anything else suggests the bare package.
+ * is resolved away before our process starts, so re-derive it from the
+ * running version.
*/
export function suggestedPackageSpec(version: string): string {
- return version.includes("-nightly.") ? "akeru-bot@nightly" : "akeru-bot";
+ return "akeru-bot";
}
/**
* Render an `akeru <subcommand>` suggestion that matches how this process was
- * launched, so copy/pasting it works. An `npx akeru-bot pair` launch suggests
- * `npx akeru-bot serve`, a global install suggests `akeru serve`, and a nightly
- * build keeps the `@nightly` tag.
+ * launched, so copy/pasting it works. An `npx akeru-bot connect` launch suggests
+ * `npx akeru-bot serve`, and a global install suggests `akeru serve`.
*/
export function formatCliCommand(input: {
readonly subcommand: string;
diff --git a/apps/server/src/cli/triage.ts b/apps/server/src/cli/triage.ts
index e3770e308..e7dae2072 100644
--- a/apps/server/src/cli/triage.ts
+++ b/apps/server/src/cli/triage.ts
@@ -200,9 +200,7 @@ export const triageCommand = Command.make("triage", {
buildTriageContext({
generatedAt: DateTime.formatIso(now),
version,
- releaseTag: version.includes("-nightly.")
- ? `v${version} (nightly build; if this tag does not exist, clone main)`
- : `v${version}`,
+ releaseTag: `v${version}`,
os: `${yield* HostProcessPlatform} ${yield* HostProcessArchitecture} (${NodeOS.release()})`,
nodeVersion: process.version,
launchedAs: yield* resolveCliCommand("triage"),
diff --git a/apps/server/src/cli/triagePrompt.ts b/apps/server/src/cli/triagePrompt.ts
index 1da379c1b..aeb03cab5 100644
--- a/apps/server/src/cli/triagePrompt.ts
+++ b/apps/server/src/cli/triagePrompt.ts
@@ -48,7 +48,7 @@ cache directory named in the context file, one subdirectory per commit hash:
git clone --depth 1 --filter=blob:none --branch <release-tag> \\
https://github.com/opencoredev/akeru-bot <source-cache-dir>/<hash>
-If the tag does not exist (nightly builds), clone \`main\` instead, and treat file
+If the tag does not exist, clone \`main\` instead, and treat file
and line references as approximate: the user's build may not match \`main\`
exactly. If the target directory already exists from an earlier triage run,
reuse it instead of cloning again. Before cloning, delete other entries in the
diff --git a/apps/web/src/branding.logic.ts b/apps/web/src/branding.logic.ts
index 056fbb76e..4c042447a 100644
--- a/apps/web/src/branding.logic.ts
+++ b/apps/web/src/branding.logic.ts
@@ -1,5 +1,3 @@
-const NIGHTLY_SERVER_VERSION_PATTERN = /-nightly\.\d{8}\.\d+$/;
-
export function formatAppDisplayName(input: {
readonly baseName: string;
readonly stageLabel: string;
@@ -15,10 +13,7 @@ export function resolveServerBackedAppStageLabel(input: {
readonly primaryServerVersion: string | null | undefined;
readonly fallbackStageLabel: string;
}): string {
- return input.primaryServerVersion &&
- NIGHTLY_SERVER_VERSION_PATTERN.test(input.primaryServerVersion)
- ? "Nightly"
- : input.fallbackStageLabel;
+ return input.fallbackStageLabel;
}
export function resolveServerBackedAppDisplayName(input: {
diff --git a/apps/web/src/branding.test.ts b/apps/web/src/branding.test.ts
index d71e61a88..e96f40617 100644
--- a/apps/web/src/branding.test.ts
+++ b/apps/web/src/branding.test.ts
@@ -25,9 +25,8 @@ describe("branding", () => {
desktopBridge: {
getAppBranding: () => ({
baseName: "Akeru Bot",
- stageLabel: "Nightly",
- displayName: "Akeru Bot (Nightly)",
- isPackaged: true,
+ stageLabel: "Dev",
+ displayName: "Akeru Bot (Dev)",
}),
},
},
@@ -36,64 +35,12 @@ describe("branding", () => {
const branding = await import("./branding");
expect(branding.APP_BASE_NAME).toBe("Akeru Bot");
- expect(branding.APP_STAGE_LABEL).toBe("Nightly");
- expect(branding.APP_DISPLAY_NAME).toBe("Akeru Bot (Nightly)");
- expect(branding.IS_PACKAGED_DESKTOP).toBe(true);
- });
-
- it("normalizes hosted app channel metadata", async () => {
- vi.stubEnv("VITE_HOSTED_APP_CHANNEL", "nightly");
-
- const branding = await import("./branding");
-
- expect(branding.HOSTED_APP_CHANNEL).toBe("nightly");
- expect(branding.HOSTED_APP_CHANNEL_LABEL).toBe("Nightly");
- expect(branding.APP_STAGE_LABEL).toBe("Nightly");
- expect(branding.APP_DISPLAY_NAME).toBe("Akeru Bot (Nightly)");
- });
-
- it("does not label the latest hosted app channel", async () => {
- vi.stubEnv("VITE_HOSTED_APP_CHANNEL", "latest");
-
- const branding = await import("./branding");
-
- expect(branding.HOSTED_APP_CHANNEL).toBe("latest");
- expect(branding.HOSTED_APP_CHANNEL_LABEL).toBe("Latest");
- expect(branding.APP_STAGE_LABEL).toBe("Latest");
- expect(branding.APP_DISPLAY_NAME).toBe("Akeru Bot");
- });
-
- it("ignores unknown hosted app channels", async () => {
- vi.stubEnv("VITE_HOSTED_APP_CHANNEL", "preview");
-
- const branding = await import("./branding");
-
- expect(branding.HOSTED_APP_CHANNEL).toBeNull();
- expect(branding.HOSTED_APP_CHANNEL_LABEL).toBeNull();
+ expect(branding.APP_STAGE_LABEL).toBe("Dev");
+ expect(branding.APP_DISPLAY_NAME).toBe("Akeru Bot (Dev)");
});
});
describe("branding logic", () => {
- it("returns Nightly for nightly primary server versions", () => {
- expect(
- resolveServerBackedAppStageLabel({
- primaryServerVersion: "0.0.28-nightly.20260616.12",
- fallbackStageLabel: "Alpha",
- }),
- ).toBe("Nightly");
- });
-
- it("updates the display name for nightly primary server versions", () => {
- expect(
- resolveServerBackedAppDisplayName({
- baseName: "Akeru Bot",
- fallbackDisplayName: "Akeru Bot (Alpha)",
- fallbackStageLabel: "Alpha",
- primaryServerVersion: "0.0.28-nightly.20260616.12",
- }),
- ).toBe("Akeru Bot (Nightly)");
- });
-
it("keeps the fallback display name for stable primary server versions", () => {
expect(
resolveServerBackedAppDisplayName({
@@ -104,15 +51,4 @@ describe("branding logic", () => {
}),
).toBe("Akeru Bot (Alpha)");
});
-
- it("keeps the fallback display name for malformed nightly primary server versions", () => {
- expect(
- resolveServerBackedAppDisplayName({
- baseName: "Akeru Bot",
- fallbackDisplayName: "Akeru Bot (Alpha)",
- fallbackStageLabel: "Alpha",
- primaryServerVersion: "0.0.28-nightly.20260616",
- }),
- ).toBe("Akeru Bot (Alpha)");
- });
});
diff --git a/apps/web/src/branding.ts b/apps/web/src/branding.ts
index a4e0deaab..b4be0a226 100644
--- a/apps/web/src/branding.ts
+++ b/apps/web/src/branding.ts
@@ -10,17 +10,9 @@ function readInjectedDesktopAppBranding(): DesktopAppBranding | null {
}
const injectedDesktopAppBranding = readInjectedDesktopAppBranding();
-const hostedAppChannel = import.meta.env.VITE_HOSTED_APP_CHANNEL?.trim().toLowerCase();
-
-export const HOSTED_APP_CHANNEL =
- hostedAppChannel === "latest" || hostedAppChannel === "nightly" ? hostedAppChannel : null;
-export const HOSTED_APP_CHANNEL_LABEL =
- HOSTED_APP_CHANNEL === "nightly" ? "Nightly" : HOSTED_APP_CHANNEL === "latest" ? "Latest" : null;
export const APP_BASE_NAME = injectedDesktopAppBranding?.baseName ?? "Akeru Bot";
export const APP_STAGE_LABEL =
- injectedDesktopAppBranding?.stageLabel ??
- HOSTED_APP_CHANNEL_LABEL ??
- (import.meta.env.DEV ? "Dev" : "Alpha");
+ injectedDesktopAppBranding?.stageLabel ?? (import.meta.env.DEV ? "Dev" : "Alpha");
export const APP_DISPLAY_NAME =
injectedDesktopAppBranding?.displayName ??
formatAppDisplayName({ baseName: APP_BASE_NAME, stageLabel: APP_STAGE_LABEL });
diff --git a/apps/web/src/components/Sidebar.logic.test.ts b/apps/web/src/components/Sidebar.logic.test.ts
index 1348e6561..bba1fd5a2 100644
--- a/apps/web/src/components/Sidebar.logic.test.ts
+++ b/apps/web/src/components/Sidebar.logic.test.ts
@@ -235,15 +235,6 @@ describe("buildMultiSelectThreadContextMenuItems", () => {
});
describe("resolveSidebarStageBadgeLabel", () => {
- it("returns Nightly for nightly primary server versions", () => {
- expect(
- resolveSidebarStageBadgeLabel({
- primaryServerVersion: "0.0.28-nightly.20260616.12",
- fallbackStageLabel: "Alpha",
- }),
- ).toBe("Nightly");
- });
-
it("returns the fallback label for stable primary server versions", () => {
expect(
resolveSidebarStageBadgeLabel({
@@ -261,15 +252,6 @@ describe("resolveSidebarStageBadgeLabel", () => {
}),
).toBe("Dev");
});
-
- it("returns the fallback label for malformed nightly prerelease versions", () => {
- expect(
- resolveSidebarStageBadgeLabel({
- primaryServerVersion: "0.0.28-nightly.20260616",
- fallbackStageLabel: "Alpha",
- }),
- ).toBe("Alpha");
- });
});
function makeLatestTurn(overrides?: {
diff --git a/apps/web/src/components/SidebarStageBackdrop.test.tsx b/apps/web/src/components/SidebarStageBackdrop.test.tsx
index eca741af8..69326fd6b 100644
--- a/apps/web/src/components/SidebarStageBackdrop.test.tsx
+++ b/apps/web/src/components/SidebarStageBackdrop.test.tsx
@@ -12,62 +12,49 @@ import {
describe("SidebarStageBackdrop", () => {
it("resolves stage artwork only when enabled", () => {
expect(resolveSidebarStageBackdropVariant("Dev")).toBe("dev");
- expect(resolveSidebarStageBackdropVariant("Nightly")).toBe("nightly");
+ expect(resolveSidebarStageBackdropVariant("Nightly")).toBeNull();
expect(resolveSidebarStageBackdropVariant("Dev", false)).toBeNull();
expect(resolveSidebarStageBackdropVariant("Alpha")).toBeNull();
});
it("resolves supported environment pill labels", () => {
expect(resolveEnvironmentIdentificationPillLabel("Dev")).toBe("Dev");
- expect(resolveEnvironmentIdentificationPillLabel("nightly")).toBe("Nightly");
+ expect(resolveEnvironmentIdentificationPillLabel("nightly")).toBeNull();
expect(resolveEnvironmentIdentificationPillLabel("Latest")).toBeNull();
expect(resolveEnvironmentIdentificationPillLabel("Alpha")).toBeNull();
});
it("matches the focus-ring offset to each artwork palette", () => {
- expect(resolveSidebarStageFocusRingOffsetClass("nightly")).toBe(
- "focus-visible:ring-offset-(--stage-night-bottom)",
- );
expect(resolveSidebarStageFocusRingOffsetClass("dev")).toBe(
"focus-visible:ring-offset-(--stage-art-bottom)",
);
});
- it.each(["nightly", "dev"] as const)(
- "uses unique SVG definition ids when %s artwork is rendered more than once",
- (variant) => {
- const markup = renderToStaticMarkup(
- <>
- <StageBackdropArt variant={variant} />
- <StageBackdropArt variant={variant} />
- </>,
- );
- const ids = Array.from(markup.matchAll(/\sid="([^"]+)"/g), (match) => match[1]);
+ it("uses unique SVG definition ids when artwork is rendered more than once", () => {
+ const markup = renderToStaticMarkup(
+ <>
+ <StageBackdropArt variant="dev" />
+ <StageBackdropArt variant="dev" />
+ </>,
+ );
+ const ids = Array.from(markup.matchAll(/\sid="([^"]+)"/g), (match) => match[1]);
- expect(ids.length).toBeGreaterThan(0);
- expect(new Set(ids).size).toBe(ids.length);
- },
- );
+ expect(ids.length).toBeGreaterThan(0);
+ expect(new Set(ids).size).toBe(ids.length);
+ });
it("paints each artwork variant with theme-owned color tokens", () => {
- const nightlyMarkup = renderToStaticMarkup(<StageBackdropArt variant="nightly" />);
const devMarkup = renderToStaticMarkup(<StageBackdropArt variant="dev" />);
- expect(nightlyMarkup).toContain("var(--stage-night-bottom)");
- expect(nightlyMarkup).toContain("var(--stage-night-line)");
expect(devMarkup).toContain("var(--stage-art-bottom)");
expect(devMarkup).toContain("var(--stage-art-line)");
- expect(nightlyMarkup).not.toMatch(/#[0-9a-f]{3,8}/i);
expect(devMarkup).not.toMatch(/#[0-9a-f]{3,8}/i);
});
- it.each([
- ["nightly", "96 0 8192 96"],
- ["dev", "64 0 8192 96"],
- ] as const)("uses the compact %s crop inside the send button", (variant, viewBox) => {
- const markup = renderToStaticMarkup(<StageBackdropButtonArt variant={variant} />);
+ it("uses the compact Dev crop inside the send button", () => {
+ const markup = renderToStaticMarkup(<StageBackdropButtonArt variant="dev" />);
- expect(markup).toContain(`viewBox="${viewBox}"`);
- expect(markup).toContain(`stage-${variant === "dev" ? "blueprint" : "nightly"}`);
+ expect(markup).toContain('viewBox="64 0 8192 96"');
+ expect(markup).toContain("stage-blueprint");
});
});
diff --git a/apps/web/src/components/SidebarStageBackdrop.tsx b/apps/web/src/components/SidebarStageBackdrop.tsx
index 9f77d7298..19371bbb4 100644
--- a/apps/web/src/components/SidebarStageBackdrop.tsx
+++ b/apps/web/src/components/SidebarStageBackdrop.tsx
@@ -5,8 +5,8 @@ import { APP_STAGE_LABEL } from "../branding";
import { resolveServerBackedAppStageLabel } from "../branding.logic";
import { primaryServerConfigAtom } from "../state/server";
-export type SidebarStageBackdropVariant = "nightly" | "dev";
-export type EnvironmentIdentificationPillLabel = "Dev" | "Nightly";
+export type SidebarStageBackdropVariant = "dev";
+export type EnvironmentIdentificationPillLabel = "Dev";
// A wide viewBox keeps the 96-unit art height at a fixed scale while sidebar resizing reveals
// more horizontal canvas instead of zooming the scene.
@@ -18,17 +18,14 @@ export function resolveSidebarStageBackdropVariant(
): SidebarStageBackdropVariant | null {
if (!enabled) return null;
const normalized = stageLabel.trim().toLowerCase();
- if (normalized === "nightly") return "nightly";
if (normalized === "dev") return "dev";
return null;
}
export function resolveSidebarStageFocusRingOffsetClass(
- variant: SidebarStageBackdropVariant,
+ _variant: SidebarStageBackdropVariant,
): string {
- return variant === "nightly"
- ? "focus-visible:ring-offset-(--stage-night-bottom)"
- : "focus-visible:ring-offset-(--stage-art-bottom)";
+ return "focus-visible:ring-offset-(--stage-art-bottom)";
}
export function resolveEnvironmentIdentificationPillLabel(
@@ -36,7 +33,6 @@ export function resolveEnvironmentIdentificationPillLabel(
): EnvironmentIdentificationPillLabel | null {
const normalized = stageLabel.trim().toLowerCase();
if (normalized === "dev") return "Dev";
- if (normalized === "nightly") return "Nightly";
return null;
}
@@ -66,154 +62,16 @@ export function SidebarStageBackdrop({ variant }: { variant: SidebarStageBackdro
);
}
-export function StageBackdropArt({ variant }: { variant: SidebarStageBackdropVariant }) {
- return variant === "nightly" ? <NightlySkyArt /> : <DevBlueprintArt />;
+export function StageBackdropArt({ variant: _variant }: { variant: SidebarStageBackdropVariant }) {
+ return <DevBlueprintArt />;
}
-export function StageBackdropButtonArt({ variant }: { variant: SidebarStageBackdropVariant }) {
- return variant === "nightly" ? <NightlySkyArt compact /> : <DevBlueprintArt compact />;
-}
-
-const NIGHTLY_STARS: ReadonlyArray<{
- cx: number;
- cy: number;
- r: number;
- opacity: number;
-}> = [
- { cx: 14, cy: 10, r: 0.6, opacity: 0.85 },
- { cx: 38, cy: 22, r: 0.4, opacity: 0.55 },
- { cx: 58, cy: 8, r: 0.5, opacity: 0.7 },
- { cx: 84, cy: 16, r: 0.4, opacity: 0.5 },
- { cx: 104, cy: 7, r: 0.6, opacity: 0.8 },
- { cx: 126, cy: 20, r: 0.4, opacity: 0.55 },
- { cx: 148, cy: 11, r: 0.5, opacity: 0.7 },
- { cx: 170, cy: 24, r: 0.4, opacity: 0.5 },
- { cx: 192, cy: 9, r: 0.6, opacity: 0.8 },
- { cx: 214, cy: 18, r: 0.4, opacity: 0.55 },
- { cx: 236, cy: 8, r: 0.5, opacity: 0.7 },
- { cx: 258, cy: 20, r: 0.45, opacity: 0.6 },
- { cx: 278, cy: 11, r: 0.55, opacity: 0.75 },
- { cx: 26, cy: 34, r: 0.4, opacity: 0.45 },
- { cx: 118, cy: 34, r: 0.4, opacity: 0.45 },
- { cx: 202, cy: 32, r: 0.4, opacity: 0.5 },
- { cx: 268, cy: 34, r: 0.4, opacity: 0.45 },
-];
-
-const NIGHTLY_SPARKLES: ReadonlyArray<{ x: number; y: number }> = [
- { x: 70, y: 28 },
- { x: 160, y: 36 },
- { x: 246, y: 26 },
-];
-
-function NightlySkyArt({ compact = false }: { compact?: boolean }) {
- const idPrefix = useId().replaceAll(":", "");
- const skyId = `${idPrefix}-stage-night-sky`;
- const glowId = `${idPrefix}-stage-night-glow`;
- const cloudId = `${idPrefix}-stage-night-cloud`;
- const softId = `${idPrefix}-stage-night-soft`;
- const starsId = `${idPrefix}-stage-night-stars`;
- const glowsId = `${idPrefix}-stage-night-glows`;
-
- return (
- <svg
- className="stage-art stage-nightly h-full w-full"
- fill="none"
- preserveAspectRatio="xMinYMin slice"
- viewBox={compact ? "96 0 8192 96" : STAGE_BACKDROP_VIEW_BOX}
- xmlns="http://www.w3.org/2000/svg"
- >
- <defs>
- <linearGradient
- id={skyId}
- x1="24"
- y1="0"
- x2="264"
- y2="96"
- gradientUnits="userSpaceOnUse"
- spreadMethod="reflect"
- >
- <stop style={{ stopColor: "var(--stage-night-bottom)" }} />
- <stop offset="0.5" style={{ stopColor: "var(--stage-night-mid)" }} />
- <stop offset="1" style={{ stopColor: "var(--stage-night-top)" }} />
- </linearGradient>
- <radialGradient
- id={glowId}
- cx="0"
- cy="0"
- r="1"
- gradientTransform="translate(216 18) rotate(137) scale(120 84)"
- gradientUnits="userSpaceOnUse"
- >
- <stop style={{ stopColor: "var(--stage-night-glow-highlight)" }} stopOpacity="0.4" />
- <stop
- offset="0.5"
- style={{ stopColor: "var(--stage-night-glow-secondary)" }}
- stopOpacity="0.16"
- />
- <stop offset="1" style={{ stopColor: "var(--stage-night-bottom)" }} stopOpacity="0" />
- </radialGradient>
- <linearGradient id={cloudId} x1="0" y1="60" x2="288" y2="96" gradientUnits="userSpaceOnUse">
- <stop style={{ stopColor: "var(--stage-night-highlight)" }} stopOpacity="0.5" />
- <stop
- offset="0.52"
- style={{ stopColor: "var(--stage-night-secondary)" }}
- stopOpacity="0.62"
- />
- <stop offset="1" style={{ stopColor: "var(--stage-night-tertiary)" }} stopOpacity="0.5" />
- </linearGradient>
- <filter id={softId} x="-24" y="-24" width="336" height="144" filterUnits="userSpaceOnUse">
- <feGaussianBlur stdDeviation="4" />
- </filter>
- <pattern id={starsId} width="288" height="96" patternUnits="userSpaceOnUse">
- <g style={{ fill: "var(--stage-night-line)" }}>
- {NIGHTLY_STARS.map((star) => (
- <circle
- key={`${star.cx}-${star.cy}`}
- cx={star.cx}
- cy={star.cy}
- r={star.r}
- fillOpacity={star.opacity}
- />
- ))}
- </g>
- <g
- style={{ stroke: "var(--stage-night-sparkle)" }}
- strokeLinecap="round"
- strokeOpacity="0.7"
- strokeWidth="0.6"
- >
- {NIGHTLY_SPARKLES.map((sparkle) => (
- <g key={`${sparkle.x}-${sparkle.y}`}>
- <path d={`M${sparkle.x - 1.5} ${sparkle.y}H${sparkle.x + 1.5}`} />
- <path d={`M${sparkle.x} ${sparkle.y - 1.5}V${sparkle.y + 1.5}`} />
- </g>
- ))}
- </g>
- </pattern>
- <pattern id={glowsId} width="640" height="96" patternUnits="userSpaceOnUse">
- <rect width="640" height="96" fill={`url(#${glowId})`} />
- </pattern>
- </defs>
-
- <rect width="100%" height="96" fill={`url(#${skyId})`} />
- <rect width="100%" height="96" fill={`url(#${glowsId})`} />
- <rect width="100%" height="96" fill={`url(#${starsId})`} />
-
- <g filter={`url(#${softId})`}>
- <path
- d="M-12 88C-12 74 0 63 14 63C18 50 30 41 44 41C58 41 70 49 74 62C79 57 86 54 94 54C110 54 123 66 124 82C132 83 138 88 141 96H-12V88Z"
- fill={`url(#${cloudId})`}
- />
- </g>
- <g filter={`url(#${softId})`}>
- <path
- d="M150 96C151 84 161 75 173 75C176 64 186 57 198 57C210 57 220 64 223 75C231 75 238 80 241 87C250 87 257 91 260 96H150Z"
- fill={`url(#${cloudId})`}
- fillOpacity="0.8"
- />
- </g>
- </svg>
- );
+export function StageBackdropButtonArt({
+ variant: _variant,
+}: {
+ variant: SidebarStageBackdropVariant;
+}) {
+ return <DevBlueprintArt compact />;
}
function DevBlueprintArt({ compact = false }: { compact?: boolean }) {
diff --git a/apps/web/src/components/chat/ComposerPrimaryActions.test.tsx b/apps/web/src/components/chat/ComposerPrimaryActions.test.tsx
index d180f2c69..d2c4d0496 100644
--- a/apps/web/src/components/chat/ComposerPrimaryActions.test.tsx
+++ b/apps/web/src/components/chat/ComposerPrimaryActions.test.tsx
@@ -4,7 +4,7 @@ import { afterEach, describe, expect, it, vi } from "vite-plus/test";
const stageArtworkState = vi.hoisted(() => ({
mode: "none" as "artwork" | "none",
- variant: null as "nightly" | "dev" | null,
+ variant: null as "dev" | null,
}));
vi.mock("~/hooks/useSettings", () => ({
@@ -227,21 +227,21 @@ describe("ComposerPrimaryActions", () => {
it("renders stage artwork inside the send button when artwork identification is active", () => {
stageArtworkState.mode = "artwork";
- stageArtworkState.variant = "nightly";
+ stageArtworkState.variant = "dev";
const markup = renderSendButton();
- expect(markup).toContain("stage-nightly");
+ expect(markup).toContain("stage-dev");
expect(markup).toContain("bg-transparent text-white");
expect(markup).not.toContain("bg-message-action text-message-action-foreground");
});
it("keeps the normal send-button fill when artwork identification is inactive", () => {
- stageArtworkState.variant = "nightly";
+ stageArtworkState.variant = "dev";
const markup = renderSendButton();
- expect(markup).not.toContain("stage-nightly");
+ expect(markup).not.toContain("stage-blueprint");
expect(markup).toContain("bg-message-action text-message-action-foreground");
});
diff --git a/apps/web/src/components/settings/SettingsPanels.tsx b/apps/web/src/components/settings/SettingsPanels.tsx
index 386558def..0792d01a1 100644
--- a/apps/web/src/components/settings/SettingsPanels.tsx
+++ b/apps/web/src/components/settings/SettingsPanels.tsx
@@ -5,7 +5,6 @@ import { useAtomValue } from "@effect/atom-react";
import {
type BackgroundActivityProfile,
type BotSandboxBrowserSharing,
- type DesktopUpdateChannel,
ProviderDriverKind,
type ScopedThreadRef,
type SidebarProjectGroupingMode,
@@ -42,7 +41,7 @@ import * as Duration from "effect/Duration";
import * as Equal from "effect/Equal";
import * as Exit from "effect/Exit";
import * as Schema from "effect/Schema";
-import { APP_VERSION, HOSTED_APP_CHANNEL, HOSTED_APP_CHANNEL_LABEL } from "../../branding";
+import { APP_VERSION } from "../../branding";
import {
canCheckForUpdate,
getDesktopUpdateButtonTooltip,
@@ -59,7 +58,6 @@ import {
import { isElectron } from "../../env";
import { openSettings } from "../../settingsDialogStore";
import { openProductFeedback } from "../../productFeedbackStore";
-import { buildHostedChannelSelectionUrl, type HostedAppChannel } from "../../hostedPairing";
import { useCustomThemes } from "../../hooks/useCustomThemes";
import {
readAppearanceModePreference,
@@ -234,43 +232,8 @@ function AboutVersionTitle() {
function AboutVersionSection() {
const updateState = useDesktopUpdateState();
- const [isChangingUpdateChannel, setIsChangingUpdateChannel] = useState(false);
const [isUpdateActionPending, setIsUpdateActionPending] = useState(false);
- const hasDesktopBridge = typeof window !== "undefined" && Boolean(window.desktopBridge);
- const selectedUpdateChannel = updateState?.channel ?? "latest";
- const selectedHostedAppChannel = hasDesktopBridge ? null : HOSTED_APP_CHANNEL;
-
- const handleUpdateChannelChange = useCallback(
- (channel: DesktopUpdateChannel) => {
- const bridge = window.desktopBridge;
- if (
- !bridge ||
- typeof bridge.setUpdateChannel !== "function" ||
- channel === selectedUpdateChannel
- ) {
- return;
- }
-
- setIsChangingUpdateChannel(true);
- void bridge
- .setUpdateChannel(channel)
- .catch((error: unknown) => {
- toastManager.add(
- stackedThreadToast({
- type: "error",
- title: "Could not change update track",
- description: error instanceof Error ? error.message : "Update track change failed.",
- }),
- );
- })
- .finally(() => {
- setIsChangingUpdateChannel(false);
- });
- },
- [selectedUpdateChannel],
- );
-
const handleButtonClick = useCallback(async () => {
const bridge = window.desktopBridge;
if (!bridge) return;
@@ -377,89 +340,27 @@ function AboutVersionSection() {
: "Current version of the application.";
return (
- <>
- <SettingsRow
- title={<AboutVersionTitle />}
- description={description}
- control={
- <Tooltip>
- <TooltipTrigger
- render={
- <Button
- size="xs"
- variant={action === "install" ? "default" : "outline"}
- disabled={buttonDisabled || isUpdateActionPending}
- onClick={handleButtonClick}
- >
- {buttonLabel}
- </Button>
- }
- />
- {buttonTooltip ? <TooltipPopup>{buttonTooltip}</TooltipPopup> : null}
- </Tooltip>
- }
- />
- {hasDesktopBridge ? (
- <SettingsRow
- title="Update track"
- description="Stable follows full releases. Nightly follows the nightly desktop channel and can switch back to stable immediately."
- control={
- <Select
- value={selectedUpdateChannel}
- onValueChange={(value) => {
- handleUpdateChannelChange(value as DesktopUpdateChannel);
- }}
- >
- <SelectTrigger
- className="w-full sm:w-40"
- aria-label="Update track"
- disabled={isChangingUpdateChannel}
+ <SettingsRow
+ title={<AboutVersionTitle />}
+ description={description}
+ control={
+ <Tooltip>
+ <TooltipTrigger
+ render={
+ <Button
+ size="xs"
+ variant={action === "install" ? "default" : "outline"}
+ disabled={buttonDisabled || isUpdateActionPending}
+ onClick={handleButtonClick}
>
- <SelectValue>
- {selectedUpdateChannel === "nightly" ? "Nightly" : "Stable"}
- </SelectValue>
- </SelectTrigger>
- <SelectPopup align="end" alignItemWithTrigger={false}>
- <SelectItem hideIndicator value="latest">
- Stable
- </SelectItem>
- <SelectItem hideIndicator value="nightly">
- Nightly
- </SelectItem>
- </SelectPopup>
- </Select>
- }
- />
- ) : selectedHostedAppChannel ? (
- <SettingsRow
- title="Update track"
- description="Switches the hosted app release channel."
- control={
- <Select
- value={selectedHostedAppChannel}
- onValueChange={(value) => {
- if (value === selectedHostedAppChannel) return;
- window.location.assign(
- buildHostedChannelSelectionUrl({ channel: value as HostedAppChannel }),
- );
- }}
- >
- <SelectTrigger className="w-full sm:w-40" aria-label="Update track">
- <SelectValue>{HOSTED_APP_CHANNEL_LABEL}</SelectValue>
- </SelectTrigger>
- <SelectPopup align="end" alignItemWithTrigger={false}>
- <SelectItem hideIndicator value="latest">
- Latest
- </SelectItem>
- <SelectItem hideIndicator value="nightly">
- Nightly
- </SelectItem>
- </SelectPopup>
- </Select>
- }
- />
- ) : null}
- </>
+ {buttonLabel}
+ </Button>
+ }
+ />
+ {buttonTooltip ? <TooltipPopup>{buttonTooltip}</TooltipPopup> : null}
+ </Tooltip>
+ }
+ />
);
}
@@ -1150,7 +1051,7 @@ export function AppearanceSettingsPanel() {
{showEnvironmentIdentification ? (
<SettingsRow
{...searchableSetting("environment-identification")}
- description="Choose how Dev and Nightly environments are identified."
+ description="Choose how Dev environments are identified."
resetAction={
settings.environmentIdentificationMode !== DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE ? (
<SettingResetButton
@@ -2657,7 +2558,7 @@ export function GeneralSettingsPanel() {
</SettingsSection>
<SettingsSection title="About">
- {isElectron || HOSTED_APP_CHANNEL ? (
+ {isElectron ? (
<AboutVersionSection />
) : (
<SettingsRow
diff --git a/apps/web/src/components/sidebar/SidebarUpdatePill.tsx b/apps/web/src/components/sidebar/SidebarUpdatePill.tsx
index 3db27758c..ff3453cfd 100644
--- a/apps/web/src/components/sidebar/SidebarUpdatePill.tsx
+++ b/apps/web/src/components/sidebar/SidebarUpdatePill.tsx
@@ -19,7 +19,6 @@ import {
} from "../desktopUpdate.logic";
import { showDesktopUpdateDownloadedToast } from "../desktopUpdate.toast";
import { Alert, AlertDescription, AlertTitle } from "../ui/alert";
-import { Separator } from "../ui/separator";
import { SidebarMenuItem } from "../ui/sidebar";
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
import {
@@ -55,67 +54,6 @@ function resolveSidebarUpdatePresentation({
} as const;
}
-function keyReleaseNoteItems(items: ReadonlyArray<string>) {
- const occurrences = new Map<string, number>();
- return items.map((item) => {
- const occurrence = occurrences.get(item) ?? 0;
- occurrences.set(item, occurrence + 1);
- return { item, key: JSON.stringify([item, occurrence]) };
- });
-}
-
-function SidebarUpdateReleaseNotesTooltip({
- state,
- tooltip,
-}: {
- readonly state: NonNullable<ReturnType<typeof useDesktopUpdateState>>;
- readonly tooltip: string;
-}) {
- if (state.channel !== "nightly" || state.releaseNotes.length === 0) {
- return <>{tooltip}</>;
- }
-
- return (
- <div className="w-fit max-w-[min(24rem,calc(100vw-2rem))] text-left">
- <div className="px-1">
- {state.status === "available" ? (
- <div>
- <div className="whitespace-nowrap text-sm leading-5 font-medium">
- Update ready to download
- </div>
- {state.availableVersion ? (
- <div className="mt-0.5 text-xs leading-4 text-update-foreground">
- {state.availableVersion}
- </div>
- ) : null}
- </div>
- ) : (
- <div className="text-sm leading-5 font-medium">{tooltip}</div>
- )}
- </div>
- <div className="max-h-[min(28rem,calc(100vh-6rem))] overflow-y-auto px-1 pt-4 pb-1">
- {state.releaseNotes.map((releaseNote, index) => (
- <div key={releaseNote.version}>
- {index > 0 && <Separator className="my-3 bg-border/60" />}
- <section>
- <h3 className="text-foreground text-xs leading-4 font-semibold">
- {index === 0 ? "What's changed" : `Changes in ${releaseNote.version}`}
- </h3>
- <ul className="mt-2 space-y-1.5 pl-4 text-xs leading-5 text-popover-foreground/90">
- {keyReleaseNoteItems(releaseNote.items).map(({ item, key }) => (
- <li className="list-disc break-words" key={key}>
- {item}
- </li>
- ))}
- </ul>
- </section>
- </div>
- ))}
- </div>
- </div>
- );
-}
-
export function SidebarUpdateArchitectureWarning() {
return isElectron ? <SidebarUpdateArchitectureWarningContent /> : null;
}
@@ -343,13 +281,6 @@ function SidebarUpdateControl() {
/>
<TooltipPopup
align="center"
- className={
- showUpdateDetails && state?.channel === "nightly" && state.releaseNotes.length > 0
- ? // pointer-events-auto overrides the positioner's pointer-events-none so the
- // release notes stay open (and scrollable) when the cursor moves into them.
- "pointer-events-auto max-w-none text-balance"
- : undefined
- }
side="top"
style={
showUpdateDetails
@@ -362,11 +293,7 @@ function SidebarUpdateControl() {
}
variant={showUpdateDetails ? "glass" : "default"}
>
- {showUpdateDetails && state ? (
- <SidebarUpdateReleaseNotesTooltip state={state} tooltip={tooltip} />
- ) : (
- tooltip
- )}
+ {tooltip}
</TooltipPopup>
</Tooltip>
</SidebarMenuItem>
diff --git a/apps/web/src/hostedPairing.test.ts b/apps/web/src/hostedPairing.test.ts
index a9e1dd80b..fbf96fa8c 100644
--- a/apps/web/src/hostedPairing.test.ts
+++ b/apps/web/src/hostedPairing.test.ts
@@ -1,7 +1,7 @@
import { afterEach, describe, expect, it, vi } from "vite-plus/test";
import {
- buildHostedChannelSelectionUrl,
+ buildHostedPairingUrl,
hasHostedPairingRequest,
isHostedStaticApp,
readHostedPairingRequest,
@@ -23,19 +23,23 @@ describe("hostedPairing", () => {
expect(hasHostedPairingRequest(url)).toBe(true);
});
- it("builds hosted channel selection URLs through the configured router origin", () => {
- vi.stubEnv("VITE_HOSTED_APP_URL", "https://app.t3.codes");
+ it("prefers hash tokens so generated hosted links do not put credentials in search params", () => {
+ vi.stubEnv("VITE_HOSTED_APP_URL", "https://preview.t3.codes");
const url = new URL(
- buildHostedChannelSelectionUrl({
- channel: "nightly",
+ buildHostedPairingUrl({
+ host: "https://backend.example.com:3773",
+ token: "pairing-token",
+ label: "Workstation",
}),
);
- expect(url.origin).toBe("https://app.t3.codes");
- expect(url.pathname).toBe("/__t3code/channel");
- expect(url.searchParams.get("channel")).toBe("nightly");
- expect(url.searchParams.has("next")).toBe(false);
+ expect(url.origin).toBe("https://preview.t3.codes");
+ expect(url.pathname).toBe("/pair");
+ expect(url.searchParams.get("host")).toBe("https://backend.example.com:3773");
+ expect(url.searchParams.get("label")).toBe("Workstation");
+ expect(url.searchParams.has("token")).toBe(false);
+ expect(url.hash).toBe("#token=pairing-token");
});
it("ignores incomplete hosted pairing requests", () => {
@@ -59,16 +63,4 @@ describe("hostedPairing", () => {
vi.stubEnv("VITE_HTTP_URL", "https://backend.example.com");
expect(isHostedStaticApp(new URL("https://preview.t3.codes/"))).toBe(false);
});
-
- it("detects hosted channel aliases as static apps", () => {
- vi.stubEnv("VITE_HOSTED_APP_URL", "https://app.t3.codes");
- vi.stubEnv("VITE_HOSTED_APP_CHANNEL", "nightly");
- vi.stubEnv("VITE_HTTP_URL", "");
- vi.stubEnv("VITE_WS_URL", "");
-
- expect(isHostedStaticApp(new URL("https://nightly.app.t3.codes/"))).toBe(true);
-
- vi.stubEnv("VITE_HTTP_URL", "https://backend.example.com");
- expect(isHostedStaticApp(new URL("https://nightly.app.t3.codes/"))).toBe(false);
- });
});
diff --git a/apps/web/src/hostedPairing.ts b/apps/web/src/hostedPairing.ts
index 94c6a7837..c8001e2c7 100644
--- a/apps/web/src/hostedPairing.ts
+++ b/apps/web/src/hostedPairing.ts
@@ -1,4 +1,4 @@
-import { getPairingTokenFromUrl } from "./pairingUrl";
+import { getPairingTokenFromUrl, setPairingTokenOnUrl } from "./pairingUrl";
const DEFAULT_HOSTED_APP_URL = "https://app.t3.codes";
@@ -8,8 +8,6 @@ export interface HostedPairingRequest {
readonly label: string;
}
-export type HostedAppChannel = "latest" | "nightly";
-
export function configuredHostedAppUrl(): string {
return import.meta.env.VITE_HOSTED_APP_URL?.trim() || DEFAULT_HOSTED_APP_URL;
}
@@ -18,11 +16,6 @@ function configuredBackendUrl(): string {
return import.meta.env.VITE_HTTP_URL?.trim() || import.meta.env.VITE_WS_URL?.trim() || "";
}
-function configuredHostedAppChannel(): HostedAppChannel | null {
- const channel = import.meta.env.VITE_HOSTED_APP_CHANNEL?.trim().toLowerCase();
- return channel === "latest" || channel === "nightly" ? channel : null;
-}
-
function originFromUrl(value: string): string | null {
try {
return new URL(value).origin;
@@ -36,10 +29,6 @@ export function isHostedStaticApp(url: URL = new URL(window.location.href)): boo
return false;
}
- if (configuredHostedAppChannel()) {
- return true;
- }
-
const hostedOrigin = originFromUrl(configuredHostedAppUrl());
return hostedOrigin !== null && url.origin === hostedOrigin;
}
@@ -64,10 +53,18 @@ export function hasHostedPairingRequest(url: URL = new URL(window.location.href)
return readHostedPairingRequest(url) !== null;
}
-export function buildHostedChannelSelectionUrl(input: {
- readonly channel: HostedAppChannel;
+export function buildHostedPairingUrl(input: {
+ readonly host: string;
+ readonly token: string;
+ readonly label?: string | null;
}): string {
- const url = new URL("/__t3code/channel", configuredHostedAppUrl());
- url.searchParams.set("channel", input.channel);
- return url.toString();
+ const url = new URL("/pair", configuredHostedAppUrl());
+ url.searchParams.set("host", input.host);
+
+ const label = input.label?.trim();
+ if (label) {
+ url.searchParams.set("label", label);
+ }
+
+ return setPairingTokenOnUrl(url, input.token).toString();
}
diff --git a/apps/web/src/versionSkew.test.ts b/apps/web/src/versionSkew.test.ts
index 95b3c9906..544411258 100644
--- a/apps/web/src/versionSkew.test.ts
+++ b/apps/web/src/versionSkew.test.ts
@@ -43,36 +43,6 @@ describe("versionSkew", () => {
expect(resolveVersionMismatch("9.9.9")).toBeNull();
});
- it("does not warn when a nightly and a stable build share a core version", () => {
- expect(resolveVersionMismatch("0.0.34-nightly.20260818.1124")).toBeNull();
-
- branding.APP_VERSION = "0.0.34-nightly.20260818.1124";
- expect(resolveVersionMismatch("0.0.34")).toBeNull();
- });
-
- it.each(["0.0.34-nightly.20260823.1124", "0.0.34-nightly.20260824.1124"])(
- "warns when nightly server %s is behind a nightly client on the same release",
- (serverVersion) => {
- branding.APP_VERSION = "0.0.34-nightly.20260824.1125";
-
- expect(resolveVersionMismatch(serverVersion)).toEqual({
- clientVersion: "0.0.34-nightly.20260824.1125",
- serverVersion,
- hint: MISMATCH_HINT,
- });
- },
- );
-
- it("does not warn when a nightly server is ahead on the same release", () => {
- branding.APP_VERSION = "0.0.34-nightly.20260824.1125";
-
- expect(resolveVersionMismatch("0.0.34-nightly.20260824.1126")).toBeNull();
- });
-
- it("treats a nightly server built past the client as ahead, not skew", () => {
- expect(resolveVersionMismatch("0.0.35-nightly.20260818.1124")).toBeNull();
- });
-
it("still warns when a nightly client outruns the server by a release", () => {
branding.APP_VERSION = "0.0.35-nightly.20260818.1124";
diff --git a/apps/web/src/versionSkew.ts b/apps/web/src/versionSkew.ts
index 0feb323e8..baf5d62e0 100644
--- a/apps/web/src/versionSkew.ts
+++ b/apps/web/src/versionSkew.ts
@@ -33,9 +33,7 @@ function versionCore(version: string): string {
* The skew a user can act on: the connected server runs an older T3 Code than
* this client, so the server is the side that needs updating.
*
- * Two nightly builds compare their full versions, including the date and run.
- * Other combinations compare their core `major.minor.patch` only, so a stable
- * build and a nightly build with the same core do not cause an update warning.
+ * Versions compare their core `major.minor.patch` only.
* A server ahead of the client does not need an update. Versions that do not
* parse as semver fall back to plain string inequality.
*/
@@ -50,15 +48,9 @@ export function resolveVersionMismatch(
const clientCore = versionCore(normalizedClientVersion);
const serverCore = versionCore(normalizedServerVersion);
- const compareNightlyBuilds =
- parseSemver(normalizedClientVersion)?.prerelease[0] === "nightly" &&
- parseSemver(normalizedServerVersion)?.prerelease[0] === "nightly";
const serverIsBehind =
parseSemver(clientCore) && parseSemver(serverCore)
- ? compareSemverVersions(
- compareNightlyBuilds ? normalizedServerVersion : serverCore,
- compareNightlyBuilds ? normalizedClientVersion : clientCore,
- ) < 0
+ ? compareSemverVersions(serverCore, clientCore) < 0
: normalizedServerVersion !== normalizedClientVersion;
if (!serverIsBehind) {
return null;
diff --git a/apps/web/vercel.ts b/apps/web/vercel.ts
index 12a823a36..509b48119 100644
--- a/apps/web/vercel.ts
+++ b/apps/web/vercel.ts
@@ -1,61 +1,17 @@
-import { matchers, routes, type Transform, type VercelConfig } from "@vercel/config/v1";
+import { matchers, routes, type VercelConfig } from "@vercel/config/v1";
const ROUTER_HOST = "app.t3.codes";
-const HOSTED_WEB_CHANNEL_COOKIE = "t3code_web_channel";
const LATEST_ORIGIN = "https://latest.app.t3.codes";
-const NIGHTLY_ORIGIN = "https://nightly.app.t3.codes";
-const CLEAN_CHANNEL_QUERY_TRANSFORMS = [
- {
- type: "request.query",
- op: "delete",
- target: { key: "channel" },
- },
-] satisfies Transform[];
-
-function channelCookie(channel: "latest" | "nightly"): string {
- return [
- `${HOSTED_WEB_CHANNEL_COOKIE}=${channel}`,
- "Path=/",
- "Max-Age=31536000",
- "HttpOnly",
- "Secure",
- "SameSite=Lax",
- ].join("; ");
-}
export const config: VercelConfig = {
buildCommand:
- 'vp run --filter @t3tools/web build && node ../../scripts/apply-web-brand-assets.ts --channel "${VITE_HOSTED_APP_CHANNEL:-latest}"',
+ "vp run --filter @t3tools/web build && node ../../scripts/apply-web-brand-assets.ts production",
git: {
deploymentEnabled: false,
},
installCommand:
"npm install -g vite-plus && vp install --ignore-scripts --filter '@t3tools/scripts...' --filter '@t3tools/web...'",
routes: [
- {
- src: "/__t3code/channel",
- has: [matchers.query("channel", "nightly")],
- transforms: CLEAN_CHANNEL_QUERY_TRANSFORMS,
- headers: {
- Location: "/",
- "Set-Cookie": channelCookie("nightly"),
- },
- status: 302,
- },
- {
- src: "/__t3code/channel",
- transforms: CLEAN_CHANNEL_QUERY_TRANSFORMS,
- headers: {
- Location: "/",
- "Set-Cookie": channelCookie("latest"),
- },
- status: 302,
- },
- {
- src: "/(.*)",
- has: [matchers.host(ROUTER_HOST), matchers.cookie(HOSTED_WEB_CHANNEL_COOKIE, "nightly")],
- dest: `${NIGHTLY_ORIGIN}/$1`,
- },
{
src: "/(.*)",
has: [matchers.host(ROUTER_HOST)],
diff --git a/assets/nightly/app-icon.icon/Assets/background.svg b/assets/nightly/app-icon.icon/Assets/background.svg
deleted file mode 100644
index 1ceca91c0..000000000
--- a/assets/nightly/app-icon.icon/Assets/background.svg
+++ /dev/null
@@ -1,43 +0,0 @@
-<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
- <defs>
- <linearGradient id="night" x1="12" y1="6" x2="116" y2="124" gradientUnits="userSpaceOnUse">
- <stop stop-color="#07152F"/>
- <stop offset="0.5" stop-color="#151443"/>
- <stop offset="1" stop-color="#32155B"/>
- </linearGradient>
- <radialGradient id="skyGlow" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(90 28) rotate(137) scale(78 70)">
- <stop stop-color="#5165D8" stop-opacity="0.4"/>
- <stop offset="0.5" stop-color="#283075" stop-opacity="0.16"/>
- <stop offset="1" stop-color="#111635" stop-opacity="0"/>
- </radialGradient>
- <radialGradient id="horizonGlow" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(42 127) rotate(-70) scale(68 96)">
- <stop stop-color="#6646B6" stop-opacity="0.34"/>
- <stop offset="1" stop-color="#352066" stop-opacity="0"/>
- </radialGradient>
- <clipPath id="frame">
- <rect width="128" height="128" rx="10"/>
- </clipPath>
- </defs>
-
- <g clip-path="url(#frame)">
- <rect width="128" height="128" fill="url(#night)"/>
- <rect width="128" height="128" fill="url(#skyGlow)"/>
- <rect width="128" height="128" fill="url(#horizonGlow)"/>
-
-
- <!-- A few tiny stars kept to the perimeter so the wordmark stays clear. -->
- <g fill="#E4EAFF">
- <circle cx="17" cy="18" r="0.55" fill-opacity="0.82"/>
- <circle cx="54" cy="14" r="0.4" fill-opacity="0.65"/>
- <circle cx="116" cy="42" r="0.45" fill-opacity="0.72"/>
- <circle cx="10" cy="70" r="0.35" fill-opacity="0.56"/>
- <circle cx="117" cy="88" r="0.4" fill-opacity="0.6"/>
- </g>
- <path d="M31 22V24.8M29.6 23.4H32.4" stroke="#EEF2FF" stroke-width="0.5" stroke-linecap="round" opacity="0.72"/>
- <path d="M111 58V60M110 59H112" stroke="#CBD8FF" stroke-width="0.45" stroke-linecap="round" opacity="0.58"/>
-
- <!-- Broad horizon remains below the T3 baseline (y=94). -->
- <path d="M-12 119C14 99 39 99 63 110C87 121 110 116 140 96V140H-12V119Z" fill="#20184E" fill-opacity="0.42"/>
- <path d="M-12 129C15 111 42 112 66 122C91 132 114 124 140 107V140H-12V129Z" fill="#6946B8" fill-opacity="0.22"/>
- </g>
-</svg>
diff --git a/assets/nightly/app-icon.icon/Assets/cloud-lower-left.svg b/assets/nightly/app-icon.icon/Assets/cloud-lower-left.svg
deleted file mode 100644
index d43478860..000000000
--- a/assets/nightly/app-icon.icon/Assets/cloud-lower-left.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-<svg width="64" height="32" viewBox="0 0 64 32" fill="none" xmlns="http://www.w3.org/2000/svg">
- <defs>
- <linearGradient id="cloud" x1="7" y1="10" x2="57" y2="25" gradientUnits="userSpaceOnUse">
- <stop stop-color="#4EA4FF" stop-opacity="0.62"/>
- <stop offset="0.52" stop-color="#696FEA" stop-opacity="0.72"/>
- <stop offset="1" stop-color="#A85BEA" stop-opacity="0.58"/>
- </linearGradient>
- <radialGradient id="highlight" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(30 14) rotate(13) scale(27 10)">
- <stop stop-color="#C8D7FF" stop-opacity="0.4"/>
- <stop offset="1" stop-color="#8C8EF2" stop-opacity="0"/>
- </radialGradient>
- <filter id="soft" x="-8" y="-8" width="80" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
- <feGaussianBlur stdDeviation="2.5"/>
- </filter>
- </defs>
-
- <g filter="url(#soft)">
- <path d="M7 23.5C7 18.9 10.8 15.2 15.5 15.2C16.9 10.7 21.1 7.5 26.1 7.5C31 7.5 35.2 10.5 36.7 14.8C38.5 13.2 40.9 12.2 43.5 12.2C49.1 12.2 53.7 16.4 54.1 21.8C57 22.2 59.2 24 60 26.5H8.2C7.4 25.7 7 24.7 7 23.5Z" fill="url(#cloud)"/>
- <path d="M11 22.9C12.7 19.8 16 18 19.5 18.5C21 13.4 25.6 10 30.8 10.6C35 11 38.3 13.9 39.4 17.7C43.8 15.5 49 17.3 51.1 21.7C46.2 20.3 41.9 21 37.7 22.1C29.6 24.2 21.5 21.3 11 22.9Z" fill="url(#highlight)"/>
- </g>
-</svg>
diff --git a/assets/nightly/app-icon.icon/Assets/cloud-upper-right.svg b/assets/nightly/app-icon.icon/Assets/cloud-upper-right.svg
deleted file mode 100644
index 7b094441d..000000000
--- a/assets/nightly/app-icon.icon/Assets/cloud-upper-right.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-<svg width="64" height="32" viewBox="0 0 64 32" fill="none" xmlns="http://www.w3.org/2000/svg">
- <defs>
- <linearGradient id="cloud" x1="7" y1="10" x2="57" y2="25" gradientUnits="userSpaceOnUse">
- <stop stop-color="#4EA4FF" stop-opacity="0.62"/>
- <stop offset="0.52" stop-color="#696FEA" stop-opacity="0.72"/>
- <stop offset="1" stop-color="#A85BEA" stop-opacity="0.58"/>
- </linearGradient>
- <radialGradient id="highlight" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(30 14) rotate(13) scale(27 10)">
- <stop stop-color="#C8D7FF" stop-opacity="0.4"/>
- <stop offset="1" stop-color="#8C8EF2" stop-opacity="0"/>
- </radialGradient>
- <filter id="soft" x="-8" y="-8" width="80" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
- <feGaussianBlur stdDeviation="2.5"/>
- </filter>
- </defs>
-
- <g transform="translate(64 0) scale(-1 1)" filter="url(#soft)">
- <path d="M7 23.5C7 18.9 10.8 15.2 15.5 15.2C16.9 10.7 21.1 7.5 26.1 7.5C31 7.5 35.2 10.5 36.7 14.8C38.5 13.2 40.9 12.2 43.5 12.2C49.1 12.2 53.7 16.4 54.1 21.8C57 22.2 59.2 24 60 26.5H8.2C7.4 25.7 7 24.7 7 23.5Z" fill="url(#cloud)"/>
- <path d="M11 22.9C12.7 19.8 16 18 19.5 18.5C21 13.4 25.6 10 30.8 10.6C35 11 38.3 13.9 39.4 17.7C43.8 15.5 49 17.3 51.1 21.7C46.2 20.3 41.9 21 37.7 22.1C29.6 24.2 21.5 21.3 11 22.9Z" fill="url(#highlight)"/>
- </g>
-</svg>
diff --git a/assets/nightly/app-icon.icon/Assets/text.svg b/assets/nightly/app-icon.icon/Assets/text.svg
deleted file mode 100644
index 1f13f4039..000000000
--- a/assets/nightly/app-icon.icon/Assets/text.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M64 34L100 94H28L64 34ZM64 55L83 87H45L64 55Z" fill="white"/>
-<path d="M47 72H81V81H47V72Z" fill="white"/>
-</svg>
diff --git a/assets/nightly/app-icon.icon/icon.json b/assets/nightly/app-icon.icon/icon.json
deleted file mode 100644
index eb48d26b4..000000000
--- a/assets/nightly/app-icon.icon/icon.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- "fill": {
- "automatic-gradient": "display-p3:0.00000,0.00000,0.00000,1.00000"
- },
- "groups": [
- {
- "layers": [
- {
- "glass": true,
- "image-name": "text.svg",
- "name": "Text",
- "position": {
- "scale": 8.5,
- "translation-in-points": [0, 0]
- }
- },
- {
- "glass": false,
- "image-name": "cloud-upper-right.svg",
- "name": "Cloud Upper Right",
- "opacity": 1,
- "position": {
- "scale": 15,
- "translation-in-points": [387.9605131881942, -134.30064713259117]
- }
- },
- {
- "glass": false,
- "image-name": "cloud-lower-left.svg",
- "name": "Cloud Lower Left",
- "position": {
- "scale": 25,
- "translation-in-points": [-309.63750000000005, 268.66077693836917]
- }
- },
- {
- "glass": true,
- "hidden": false,
- "image-name": "background.svg",
- "name": "Background",
- "position": {
- "scale": 8.1,
- "translation-in-points": [0, -2.171875]
- }
- }
- ],
- "shadow": {
- "kind": "neutral",
- "opacity": 0.6
- },
- "translucency": {
- "enabled": true,
- "value": 0.2
- }
- },
- {
- "layers": [],
- "shadow": {
- "kind": "neutral",
- "opacity": 0.6
- },
- "translucency": {
- "enabled": true,
- "value": 0.2
- }
- },
- {
- "layers": [],
- "shadow": {
- "kind": "neutral",
- "opacity": 0.6
- },
- "translucency": {
- "enabled": true,
- "value": 0.2
- }
- },
- {
- "layers": [],
- "shadow": {
- "kind": "neutral",
- "opacity": 0.6
- },
- "translucency": {
- "enabled": true,
- "value": 0.2
- }
- }
- ],
- "supported-platforms": {
- "circles": ["watchOS"],
- "squares": "shared"
- }
-}
diff --git a/assets/nightly/nightly-ios-1024.png b/assets/nightly/nightly-ios-1024.png
deleted file mode 100644
index 41d7f12d6..000000000
Binary files a/assets/nightly/nightly-ios-1024.png and /dev/null differ
diff --git a/assets/nightly/nightly-macos-1024.png b/assets/nightly/nightly-macos-1024.png
deleted file mode 100644
index de29ad8ea..000000000
Binary files a/assets/nightly/nightly-macos-1024.png and /dev/null differ
diff --git a/assets/nightly/nightly-universal-1024.png b/assets/nightly/nightly-universal-1024.png
deleted file mode 100644
index 41d7f12d6..000000000
Binary files a/assets/nightly/nightly-universal-1024.png and /dev/null differ
diff --git a/assets/nightly/nightly-web-apple-touch-180.png b/assets/nightly/nightly-web-apple-touch-180.png
deleted file mode 100644
index 8d4effde7..000000000
Binary files a/assets/nightly/nightly-web-apple-touch-180.png and /dev/null differ
diff --git a/assets/nightly/nightly-web-favicon-16x16.png b/assets/nightly/nightly-web-favicon-16x16.png
deleted file mode 100644
index c6afedc75..000000000
Binary files a/assets/nightly/nightly-web-favicon-16x16.png and /dev/null differ
diff --git a/assets/nightly/nightly-web-favicon-32x32.png b/assets/nightly/nightly-web-favicon-32x32.png
deleted file mode 100644
index e4bf29f10..000000000
Binary files a/assets/nightly/nightly-web-favicon-32x32.png and /dev/null differ
diff --git a/assets/nightly/nightly-web-favicon.ico b/assets/nightly/nightly-web-favicon.ico
deleted file mode 100644
index f8d475967..000000000
Binary files a/assets/nightly/nightly-web-favicon.ico and /dev/null differ
diff --git a/assets/nightly/nightly-windows.ico b/assets/nightly/nightly-windows.ico
deleted file mode 100644
index f8d475967..000000000
Binary files a/assets/nightly/nightly-windows.ico and /dev/null differ
diff --git a/docs/internals/ci.md b/docs/internals/ci.md
index 1f990bbf1..e61ad51eb 100644
--- a/docs/internals/ci.md
+++ b/docs/internals/ci.md
@@ -18,7 +18,7 @@ Issue-label, PR-vouch, and PR-size jobs stay in GitHub Actions on `ubuntu-24.04`
- **Release smoke.** `scripts/release-smoke.ts` checks the public dependency rule, the supported
artifact matrix, Akeru naming, and the absence of retired publishing and deployment paths.
-[`.depot/workflows/release.yml`](../../.depot/workflows/release.yml) is a manual, non-publishing
+[`.depot/workflows/release-smoke.yml`](../../.depot/workflows/release-smoke.yml) is a manual, non-publishing
artifact smoke workflow. It uses 8-vCPU Depot runners for Linux and Windows, plus Apple Silicon
macOS. It builds a Developer ID signed macOS arm64 app. Electron-builder notarizes and staples the
app before it packages the DMG. The workflow then submits and staples the DMG as a separate object.
@@ -27,4 +27,10 @@ The workflow also builds and dry-runs the CLI package and checks the marketing s
desktop artifacts for seven days. It does not create a GitHub release, publish a package, or deploy
a site.
+Merging a stable version change to `main` starts [the stable Depot workflow](../../.depot/workflows/release.yml).
+Depot builds the advertised desktop targets and CLI package before it creates the `vX.Y.Z` tag and
+GitHub Release. The final job verifies the exact asset names and `SHA256SUMS`. Missing signing
+credentials produce unsigned macOS and Windows artifacts. Complete credentials use the existing
+Developer ID, notarization, and Azure Trusted Signing paths.
+
See the [release smoke runbook](../operations/release.md) for the exact validation path.
diff --git a/docs/internals/scripts.md b/docs/internals/scripts.md
index eb7fc355d..b75f47126 100644
--- a/docs/internals/scripts.md
+++ b/docs/internals/scripts.md
@@ -78,9 +78,9 @@ authenticated.
- Default build is unsigned/not notarized for local sharing.
- The DMG build uses `assets/prod/black-macos-1024.png` as the production app icon source.
-- The DMG chrome follows the release channel: neutral for Latest and the Nightly sky artwork for
- Nightly. Blueprint artwork remains exclusive to Dev builds. Packaging rasterizes the selected
- SVG into standard and Retina PNGs inside the disposable staging directory.
+- Production DMGs use neutral chrome. Blueprint artwork remains exclusive to Dev builds. Packaging
+ rasterizes the selected SVG into standard and Retina PNGs inside the disposable staging
+ directory.
- The Finder window is 540×412 while its background is 540×380; the extra 32px accounts for the
title bar included in Finder's window bounds.
- Desktop production windows load the bundled UI from the `t3code://app/` root URL (not a
diff --git a/docs/internals/workspace-layout.md b/docs/internals/workspace-layout.md
index 3b7cba223..82d034a1b 100644
--- a/docs/internals/workspace-layout.md
+++ b/docs/internals/workspace-layout.md
@@ -40,7 +40,7 @@ the task commands.
- `scripts/`: workspace tooling run through `vp run`. Dev runner, desktop artifact builds, release
helpers, mobile static checks and showcase capture, update-manifest merging.
-- `assets/`: brand and app icon sources per channel (`dev`, `nightly`, `prod`).
+- `assets/`: brand and app icon sources for development and production builds.
- `patches/`: pnpm patches for pinned upstream dependencies.
- `oxlint-plugin-t3code/`: repo-specific lint rules.
- `experiments/`: throwaway prototypes. Not part of the shipped build.
diff --git a/docs/operations/release.md b/docs/operations/release.md
index 3f4fcd61b..aefe268d7 100644
--- a/docs/operations/release.md
+++ b/docs/operations/release.md
@@ -5,7 +5,7 @@
> For Akeru Bot maintainers.
-`.depot/workflows/release.yml` validates release inputs without publishing or releasing anything.
+`.depot/workflows/release-smoke.yml` validates release inputs without publishing or releasing anything.
Dispatch it from Depot with a version such as `0.0.0-smoke.0`.
## What it checks
@@ -59,7 +59,7 @@ Run the focused checks before using the manual workflow:
```sh
vp install --frozen-lockfile
vp run check:public-dependencies
-vp test run scripts/check-public-dependencies.test.ts scripts/resolve-nightly-release.test.ts
+vp test run scripts/check-public-dependencies.test.ts scripts/resolve-previous-release-tag.test.ts
vp run release:smoke
vp run build:desktop
vp run --filter @t3tools/marketing typecheck
diff --git a/docs/user/install.md b/docs/user/install.md
index 682bb4e11..5e12d1eea 100644
--- a/docs/user/install.md
+++ b/docs/user/install.md
@@ -37,18 +37,10 @@ brew install --cask t3-code
Arch Linux:
-Stable:
-
```bash
yay -S t3code-bin
```
-Nightly:
-
-```bash
-yay -S t3code-nightly-bin
-```
-
## Providers
T3 Code drives provider CLIs; it does not ship them. Install the CLI for each provider you want
diff --git a/docs/user/thread-sidebar.md b/docs/user/thread-sidebar.md
index 51eca1e73..d4c4e939e 100644
--- a/docs/user/thread-sidebar.md
+++ b/docs/user/thread-sidebar.md
@@ -24,7 +24,7 @@ their pinned threads keep the default newest-first order below the ones you have
## Environment artwork
-Dev and Nightly environments can identify themselves with artwork at the top of the sidebar and in
+Dev environments can identify themselves with artwork at the top of the sidebar and in
the send button. Choose **Artwork**, **Version pill**, or **None** in Settings under environment
identification. Artwork is recolored to match each built-in theme. Custom themes use the **Version
pill** fallback because their colors are not controlled by T3 Code.
diff --git a/package.json b/package.json
index 85e22f44c..f1b2bf1b3 100644
--- a/package.json
+++ b/package.json
@@ -43,6 +43,9 @@
"dist:desktop:win:arm64": "node scripts/build-desktop-artifact.ts --platform win --target nsis --arch arm64",
"dist:desktop:win:x64": "node scripts/build-desktop-artifact.ts --platform win --target nsis --arch x64",
"release:smoke": "node scripts/release-smoke.ts",
+ "tegami": "node scripts/tegami.ts",
+ "release:verify": "node scripts/verify-release-candidate.ts",
+ "release:verify-assets": "node scripts/verify-release-assets.ts",
"clean": "rm -rf node_modules apps/*/node_modules packages/*/node_modules apps/*/dist apps/*/dist-electron packages/*/dist .vite-plus apps/*/.vite-plus packages/*/.vite-plus",
"sync:repos": "node scripts/sync-reference-repos.ts"
},
@@ -52,6 +55,7 @@
"@oxlint/plugins": "^1.63.0",
"@types/node": "catalog:",
"@typescript/native-preview": "catalog:",
+ "tegami": "1.4.0",
"vite-plus": "catalog:"
},
"engines": {
diff --git a/packages/contracts/src/ipc.ts b/packages/contracts/src/ipc.ts
index 7d135d47c..264b71a1d 100644
--- a/packages/contracts/src/ipc.ts
+++ b/packages/contracts/src/ipc.ts
@@ -154,8 +154,8 @@ export type DesktopUpdateStatus =
export type DesktopRuntimeArch = "arm64" | "x64" | "other";
export type DesktopTheme = "light" | "dark" | "system";
-export type DesktopUpdateChannel = "latest" | "nightly";
-export type DesktopAppStageLabel = "Alpha" | "Dev" | "Nightly";
+export type DesktopUpdateChannel = "latest";
+export type DesktopAppStageLabel = "Alpha" | "Dev";
export const DesktopUpdateStatusSchema = Schema.Literals([
"disabled",
@@ -169,8 +169,8 @@ export const DesktopUpdateStatusSchema = Schema.Literals([
]);
export const DesktopRuntimeArchSchema = Schema.Literals(["arm64", "x64", "other"]);
export const DesktopThemeSchema = Schema.Literals(["light", "dark", "system"]);
-export const DesktopUpdateChannelSchema = Schema.Literals(["latest", "nightly"]);
-export const DesktopAppStageLabelSchema = Schema.Literals(["Alpha", "Dev", "Nightly"]);
+export const DesktopUpdateChannelSchema = Schema.Literal("latest");
+export const DesktopAppStageLabelSchema = Schema.Literals(["Alpha", "Dev"]);
export interface DesktopAppBranding {
baseName: string;
diff --git a/packages/ssh/src/command.test.ts b/packages/ssh/src/command.test.ts
index e5b621f87..f2c281352 100644
--- a/packages/ssh/src/command.test.ts
+++ b/packages/ssh/src/command.test.ts
@@ -99,7 +99,7 @@ describe("ssh command", () => {
}),
);
- it.effect("resolves the remote t3 package spec from the desktop release channel", () =>
+ it.effect("resolves the stable remote t3 package spec", () =>
Effect.sync(() => {
assert.equal(
resolveRemoteT3CliPackageSpec({
@@ -108,28 +108,13 @@ describe("ssh command", () => {
}),
);
- assert.equal(
- resolveRemoteT3CliPackageSpec({
- appVersion: "0.0.17-nightly.20260415.44",
- updateChannel: "nightly",
- }),
- );
- assert.equal(
- resolveRemoteT3CliPackageSpec({
- appVersion: "0.0.0-dev",
- updateChannel: "nightly",
- isDevelopment: true,
- }),
- "t3@nightly",
- );
assert.equal(
resolveRemoteT3CliPackageSpec({
appVersion: "0.0.0-dev",
updateChannel: "latest",
isDevelopment: true,
}),
- "t3@nightly",
+ "t3@latest",
);
}),
);
diff --git a/packages/ssh/src/command.ts b/packages/ssh/src/command.ts
index 10927b430..8716b228a 100644
--- a/packages/ssh/src/command.ts
+++ b/packages/ssh/src/command.ts
@@ -374,9 +374,5 @@ export function resolveRemoteT3CliPackageSpec(input: {
return `t3@${appVersion}`;
}
- if (input.isDevelopment) {
- return "t3@nightly";
- }
-
- return input.updateChannel === "nightly" ? "t3@nightly" : "t3@latest";
+ return "t3@latest";
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 7d73986a0..45e15d50c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -101,6 +101,9 @@ importers:
'@typescript/native-preview':
specifier: 'catalog:'
version: 7.0.0-dev.20260604.1
+ tegami:
+ specifier: 1.4.0
+ version: 1.4.0
vite-plus:
specifier: 'catalog:'
@@ -175,6 +178,9 @@ importers:
'@astrojs/check':
specifier: ^0.9.7
+ '@effect/vitest':
+ specifier: 4.0.0-beta.103
+ version: 4.0.0-beta.103(patch_hash=a16b1e870d8c29e4a98b17cc4c638a4ff471753d8ca3487f78a22b759caf951b)([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
'@vercel/config':
specifier: ^0.3.0
version: 0.3.0
@@ -2116,6 +2122,10 @@ packages:
resolution: {integrity: sha512-0Ty/1Gfm+Kb07sXcuESjyKfwEhSy4Ns1AgeEisHb/bDY5fWme0tTeTkU14T1Gmcs17YIjB/teiDe4uaCghbYqQ==}
engines: {node: '>= 20.12.0'}
+ '@clack/[email protected]':
+ resolution: {integrity: sha512-/kr3UWNtdJfxZtPgDqUOmG2pvwlmcLGheex5yiZKdwbzZJxhV+HMNR9QNmyY5cGwTNV6LrR7Jtp+KjhUAP1qBQ==}
+ engines: {node: '>= 20.12.0'}
+
resolution: {integrity: sha512-pMN5FcrEw9hUkZA4f+zLlzivQSeQf5dRGJjSUbvVYDLvpKCdQx5OaknvKzgbtXOizhP+SJJJjqEbOe55uKKfAw==}
@@ -2123,6 +2133,10 @@ packages:
resolution: {integrity: sha512-EYlRokl8szrP9Z25qT5aepMdBjzBvHF9ZEhzIiUBc9guz/T31EqRgvD0QSgZcpE93xiwrr+OkB4nz0BZyF6fSA==}
engines: {node: '>= 20.12.0'}
+ '@clack/[email protected]':
+ resolution: {integrity: sha512-y7/yvZ2TPAnR9+jnc00klvNNLkJiXFFrQA/hlLCcxA9a2A4zQIOimyFQ9XfwYKiGD1fb5GY8vbKIIgO8d5Tb2A==}
+ engines: {node: '>= 20.12.0'}
+
'@cloudflare/[email protected]':
resolution: {integrity: sha512-ECxObrMfyTl5bhQf/lZCXwo5G6xX9IAUo+nDMKK4SZ8m4Jvvxp52vilxyySSWh2YTZz8+HQ07qGH/2rEom1vDw==}
peerDependencies:
@@ -4704,6 +4718,9 @@ packages:
'@types/react':
optional: true
+ '@rainbowatcher/[email protected]':
+ resolution: {integrity: sha512-EdALJyTDcp2yOxeVw1OJevOF7NZrlWAbVEnOnQBV7YqycVCI0OcpDy6oLUa8vqSvv2F1RmXW7kz1kgYv2A5h/w==}
+
'@react-grab/[email protected]':
resolution: {integrity: sha512-gMDYY2rw6OWajCcDlXSIgs2LC432YJXSb3Lm5yM187uhRgBYddoEVULi36h+IolX3r7jSb3ew7vn9FfI8NSo0A==}
hasBin: true
@@ -12185,6 +12202,9 @@ packages:
resolution: {integrity: sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==}
+ resolution: {integrity: sha512-QjoIJuAdsp+iAb1NT1CDn6zvxa7HqmEdJLN2BKW7LXZ8pbga/8tktcZr9bArw7KBdT5+Zj5Y9kreF3gjgrpfKQ==}
+
resolution: {integrity: sha512-C5tjlC/HCtVUOi3KWVokd4vHVViOmGjtLwIh4MuzPo/nMYTV/p1urt3RnMz2IWXDdKEGJH3k5+KPxtqRsUYGtg==}
@@ -14700,6 +14720,11 @@ snapshots:
fast-wrap-ansi: 0.2.2
sisteransi: 1.0.5
+ '@clack/[email protected]':
+ dependencies:
+ fast-wrap-ansi: 0.2.2
+ sisteransi: 1.0.5
+
dependencies:
'@clack/core': 0.5.0
@@ -14713,6 +14738,13 @@ snapshots:
fast-wrap-ansi: 0.2.2
sisteransi: 1.0.5
+ '@clack/[email protected]':
+ dependencies:
+ '@clack/core': 1.4.3
+ fast-string-width: 3.0.2
+ fast-wrap-ansi: 0.2.2
+ sisteransi: 1.0.5
+
dependencies:
unenv: 2.0.0-rc.24
@@ -17920,6 +17952,8 @@ snapshots:
'@types/react': 19.2.16
optional: true
+ '@rainbowatcher/[email protected]': {}
+
'@react-grab/[email protected]':
dependencies:
agent-install: 0.0.5
@@ -26779,6 +26813,15 @@ snapshots:
- bare-abort-controller
- react-native-b4a
+ dependencies:
+ '@clack/prompts': 1.7.0
+ '@rainbowatcher/toml-edit-js': 0.6.5
+ semver: 7.8.5
+ tinyexec: 1.2.4
+ tinyglobby: 0.2.17
+ yaml: 2.9.0
+
dependencies:
async-exit-hook: 2.0.1
diff --git a/scripts/apply-web-brand-assets.ts b/scripts/apply-web-brand-assets.ts
index 30e6bc325..d13ef099d 100644
--- a/scripts/apply-web-brand-assets.ts
+++ b/scripts/apply-web-brand-assets.ts
@@ -16,7 +16,6 @@ import {
const WEB_ASSET_BRANDS = [
"development",
- "nightly",
"production",
] as const satisfies ReadonlyArray<WebAssetBrand>;
diff --git a/scripts/build-desktop-artifact.test.ts b/scripts/build-desktop-artifact.test.ts
index c665b7b21..39e4fb012 100644
--- a/scripts/build-desktop-artifact.test.ts
+++ b/scripts/build-desktop-artifact.test.ts
@@ -147,33 +147,24 @@ const makeWindowsPayloadFixture = Effect.fn("test.makeWindowsPayloadFixture")(fu
});
it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
- it("resolves the dedicated nightly updater channel from nightly versions", () => {
- assert.equal(resolveDesktopUpdateChannel("0.0.17-nightly.20260413.42"), "nightly");
+ it("uses the latest updater channel", () => {
assert.equal(resolveDesktopUpdateChannel("0.0.17"), "latest");
});
- it("switches desktop packaging product names to nightly for nightly builds", () => {
+ it("uses the Akeru Bot product name", () => {
assert.equal(resolveDesktopProductName("0.0.17"), "Akeru Bot (Alpha)");
- assert.equal(resolveDesktopProductName("0.0.17-nightly.20260413.42"), "Akeru Bot (Nightly)");
});
- it("switches desktop packaging icons to the nightly artwork for nightly versions", () => {
+ it("uses production desktop artwork", () => {
assert.deepStrictEqual(resolveDesktopBuildIconAssets("0.0.17"), {
macIconPng: BRAND_ASSET_PATHS.productionMacIconPng,
linuxIconPng: BRAND_ASSET_PATHS.productionLinuxIconPng,
windowsIconIco: BRAND_ASSET_PATHS.productionWindowsIconIco,
});
-
- assert.deepStrictEqual(resolveDesktopBuildIconAssets("0.0.17-nightly.20260413.42"), {
- macIconPng: BRAND_ASSET_PATHS.nightlyMacIconPng,
- linuxIconPng: BRAND_ASSET_PATHS.nightlyLinuxIconPng,
- windowsIconIco: BRAND_ASSET_PATHS.nightlyWindowsIconIco,
- });
});
- it("switches the bundled splash and favicon branding for nightly versions", () => {
+ it("uses production web artwork", () => {
assert.equal(resolveDesktopWebAssetBrand("0.0.17"), "production");
- assert.equal(resolveDesktopWebAssetBrand("0.0.17-nightly.20260413.42"), "nightly");
});
it.effect("resolves GitHub desktop publish config from Effect config", () =>
@@ -189,31 +180,12 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
),
),
);
- const nightlyConfig = yield* resolveGitHubPublishConfig("nightly").pipe(
- Effect.provide(
- ConfigProvider.layer(
- ConfigProvider.fromEnv({
- env: {
- GITHUB_REPOSITORY: "pingdotgg/t3code",
- },
- }),
- ),
- ),
- );
-
assert.deepStrictEqual(latestConfig, {
provider: "github",
owner: "pingdotgg",
repo: "t3code",
releaseType: "release",
});
- assert.deepStrictEqual(nightlyConfig, {
- provider: "github",
- owner: "pingdotgg",
- repo: "t3code",
- releaseType: "prerelease",
- channel: "nightly",
- });
}),
);
@@ -993,58 +965,6 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
});
});
- it.effect("rasterizes staged DMG backgrounds at standard and Retina sizes", () =>
- Effect.scoped(
- Effect.gen(function* () {
- const fs = yield* FileSystem.FileSystem;
- const path = yield* Path.Path;
- const stageResourcesDir = yield* fs.makeTempDirectoryScoped({
- prefix: "t3code-dmg-background-",
- });
- const dmgDir = path.join(stageResourcesDir, "dmg");
- yield* fs.makeDirectory(dmgDir, { recursive: true });
- const sourcePath = path.join(dmgDir, "dmg-background-nightly.svg");
- yield* fs.writeFileString(sourcePath, '<svg xmlns="http://www.w3.org/2000/svg"/>');
- const commands: Array<{ readonly command: string; readonly args: ReadonlyArray<string> }> =
- [];
-
- yield* stageDesktopDmgBackground(stageResourcesDir, "nightly", false).pipe(
- Effect.provide(iconResizeSpawnerLayer(commands, [0, 0])),
- );
-
- assert.deepStrictEqual(
- commands.map((command) => [command.command, ...command.args]),
- [
- [
- "sips",
- "-s",
- "format",
- "png",
- "-z",
- "380",
- "540",
- sourcePath,
- "--out",
- path.join(dmgDir, "dmg-background-nightly.png"),
- ],
- [
- "sips",
- "-s",
- "format",
- "png",
- "-z",
- "760",
- "1080",
- sourcePath,
- "--out",
- path.join(dmgDir, "[email protected]"),
- ],
- ],
- );
- }),
- ),
- );
-
it.effect("fails clearly when the selected DMG background source is missing", () =>
Effect.scoped(
Effect.gen(function* () {
@@ -1053,9 +973,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
prefix: "t3code-dmg-background-missing-",
});
- const error = yield* stageDesktopDmgBackground(stageResourcesDir, "latest", false).pipe(
- Effect.flip,
- );
+ const error = yield* stageDesktopDmgBackground(stageResourcesDir, false).pipe(Effect.flip);
assert.instanceOf(error, DesktopDmgBackgroundSourceMissingError);
assert.equal(error.channel, "latest");
@@ -1110,26 +1028,6 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
}).pipe(Effect.provide(ConfigProvider.layer(ConfigProvider.fromEnv({ env: {} })))),
);
- it.effect("uses the nightly DMG background for nightly macOS builds", () =>
- Effect.gen(function* () {
- const config = yield* createBuildConfig(
- "mac",
- "dmg",
- "1.2.3-nightly.20260815.1",
- false,
- false,
- undefined,
- undefined,
- );
-
- assert.equal(
- (config.dmg as Record<string, unknown>).background,
- "dmg/dmg-background-nightly.png",
- );
- assert.equal((config.mac as Record<string, unknown>).notarize, false);
- }).pipe(Effect.provide(ConfigProvider.layer(ConfigProvider.fromEnv({ env: {} })))),
- );
-
it.effect("keeps executable resource editing enabled for unsigned Windows builds", () =>
Effect.gen(function* () {
const config = yield* createBuildConfig(
diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts
index 5757cf6e3..ea7453fed 100644
--- a/scripts/build-desktop-artifact.ts
+++ b/scripts/build-desktop-artifact.ts
@@ -302,7 +302,7 @@ export class DesktopIconSourceMissingError extends Schema.TaggedErrorClass<Deskt
export class DesktopDmgBackgroundSourceMissingError extends Schema.TaggedErrorClass<DesktopDmgBackgroundSourceMissingError>()(
"DesktopDmgBackgroundSourceMissingError",
{
- channel: Schema.Literals(["latest", "nightly"]),
+ channel: Schema.Literal("latest"),
sourcePath: Schema.String,
},
) {
@@ -1536,14 +1536,13 @@ function stageMacIcons(stageResourcesDir: string, sourcePng: string, verbose: bo
export const stageDesktopDmgBackground = Effect.fn("stageDesktopDmgBackground")(function* (
stageResourcesDir: string,
- channel: "latest" | "nightly",
verbose: boolean,
) {
const fs = yield* FileSystem.FileSystem;
const path = yield* Path.Path;
- const sourcePath = path.join(stageResourcesDir, "dmg", `dmg-background-${channel}.svg`);
+ const sourcePath = path.join(stageResourcesDir, "dmg", "dmg-background-latest.svg");
if (!(yield* fs.exists(sourcePath))) {
- return yield* new DesktopDmgBackgroundSourceMissingError({ channel, sourcePath });
+ return yield* new DesktopDmgBackgroundSourceMissingError({ channel: "latest", sourcePath });
}
for (const output of [
@@ -1553,14 +1552,14 @@ export const stageDesktopDmgBackground = Effect.fn("stageDesktopDmgBackground")(
const targetPath = path.join(
stageResourcesDir,
"dmg",
- `dmg-background-${channel}${output.suffix}.png`,
+ `dmg-background-latest${output.suffix}.png`,
);
yield* runCommand(
ChildProcess.make(
{},
)`sips -s format png -z ${output.height} ${output.width} ${sourcePath} --out ${targetPath}`,
{
- label: `sips ${channel} DMG background${output.suffix || "@1x"}`,
+ label: `sips latest DMG background${output.suffix || "@1x"}`,
verbose,
},
);
@@ -1699,7 +1698,7 @@ export function resolveDesktopRuntimeDependencies(
}
export const resolveGitHubPublishConfig = Effect.fn("resolveGitHubPublishConfig")(function* (
- updateChannel: "latest" | "nightly",
+ _updateChannel: "latest",
) {
const env = yield* Config.all({
updateRepository: Config.string("T3CODE_DESKTOP_UPDATE_REPOSITORY").pipe(Config.option),
@@ -1719,13 +1718,12 @@ export const resolveGitHubPublishConfig = Effect.fn("resolveGitHubPublishConfig"
provider: "github",
owner,
repo,
- releaseType: updateChannel === "nightly" ? "prerelease" : "release",
- ...(updateChannel === "nightly" ? { channel: "nightly" as const } : {}),
+ releaseType: "release",
};
});
-export function resolveDesktopUpdateChannel(version: string): "latest" | "nightly" {
- return /-nightly\.\d{8}\.\d+$/.test(version) ? "nightly" : "latest";
+export function resolveDesktopUpdateChannel(_version: string): "latest" {
+ return "latest";
}
function isDesktopPreviewVersion(version: string): boolean {
@@ -1736,15 +1734,7 @@ export function resolveDesktopWebAssetBrand(version: string): WebAssetBrand {
return resolveWebAssetBrandForChannel(resolveDesktopUpdateChannel(version));
}
-export function resolveDesktopBuildIconAssets(version: string): DesktopBuildIconAssets {
- if (resolveDesktopUpdateChannel(version) === "nightly") {
- return {
- macIconPng: BRAND_ASSET_PATHS.nightlyMacIconPng,
- linuxIconPng: BRAND_ASSET_PATHS.nightlyLinuxIconPng,
- windowsIconIco: BRAND_ASSET_PATHS.nightlyWindowsIconIco,
- };
- }
-
+export function resolveDesktopBuildIconAssets(_version: string): DesktopBuildIconAssets {
return {
macIconPng: BRAND_ASSET_PATHS.productionMacIconPng,
linuxIconPng: BRAND_ASSET_PATHS.productionLinuxIconPng,
@@ -1769,10 +1759,8 @@ export function resolvePackageManagerUserAgent(packageManager: string): string {
return `${trimmed.slice(0, versionSeparator)}/${trimmed.slice(versionSeparator + 1)}`;
}
-export function resolveDesktopProductName(version: string): string {
- return resolveDesktopUpdateChannel(version) === "nightly"
- ? "Akeru Bot (Nightly)"
- : (desktopPackageJson.productName ?? "Akeru Bot");
+export function resolveDesktopProductName(_version: string): string {
+ return desktopPackageJson.productName ?? "Akeru Bot";
}
export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
@@ -2581,11 +2569,7 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* (
yield* fs.copy(distDirs.desktopDist, path.join(stageAppDir, "apps/desktop/dist-electron"));
yield* fs.copy(distDirs.desktopResources, stageResourcesDir);
if (options.platform === "mac" && options.target === "dmg") {
- yield* stageDesktopDmgBackground(
- stageResourcesDir,
- resolveDesktopUpdateChannel(appVersion),
- options.verbose,
- );
+ yield* stageDesktopDmgBackground(stageResourcesDir, options.verbose);
}
// On Windows the server tree ships in the server.asar sidecar instead of
// app.asar (see stageWindowsServerSidecar), so the app stage omits it.
diff --git a/scripts/export-brand-icons.ts b/scripts/export-brand-icons.ts
index 04b41f278..c2a66941a 100644
--- a/scripts/export-brand-icons.ts
+++ b/scripts/export-brand-icons.ts
@@ -217,20 +217,6 @@ const ICON_VARIANTS = [
windowsIco: BRAND_ASSET_PATHS.developmentWindowsIconIco,
},
},
- {
- label: "preview",
- source: BRAND_ASSET_PATHS.nightlyIconComposerProject,
- outputs: {
- ios: BRAND_ASSET_PATHS.nightlyIosIconPng,
- macos: BRAND_ASSET_PATHS.nightlyMacIconPng,
- universal: BRAND_ASSET_PATHS.nightlyLinuxIconPng,
- appleTouch: BRAND_ASSET_PATHS.nightlyWebAppleTouchIconPng,
- favicon16: BRAND_ASSET_PATHS.nightlyWebFavicon16Png,
- favicon32: BRAND_ASSET_PATHS.nightlyWebFavicon32Png,
- faviconIco: BRAND_ASSET_PATHS.nightlyWebFaviconIco,
- windowsIco: BRAND_ASSET_PATHS.nightlyWindowsIconIco,
- },
- },
{
label: "production",
source: BRAND_ASSET_PATHS.productionIconComposerProject,
diff --git a/scripts/lib/brand-assets.test.ts b/scripts/lib/brand-assets.test.ts
index 8265ad681..db27742f4 100644
--- a/scripts/lib/brand-assets.test.ts
+++ b/scripts/lib/brand-assets.test.ts
@@ -66,35 +66,20 @@ describe("brand-assets", () => {
});
});
- it("maps hosted nightly web assets to nightly icons", () => {
- expect(resolveWebIconOverrides("nightly", "apps/web/dist")).toContainEqual({
- sourceRelativePath: BRAND_ASSET_PATHS.nightlyWebFaviconIco,
- targetRelativePath: "apps/web/dist/favicon.ico",
- });
- });
-
- it("maps hosted release channels to web asset brands", () => {
+ it("maps the hosted release channel to production web assets", () => {
expect(resolveWebAssetBrandForChannel("latest")).toBe("production");
- expect(resolveWebAssetBrandForChannel("nightly")).toBe("nightly");
});
- it("maps package versions to web asset brands", () => {
+ it("uses production web assets for packaged versions", () => {
expect(resolveWebAssetBrandForPackageVersion("0.0.29")).toBe("production");
- expect(resolveWebAssetBrandForPackageVersion("0.0.29-nightly.20260723.882")).toBe("nightly");
});
- it("keeps development, nightly, and production icon families separate", () => {
+ it("keeps development and production icon families separate", () => {
expect([
BRAND_ASSET_PATHS.developmentIconComposerProject,
- BRAND_ASSET_PATHS.nightlyIconComposerProject,
BRAND_ASSET_PATHS.productionIconComposerProject,
- ]).toEqual([
- "assets/dev/app-icon.icon",
- "assets/nightly/app-icon.icon",
- "assets/prod/app-icon.icon",
- ]);
+ ]).toEqual(["assets/dev/app-icon.icon", "assets/prod/app-icon.icon"]);
expect(BRAND_ASSET_PATHS.developmentDesktopIconPng).toMatch(/^assets\/dev\/blueprint-/);
- expect(BRAND_ASSET_PATHS.nightlyMacIconPng).toMatch(/^assets\/nightly\/nightly-/);
expect(BRAND_ASSET_PATHS.productionMacIconPng).toMatch(/^assets\/prod\/black-/);
});
});
diff --git a/scripts/lib/brand-assets.ts b/scripts/lib/brand-assets.ts
index 2dcc6ccd6..14a067d3e 100644
--- a/scripts/lib/brand-assets.ts
+++ b/scripts/lib/brand-assets.ts
@@ -13,16 +13,6 @@ export const BRAND_ASSET_PATHS = {
productionWebFavicon32Png: "assets/prod/t3-black-web-favicon-32x32.png",
productionWebAppleTouchIconPng: "assets/prod/t3-black-web-apple-touch-180.png",
- nightlyIconComposerProject: "assets/nightly/app-icon.icon",
- nightlyIosIconPng: "assets/nightly/nightly-ios-1024.png",
- nightlyMacIconPng: "assets/nightly/nightly-macos-1024.png",
- nightlyLinuxIconPng: "assets/nightly/nightly-universal-1024.png",
- nightlyWindowsIconIco: "assets/nightly/nightly-windows.ico",
- nightlyWebFaviconIco: "assets/nightly/nightly-web-favicon.ico",
- nightlyWebFavicon16Png: "assets/nightly/nightly-web-favicon-16x16.png",
- nightlyWebFavicon32Png: "assets/nightly/nightly-web-favicon-32x32.png",
- nightlyWebAppleTouchIconPng: "assets/nightly/nightly-web-apple-touch-180.png",
-
developmentDesktopIconPng: "assets/dev/blueprint-macos-1024.png",
developmentWindowsIconIco: "assets/dev/blueprint-windows.ico",
developmentWebFaviconIco: "assets/dev/blueprint-web-favicon.ico",
@@ -31,18 +21,18 @@ export const BRAND_ASSET_PATHS = {
developmentWebAppleTouchIconPng: "assets/dev/blueprint-web-apple-touch-180.png",
} as const;
-export type WebAssetBrand = "development" | "nightly" | "production";
+export type WebAssetBrand = "development" | "production";
-export const WEB_ASSET_CHANNELS = ["latest", "nightly"] as const;
+export const WEB_ASSET_CHANNELS = ["latest"] as const;
export type WebAssetChannel = (typeof WEB_ASSET_CHANNELS)[number];
export function resolveWebAssetBrandForChannel(channel: WebAssetChannel): WebAssetBrand {
- return channel === "nightly" ? "nightly" : "production";
+ return channel === "latest" ? "production" : channel;
}
-export function resolveWebAssetBrandForPackageVersion(version: string): WebAssetBrand {
- return version.includes("-nightly.") ? "nightly" : "production";
+export function resolveWebAssetBrandForPackageVersion(_version: string): WebAssetBrand {
+ return "production";
}
export interface IconOverride {
@@ -64,12 +54,6 @@ const WEB_ICON_SOURCE_PATHS_BY_BRAND = {
favicon32Png: BRAND_ASSET_PATHS.developmentWebFavicon32Png,
appleTouchIconPng: BRAND_ASSET_PATHS.developmentWebAppleTouchIconPng,
},
- nightly: {
- faviconIco: BRAND_ASSET_PATHS.nightlyWebFaviconIco,
- favicon16Png: BRAND_ASSET_PATHS.nightlyWebFavicon16Png,
- favicon32Png: BRAND_ASSET_PATHS.nightlyWebFavicon32Png,
- appleTouchIconPng: BRAND_ASSET_PATHS.nightlyWebAppleTouchIconPng,
- },
production: {
faviconIco: BRAND_ASSET_PATHS.productionWebFaviconIco,
favicon16Png: BRAND_ASSET_PATHS.productionWebFavicon16Png,
diff --git a/scripts/notify-discord-release.test.ts b/scripts/notify-discord-release.test.ts
index 7ca108f31..d14a6e371 100644
--- a/scripts/notify-discord-release.test.ts
+++ b/scripts/notify-discord-release.test.ts
@@ -21,50 +21,6 @@ const latestAnnouncement = {
const webhookUrl = new URL("https://discord.com/api/webhooks/123456/secret-token");
-it("builds a prerelease Discord announcement for nightly subscribers", () => {
- assert.deepStrictEqual(
- buildDiscordReleaseAnnouncement({
- target: "prerelease",
- roleId: "111111111111111111",
- releaseName: "T3 Code Nightly 1.2.4-nightly.20260501.17 (abcdef123456)",
- version: "1.2.4-nightly.20260501.17",
- tag: "v1.2.4-nightly.20260501.17",
- releaseUrl: new URL(
- "https://github.com/t3dotgg/t3-code/releases/tag/v1.2.4-nightly.20260501.17",
- ),
- timestamp: "2026-05-01T01:41:00.000Z",
- }),
- {
- content:
- "<@&111111111111111111> Prerelease published: T3 Code Nightly 1.2.4-nightly.20260501.17 (abcdef123456)",
- allowed_mentions: {
- roles: ["111111111111111111"],
- },
- embeds: [
- {
- title: "T3 Code Nightly 1.2.4-nightly.20260501.17 (abcdef123456)",
- url: "https://github.com/t3dotgg/t3-code/releases/tag/v1.2.4-nightly.20260501.17",
- description: "A new T3 Code prerelease is available for nightly testers.",
- color: 0x5865f2,
- fields: [
- {
- name: "Version",
- value: "1.2.4-nightly.20260501.17",
- inline: true,
- },
- {
- name: "Tag",
- value: "v1.2.4-nightly.20260501.17",
- inline: true,
- },
- ],
- timestamp: "2026-05-01T01:41:00.000Z",
- },
- ],
- },
- );
-});
-
it("builds a latest Discord announcement for stable subscribers", () => {
assert.deepStrictEqual(buildDiscordReleaseAnnouncement(latestAnnouncement), {
content: "<@&222222222222222222> Latest published: T3 Code v1.2.3",
diff --git a/scripts/notify-discord-release.ts b/scripts/notify-discord-release.ts
index d013e7c2f..5c86b5a85 100644
--- a/scripts/notify-discord-release.ts
+++ b/scripts/notify-discord-release.ts
@@ -16,7 +16,7 @@ import {
HttpClientResponse,
} from "effect/unstable/http";
-export type DiscordReleaseTarget = "prerelease" | "latest";
+export type DiscordReleaseTarget = "latest";
export interface DiscordReleaseAnnouncementOptions {
readonly target: DiscordReleaseTarget;
@@ -47,12 +47,12 @@ interface DiscordWebhookPayload {
}>;
}
-const DISCORD_RELEASE_TARGETS = ["prerelease", "latest"] as const;
+const DISCORD_RELEASE_TARGETS = ["latest"] as const;
const DiscordRoleIdSchema = Schema.String.check(Schema.isPattern(/^\d+$/));
const DiscordWebhookUrl = Config.url("DISCORD_WEBHOOK_URL");
const discordReleaseErrorContext = {
- target: Schema.Literals(["prerelease", "latest"]),
+ target: Schema.Literal("latest"),
releaseName: Schema.String,
version: Schema.String,
tag: Schema.String,
@@ -98,12 +98,10 @@ export type DiscordReleaseAnnouncementError = typeof DiscordReleaseAnnouncementE
export const isDiscordReleaseAnnouncementError = Schema.is(DiscordReleaseAnnouncementError);
const targetLabels = {
- prerelease: "Prerelease",
latest: "Latest",
} as const satisfies Record<DiscordReleaseTarget, string>;
const targetColors = {
- prerelease: 0x5865f2,
latest: 0x2ecc71,
} as const satisfies Record<DiscordReleaseTarget, number>;
@@ -135,10 +133,7 @@ export const buildDiscordReleaseAnnouncement = (
{
title: options.releaseName,
url: options.releaseUrl.href,
- description:
- options.target === "prerelease"
- ? "A new T3 Code prerelease is available for nightly testers."
- : "A new T3 Code latest release is available.",
+ description: "A new T3 Code latest release is available.",
color: targetColors[options.target],
fields: [
{
@@ -222,7 +217,7 @@ export const notifyDiscordReleaseCommand = Command.make(
"notify-discord-release",
{
target: Argument.choice("target", DISCORD_RELEASE_TARGETS).pipe(
- Argument.withDescription("Discord announcement target: prerelease or latest."),
+ Argument.withDescription("Discord announcement target."),
),
roleId: Flag.string("role-id").pipe(
Flag.withSchema(DiscordRoleIdSchema),
diff --git a/scripts/release-smoke.ts b/scripts/release-smoke.ts
index f4891ee34..d937710f6 100644
--- a/scripts/release-smoke.ts
+++ b/scripts/release-smoke.ts
@@ -25,8 +25,10 @@ function assertOmits(haystack: string, needle: string, message: string): void {
}
const releaseWorkflow = read(".depot/workflows/release.yml");
+const releaseSmokeWorkflow = read(".depot/workflows/release-smoke.yml");
const ciWorkflow = read(".depot/workflows/ci.yml");
const desktopArtifactBuilder = read("scripts/build-desktop-artifact.ts");
+const serverCli = read("apps/server/scripts/cli.ts");
const depotWorkflowDirectory = NodePath.join(repoRoot, ".depot/workflows");
for (const workflowFile of NodeFS.readdirSync(depotWorkflowDirectory)) {
@@ -48,6 +50,7 @@ assertContains(
'artifactName: "Akeru-Bot-${version}-${arch}.${ext}"',
"Desktop artifacts do not use the Akeru Bot release name.",
);
+assertContains(serverCli, '"akeru-bot",', "CLI publishing does not select the Akeru package.");
for (const [needle, label] of [
["label: macOS arm64 DMG", "macOS arm64 DMG"],
@@ -70,7 +73,7 @@ for (const [needle, label] of [
["vp run --filter @t3tools/marketing typecheck", "marketing typecheck"],
["vp run --filter @t3tools/marketing build", "marketing build"],
] as const) {
- assertContains(releaseWorkflow, needle, `Release workflow is missing ${label}.`);
+ assertContains(releaseSmokeWorkflow, needle, `Release smoke workflow is missing ${label}.`);
}
for (const [needle, label] of [
@@ -83,9 +86,41 @@ for (const [needle, label] of [
["T3 Code", "T3 release naming"],
[".env.example", "T3 environment template"],
] as const) {
- assertOmits(releaseWorkflow, needle, `Release workflow still contains ${label}.`);
+ assertOmits(releaseSmokeWorkflow, needle, `Release smoke workflow still contains ${label}.`);
}
+for (const [needle, label] of [
+ ["branches: [main]", "main branch trigger"],
+ ["needs: [preflight, desktop, cli]", "build gates"],
+ ["label: macOS arm64 DMG", "macOS arm64 DMG"],
+ ["label: Windows x64 NSIS", "Windows x64 NSIS"],
+ ["label: Linux x64 AppImage", "Linux x64 AppImage"],
+ ["runner: depot-macos-15", "Depot macOS runner"],
+ ["runner: depot-windows-2025-8", "Depot Windows runner"],
+ ["runner: depot-ubuntu-24.04-8", "Depot Linux runner"],
+ ["Signing credentials must be either complete or absent.", "unsigned signing fallback"],
+ ["--signed", "existing signed build path"],
+ ["xcrun notarytool submit", "macOS notarization"],
+ ["vp run --filter akeru-bot build", "CLI build"],
+ ["--dry-run", "CLI package check"],
+ ['test -f "release/akeru-bot-$RELEASE_VERSION.tgz"', "exact CLI package asset check"],
+ ["verify-release-assets.ts", "asset name and hash verification"],
+ ["gh release create", "stable GitHub Release"],
+] as const) {
+ assertContains(releaseWorkflow, needle, `Stable release workflow is missing ${label}.`);
+}
+
+assertContains(releaseWorkflow, "tag=v%s\\n", "Stable release workflow does not use a vX.Y.Z tag.");
+assertContains(
+ releaseWorkflow,
+ "APPLE_API_KEY: ${{ runner.temp }}/notarytool-api-key.p8",
+ "Signed macOS verification cannot access the App Store Connect key.",
+);
+const desktopJobHeader = /\n desktop:\n([\s\S]*?)\n strategy:/u.exec(releaseWorkflow)?.[1];
+if (!desktopJobHeader) throw new Error("Stable release workflow is missing the desktop job.");
+assertOmits(desktopJobHeader, "secrets.", "Desktop signing secrets are scoped at the job level");
+assertOmits(releaseWorkflow, "macOS x64", "unadvertised macOS x64 build");
+
for (const [needle, label] of [
["blacksmith", "private CI runners"],
["thread-transfer", "thread transfer reporting"],
diff --git a/scripts/resolve-nightly-release.test.ts b/scripts/resolve-nightly-release.test.ts
deleted file mode 100644
index 68b73b895..000000000
--- a/scripts/resolve-nightly-release.test.ts
+++ /dev/null
@@ -1,122 +0,0 @@
-import * as NodeServices from "@effect/platform-node/NodeServices";
-import { assert, it } from "@effect/vitest";
-import * as Config from "effect/Config";
-import * as ConfigProvider from "effect/ConfigProvider";
-import * as Effect from "effect/Effect";
-import * as FileSystem from "effect/FileSystem";
-import * as Path from "effect/Path";
-import * as PlatformError from "effect/PlatformError";
-
-import {
- readDesktopBaseVersion,
- resolveNightlyBaseVersion,
- resolveNightlyReleaseMetadata,
- resolveNightlyTargetVersion,
- writeNightlyReleaseOutput,
-} from "./resolve-nightly-release.ts";
-
-it("strips prerelease and build metadata when deriving the nightly base version", () => {
- assert.equal(resolveNightlyBaseVersion("0.0.17"), "0.0.17");
- assert.equal(resolveNightlyBaseVersion("9.9.9-smoke.0"), "9.9.9");
- assert.equal(resolveNightlyBaseVersion("1.2.3-beta.4+build.9"), "1.2.3");
-});
-
-it.effect("bumps the patch version before deriving nightly prerelease versions", () =>
- Effect.gen(function* () {
- assert.equal(yield* resolveNightlyTargetVersion("0.0.17"), "0.0.18");
- assert.equal(yield* resolveNightlyTargetVersion("9.9.9-smoke.0"), "9.9.10");
- assert.equal(yield* resolveNightlyTargetVersion("1.2.3-beta.4+build.9"), "1.2.4");
- }),
-);
-
-it.effect("reports the invalid desktop package version", () =>
- Effect.gen(function* () {
- const error = yield* resolveNightlyTargetVersion("nightly").pipe(Effect.flip);
-
- assert.equal(error._tag, "InvalidDesktopPackageVersionError");
- assert.equal(error.version, "nightly");
- assert.equal(error.message, "Invalid desktop package version 'nightly'.");
- }),
-);
-
-it("derives nightly metadata including the short commit sha in the release name", () => {
- assert.deepStrictEqual(
- resolveNightlyReleaseMetadata("9.9.10", "20260413", 321, "abcdef1234567890"),
- {
- baseVersion: "9.9.10",
- version: "9.9.10-nightly.20260413.321",
- tag: "v9.9.10-nightly.20260413.321",
- name: "Akeru Bot Nightly 9.9.10-nightly.20260413.321 (abcdef123456)",
- shortSha: "abcdef123456",
- },
- );
-});
-
-it.effect("preserves the GITHUB_OUTPUT configuration cause", () => {
- const metadata = resolveNightlyReleaseMetadata("1.2.4", "20260620", 42, "abcdef1234567890");
- const configCause = new ConfigProvider.SourceError({ message: "environment unavailable" });
-
- return Effect.gen(function* () {
- const configError = yield* writeNightlyReleaseOutput(metadata, true).pipe(
- Effect.provideService(FileSystem.FileSystem, FileSystem.makeNoop({})),
- Effect.provideService(
- ConfigProvider.ConfigProvider,
- ConfigProvider.make(() => Effect.fail(configCause)),
- ),
- Effect.flip,
- );
-
- if (configError._tag !== "NightlyReleaseGitHubOutputConfigError") {
- return assert.fail(`Unexpected error: ${configError._tag}`);
- }
- assert.instanceOf(configError.cause, Config.ConfigError);
- assert.strictEqual(configError.cause.cause, configCause);
- assert.notInclude(configError.message, configCause.message);
- });
-});
-
-it.layer(NodeServices.layer)("readDesktopBaseVersion", (it) => {
- it.effect("preserves desktop package read context and its platform cause", () =>
- Effect.gen(function* () {
- const fs = yield* FileSystem.FileSystem;
- const path = yield* Path.Path;
- const rootDir = yield* fs.makeTempDirectoryScoped({
- prefix: "resolve-nightly-release-read-",
- });
- const packageJsonPath = path.join(rootDir, "apps/desktop/package.json");
-
- const error = yield* readDesktopBaseVersion(rootDir).pipe(Effect.flip);
-
- if (error._tag !== "NightlyReleaseDesktopPackageError") {
- return assert.fail(`Unexpected error: ${error._tag}`);
- }
- assert.equal(error.operation, "read");
- assert.equal(error.packageJsonPath, packageJsonPath);
- assert.instanceOf(error.cause, PlatformError.PlatformError);
- assert.notInclude(error.message, String((error.cause as Error).message));
- }),
- );
-
- it.effect("preserves desktop package decode context and its schema cause", () =>
- Effect.gen(function* () {
- const fs = yield* FileSystem.FileSystem;
- const path = yield* Path.Path;
- const rootDir = yield* fs.makeTempDirectoryScoped({
- prefix: "resolve-nightly-release-decode-",
- });
- const packageJsonPath = path.join(rootDir, "apps/desktop/package.json");
- yield* fs.makeDirectory(path.dirname(packageJsonPath), { recursive: true });
- yield* fs.writeFileString(packageJsonPath, "{");
-
- const error = yield* readDesktopBaseVersion(rootDir).pipe(Effect.flip);
-
- if (error._tag !== "NightlyReleaseDesktopPackageError") {
- return assert.fail(`Unexpected error: ${error._tag}`);
- }
- assert.equal(error.operation, "decode");
- assert.equal(error.packageJsonPath, packageJsonPath);
- assert.ok(error.cause !== undefined);
- assert.notInclude(error.message, String((error.cause as Error).message));
- }),
- );
-});
diff --git a/scripts/resolve-nightly-release.ts b/scripts/resolve-nightly-release.ts
deleted file mode 100644
index 6df3d21e2..000000000
--- a/scripts/resolve-nightly-release.ts
+++ /dev/null
@@ -1,222 +0,0 @@
-#!/usr/bin/env node
-
-import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
-import * as NodeServices from "@effect/platform-node/NodeServices";
-import * as Console from "effect/Console";
-import * as Config from "effect/Config";
-import * as Effect from "effect/Effect";
-import * as FileSystem from "effect/FileSystem";
-import * as Option from "effect/Option";
-import * as Path from "effect/Path";
-import * as Schema from "effect/Schema";
-import { Command, Flag } from "effect/unstable/cli";
-
-export interface NightlyReleaseMetadata {
- readonly baseVersion: string;
- readonly version: string;
- readonly tag: string;
- readonly name: string;
- readonly shortSha: string;
-}
-
-const DateSchema = Schema.String.check(Schema.isPattern(/^\d{8}$/));
-const RunNumberSchema = Schema.FiniteFromString.check(
- Schema.isInt(),
- Schema.isGreaterThanOrEqualTo(1),
-);
-const ShaSchema = Schema.String.check(Schema.isPattern(/^[0-9a-f]{7,40}$/i));
-const DesktopPackageJsonSchema = Schema.Struct({
- version: Schema.NonEmptyString,
-});
-
-export class InvalidDesktopPackageVersionError extends Schema.TaggedErrorClass<InvalidDesktopPackageVersionError>()(
- "InvalidDesktopPackageVersionError",
- {
- version: Schema.String,
- },
-) {
- override get message(): string {
- return `Invalid desktop package version '${this.version}'.`;
- }
-}
-
-export class NightlyReleaseDesktopPackageError extends Schema.TaggedErrorClass<NightlyReleaseDesktopPackageError>()(
- "NightlyReleaseDesktopPackageError",
- {
- operation: Schema.Literals(["read", "decode"]),
- packageJsonPath: Schema.String,
- cause: Schema.Defect(),
- },
-) {
- override get message(): string {
- return `Failed to ${this.operation} desktop package metadata at ${this.packageJsonPath}.`;
- }
-}
-
-export class NightlyReleaseGitHubOutputConfigError extends Schema.TaggedErrorClass<NightlyReleaseGitHubOutputConfigError>()(
- "NightlyReleaseGitHubOutputConfigError",
- {
- cause: Schema.Defect(),
- },
-) {
- override get message(): string {
- return "Failed to resolve the GITHUB_OUTPUT path for nightly release metadata.";
- }
-}
-
-export class NightlyReleaseGitHubOutputAppendError extends Schema.TaggedErrorClass<NightlyReleaseGitHubOutputAppendError>()(
- "NightlyReleaseGitHubOutputAppendError",
- {
- outputPath: Schema.String,
- cause: Schema.Defect(),
- },
-) {
- override get message(): string {
- return `Failed to append nightly release metadata to ${this.outputPath}.`;
- }
-}
-
-const RepoRoot = Effect.service(Path.Path).pipe(
- Effect.flatMap((path) => path.fromFileUrl(new URL("..", import.meta.url))),
-);
-const decodeDesktopPackageJson = Schema.decodeUnknownEffect(
- Schema.fromJsonString(DesktopPackageJsonSchema),
-);
-
-export const resolveNightlyBaseVersion = (version: string) => version.replace(/[-+].*$/, "");
-
-export const resolveNightlyTargetVersion = (version: string) => {
- const stableCore = resolveNightlyBaseVersion(version);
- const match = /^(\d+)\.(\d+)\.(\d+)$/.exec(stableCore);
- if (!match) {
- return Effect.fail(new InvalidDesktopPackageVersionError({ version }));
- }
-
- const [, major, minor, patch] = match;
- return Effect.succeed(`${major}.${minor}.${Number(patch) + 1}`);
-};
-
-export const resolveNightlyReleaseMetadata = (
- baseVersion: string,
- date: string,
- runNumber: number,
- sha: string,
-) => {
- const shortSha = sha.slice(0, 12);
- const version = `${baseVersion}-nightly.${date}.${runNumber}`;
- return {
- baseVersion,
- version,
- tag: `v${version}`,
- name: `Akeru Bot Nightly ${version} (${shortSha})`,
- shortSha,
- };
-};
-
-export const readDesktopBaseVersion = Effect.fn("readDesktopBaseVersion")(function* (
- rootDir: string | undefined,
-) {
- const fs = yield* FileSystem.FileSystem;
- const path = yield* Path.Path;
- const workspaceRoot = rootDir ? path.resolve(rootDir) : yield* RepoRoot;
- const packageJsonPath = path.join(workspaceRoot, "apps/desktop/package.json");
- const packageJsonSource = yield* fs.readFileString(packageJsonPath).pipe(
- Effect.mapError(
- (cause) =>
- new NightlyReleaseDesktopPackageError({
- operation: "read",
- packageJsonPath,
- cause,
- }),
- ),
- );
- const packageJson = yield* decodeDesktopPackageJson(packageJsonSource).pipe(
- Effect.mapError(
- (cause) =>
- new NightlyReleaseDesktopPackageError({
- operation: "decode",
- packageJsonPath,
- cause,
- }),
- ),
- );
- return yield* resolveNightlyTargetVersion(packageJson.version);
-});
-
-export const writeNightlyReleaseOutput = Effect.fn("writeNightlyReleaseOutput")(function* (
- metadata: NightlyReleaseMetadata,
- writeGithubOutput: boolean,
-) {
- const fs = yield* FileSystem.FileSystem;
-
- const entries = [
- ["base_version", metadata.baseVersion],
- ["version", metadata.version],
- ["tag", metadata.tag],
- ["name", metadata.name],
- ["short_sha", metadata.shortSha],
- ] as const;
-
- if (writeGithubOutput) {
- const githubOutputPath = yield* Config.nonEmptyString("GITHUB_OUTPUT").pipe(
- Effect.mapError(
- (cause) =>
- new NightlyReleaseGitHubOutputConfigError({
- cause,
- }),
- ),
- );
- const serialized = entries.map(([key, value]) => `${key}=${value}\n`).join("");
- yield* fs.writeFileString(githubOutputPath, serialized, { flag: "a" }).pipe(
- Effect.mapError(
- (cause) =>
- new NightlyReleaseGitHubOutputAppendError({
- outputPath: githubOutputPath,
- cause,
- }),
- ),
- );
- } else {
- for (const [key, value] of entries) {
- yield* Console.log(`${key}=${value}`);
- }
- }
-});
-
-const command = Command.make(
- "resolve-nightly-release",
- {
- date: Flag.string("date").pipe(
- Flag.withSchema(DateSchema),
- Flag.withDescription("Nightly build date in YYYYMMDD."),
- ),
- runNumber: Flag.string("run-number").pipe(
- Flag.withSchema(RunNumberSchema),
- Flag.withDescription("GitHub Actions run number."),
- ),
- sha: Flag.string("sha").pipe(
- Flag.withSchema(ShaSchema),
- Flag.withDescription("Commit sha for the nightly build."),
- ),
- githubOutput: Flag.boolean("github-output").pipe(
- Flag.withDescription("Write values to GITHUB_OUTPUT instead of stdout."),
- Flag.withDefault(false),
- ),
- root: Flag.string("root").pipe(
- Flag.withDescription("Workspace root used to resolve apps/desktop/package.json."),
- Flag.optional,
- ),
- },
- ({ date, runNumber, sha, githubOutput, root }) =>
- readDesktopBaseVersion(Option.getOrUndefined(root)).pipe(
- Effect.map((baseVersion) => resolveNightlyReleaseMetadata(baseVersion, date, runNumber, sha)),
- Effect.flatMap((metadata) => writeNightlyReleaseOutput(metadata, githubOutput)),
- ),
-).pipe(Command.withDescription("Resolve nightly release version metadata."));
-
-if (import.meta.main) {
- Command.run(command, { version: "0.0.0" }).pipe(
- Effect.provide(NodeServices.layer),
- NodeRuntime.runMain,
- );
-}
diff --git a/scripts/resolve-previous-release-tag.test.ts b/scripts/resolve-previous-release-tag.test.ts
index 5fe06d2af..d0b2393a5 100644
--- a/scripts/resolve-previous-release-tag.test.ts
+++ b/scripts/resolve-previous-release-tag.test.ts
@@ -41,11 +41,11 @@ function mockHandle(options: {
});
}
-it.effect("selects the latest earlier stable tag and ignores nightlies", () =>
+it.effect("selects the latest earlier stable tag", () =>
Effect.gen(function* () {
const previous = yield* resolvePreviousReleaseTag("stable", "v1.2.0", [
"v1.1.0",
- "v1.1.1-nightly.20260619.1",
+ "v1.1.1",
"v1.1.2",
"v1.2.0",
]);
@@ -54,25 +54,14 @@ it.effect("selects the latest earlier stable tag and ignores nightlies", () =>
}),
);
-it.effect("accepts legacy nightly tags when selecting the previous nightly", () =>
- Effect.gen(function* () {
- const previous = yield* resolvePreviousReleaseTag("nightly", "v1.2.0-nightly.20260620.2", [
- "nightly-v1.2.0-nightly.20260620.1",
- "v1.1.0-nightly.20260619.9",
- ]);
-
- assert.equal(previous, "nightly-v1.2.0-nightly.20260620.1");
- }),
-);
-
it.effect("reports the invalid tag with its release channel", () =>
Effect.gen(function* () {
- const error = yield* resolvePreviousReleaseTag("nightly", "v1.2.0", []).pipe(Effect.flip);
+ const error = yield* resolvePreviousReleaseTag("stable", "not-a-tag", []).pipe(Effect.flip);
assert.equal(error._tag, "InvalidReleaseTagError");
- assert.equal(error.channel, "nightly");
- assert.equal(error.currentTag, "v1.2.0");
- assert.equal(error.message, "Invalid nightly release tag 'v1.2.0'.");
+ assert.equal(error.channel, "stable");
+ assert.equal(error.currentTag, "not-a-tag");
+ assert.equal(error.message, "Invalid stable release tag 'not-a-tag'.");
}),
);
diff --git a/scripts/resolve-previous-release-tag.ts b/scripts/resolve-previous-release-tag.ts
index 7acc6f456..cdb2537e2 100644
--- a/scripts/resolve-previous-release-tag.ts
+++ b/scripts/resolve-previous-release-tag.ts
@@ -11,7 +11,7 @@ import * as String from "effect/String";
import { Command, Flag } from "effect/unstable/cli";
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
-const ReleaseChannel = Schema.Literals(["stable", "nightly"]);
+const ReleaseChannel = Schema.Literal("stable");
type ReleaseChannel = typeof ReleaseChannel.Type;
export class InvalidReleaseTagError extends Schema.TaggedErrorClass<InvalidReleaseTagError>()(
@@ -91,14 +91,6 @@ interface StableVersion {
readonly prerelease: ReadonlyArray<string>;
}
-interface NightlyVersion {
- readonly major: number;
- readonly minor: number;
- readonly patch: number;
- readonly date: number;
- readonly runNumber: number;
-}
-
const parseNumericIdentifier = (identifier: string): number | undefined =>
/^\d+$/.test(identifier) ? Number(identifier) : undefined;
@@ -144,49 +136,17 @@ const compareStableVersions = (left: StableVersion, right: StableVersion): numbe
};
const parseStableTag = (tag: string): StableVersion | undefined => {
- const match = /^v(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(tag);
+ const match = /^v(\d+)\.(\d+)\.(\d+)(?:\+[0-9A-Za-z.-]+)?$/.exec(tag);
if (!match) return undefined;
- const [, major, minor, patch, prerelease] = match;
+ const [, major, minor, patch] = match;
if (!major || !minor || !patch) return undefined;
- const prereleaseIdentifiers = prerelease ? prerelease.split(".") : [];
- // Nightly tags also start with `v` and carry a `nightly.*` prerelease
- // identifier. They must not be considered stable candidates when resolving
- // the previous stable tag.
- if (prereleaseIdentifiers[0] === "nightly") return undefined;
-
return {
major: Number(major),
minor: Number(minor),
patch: Number(patch),
- prerelease: prereleaseIdentifiers,
- };
-};
-
-const compareNightlyVersions = (left: NightlyVersion, right: NightlyVersion): number => {
- if (left.major !== right.major) return left.major - right.major;
- if (left.minor !== right.minor) return left.minor - right.minor;
- if (left.patch !== right.patch) return left.patch - right.patch;
- if (left.date !== right.date) return left.date - right.date;
- return left.runNumber - right.runNumber;
-};
-
-const parseNightlyTag = (tag: string): NightlyVersion | undefined => {
- // Accept both the current `v<semver>` format and the legacy `nightly-v<semver>`
- // format so release note diffs keep working across the tag-format transition.
- const match = /^(?:nightly-)?v(\d+)\.(\d+)\.(\d+)-nightly\.(\d{8})\.(\d+)$/.exec(tag);
- if (!match) return undefined;
-
- const [, major, minor, patch, date, runNumber] = match;
- if (!major || !minor || !patch || !date || !runNumber) return undefined;
-
- return {
- major: Number(major),
- minor: Number(minor),
- patch: Number(patch),
- date: Number(date),
- runNumber: Number(runNumber),
+ prerelease: [],
};
};
@@ -196,35 +156,18 @@ export const resolvePreviousReleaseTag = (
tags: ReadonlyArray<string>,
) =>
Effect.gen(function* () {
- if (channel === "stable") {
- const current = parseStableTag(currentTag);
- if (!current) {
- return yield* new InvalidReleaseTagError({ channel, currentTag });
- }
-
- const candidates = tags
- .map((tag) => ({ tag, parsed: parseStableTag(tag) }))
- .filter(
- (entry): entry is { tag: string; parsed: StableVersion } => entry.parsed !== undefined,
- )
- .filter((entry) => compareStableVersions(entry.parsed, current) < 0)
- .toSorted((left, right) => compareStableVersions(right.parsed, left.parsed));
-
- return candidates[0]?.tag;
- }
-
- const current = parseNightlyTag(currentTag);
+ const current = parseStableTag(currentTag);
if (!current) {
return yield* new InvalidReleaseTagError({ channel, currentTag });
}
const candidates = tags
- .map((tag) => ({ tag, parsed: parseNightlyTag(tag) }))
+ .map((tag) => ({ tag, parsed: parseStableTag(tag) }))
.filter(
- (entry): entry is { tag: string; parsed: NightlyVersion } => entry.parsed !== undefined,
+ (entry): entry is { tag: string; parsed: StableVersion } => entry.parsed !== undefined,
)
- .filter((entry) => compareNightlyVersions(entry.parsed, current) < 0)
- .toSorted((left, right) => compareNightlyVersions(right.parsed, left.parsed));
+ .filter((entry) => compareStableVersions(entry.parsed, current) < 0)
+ .toSorted((left, right) => compareStableVersions(right.parsed, left.parsed));
return candidates[0]?.tag;
});
@@ -339,7 +282,7 @@ export const writePreviousReleaseTagOutput = Effect.fn("writePreviousReleaseTagO
const command = Command.make(
"resolve-previous-release-tag",
{
- channel: Flag.choice("channel", ReleaseChannel.literals).pipe(
+ channel: Flag.choice("channel", ["stable"] as const).pipe(
Flag.withDescription("Release channel whose previous tag should be resolved."),
),
currentTag: Flag.string("current-tag").pipe(
@@ -355,7 +298,7 @@ const command = Command.make(
Effect.flatMap((tags) => resolvePreviousReleaseTag(channel, currentTag, tags)),
Effect.flatMap((previousTag) => writePreviousReleaseTagOutput(previousTag, githubOutput)),
),
-).pipe(Command.withDescription("Resolve the previous release tag for a stable or nightly series."));
+).pipe(Command.withDescription("Resolve the previous stable release tag."));
if (import.meta.main) {
Command.run(command, { version: "0.0.0" }).pipe(
diff --git a/scripts/tegami.test.ts b/scripts/tegami.test.ts
new file mode 100644
index 000000000..7be24f4ff
--- /dev/null
+++ b/scripts/tegami.test.ts
@@ -0,0 +1,27 @@
+import { describe, expect, it } from "vite-plus/test";
+
+import desktopPackage from "../apps/desktop/package.json" with { type: "json" };
+import serverPackage from "../apps/server/package.json" with { type: "json" };
+import webPackage from "../apps/web/package.json" with { type: "json" };
+import contractsPackage from "../packages/contracts/package.json" with { type: "json" };
+import { releasePackageNames } from "./tegami.ts";
+
+describe("Tegami release packages", () => {
+ it("keeps every release package on one stable version", () => {
+ expect(releasePackageNames).toEqual([
+ "akeru-bot",
+ "@t3tools/contracts",
+ "@t3tools/desktop",
+ "@t3tools/web",
+ ]);
+
+ const versions = [
+ serverPackage.version,
+ contractsPackage.version,
+ desktopPackage.version,
+ webPackage.version,
+ ];
+ expect(new Set(versions)).toEqual(new Set(["0.0.34"]));
+ expect(versions.every((version) => /^\d+\.\d+\.\d+$/.test(version))).toBe(true);
+ });
+});
diff --git a/scripts/tegami.ts b/scripts/tegami.ts
new file mode 100644
index 000000000..3d423a690
--- /dev/null
+++ b/scripts/tegami.ts
@@ -0,0 +1,40 @@
+import { runCli } from "tegami/cli";
+import { tegami } from "tegami";
+import { github } from "tegami/plugins/github";
+
+export const releasePackageNames = [
+ "akeru-bot",
+ "@t3tools/contracts",
+ "@t3tools/desktop",
+ "@t3tools/web",
+] as const;
+
+export const release = tegami({
+ groups: {
+ akeru: {
+ syncBump: true,
+ syncGitTag: true,
+ },
+ },
+ packages: {
+ "akeru-bot": { group: "akeru" },
+ "@t3tools/contracts": { group: "akeru" },
+ "@t3tools/desktop": { group: "akeru" },
+ "@t3tools/web": { group: "akeru" },
+ },
+ plugins: [
+ github({
+ repo: "opencoredev/akeru-bot",
+ release: false,
+ createTags: false,
+ versionPr: {
+ base: "main",
+ branch: "tegami/version-packages",
+ },
+ }),
+ ],
+});
+
+if (import.meta.main) {
+ await runCli(release);
+}
diff --git a/scripts/verify-release-assets.test.ts b/scripts/verify-release-assets.test.ts
new file mode 100644
index 000000000..c8a1f68ce
--- /dev/null
+++ b/scripts/verify-release-assets.test.ts
@@ -0,0 +1,27 @@
+// @effect-diagnostics nodeBuiltinImport:off - Tests use isolated temporary release directories.
+import * as NodeAssert from "node:assert/strict";
+import * as NodeFSP from "node:fs/promises";
+import * as NodeOS from "node:os";
+import * as NodePath from "node:path";
+import { describe, it } from "vite-plus/test";
+
+import { expectedReleaseAssetNames, verifyReleaseAssets } from "./verify-release-assets.ts";
+import { verifyReleaseCandidate } from "./verify-release-candidate.ts";
+
+describe("verify-release-assets", () => {
+ it("rejects missing assets and writes verified SHA256SUMS for the exact release set", async () => {
+ const directory = await NodeFSP.mkdtemp(
+ NodePath.join(NodeOS.tmpdir(), "akeru-release-assets-"),
+ );
+ const names = expectedReleaseAssetNames("1.2.3");
+ for (const name of names) await NodeFSP.writeFile(NodePath.join(directory, name), name);
+
+ const sums = await verifyReleaseAssets(directory, "1.2.3");
+ NodeAssert.equal(sums, await NodeFSP.readFile(NodePath.join(directory, "SHA256SUMS"), "utf8"));
+ NodeAssert.equal(sums.trimEnd().split("\n").length, names.length);
+ NodeAssert.doesNotThrow(() => verifyReleaseCandidate(directory, "1.2.3"));
+
+ await NodeFSP.writeFile(NodePath.join(directory, "unexpected.txt"), "unexpected");
+ await NodeAssert.rejects(verifyReleaseAssets(directory, "1.2.3"), /Release assets differ/);
+ });
+});
diff --git a/scripts/verify-release-assets.ts b/scripts/verify-release-assets.ts
new file mode 100644
index 000000000..b61f451d5
--- /dev/null
+++ b/scripts/verify-release-assets.ts
@@ -0,0 +1,62 @@
+#!/usr/bin/env node
+// @effect-diagnostics nodeBuiltinImport:off - Release verification runs before an Effect runtime exists.
+
+import * as NodeCrypto from "node:crypto";
+import * as NodeFSP from "node:fs/promises";
+import * as NodePath from "node:path";
+
+export function expectedReleaseAssetNames(version: string): readonly string[] {
+ return [
+ `Akeru-Bot-${version}-arm64.dmg`,
+ `Akeru-Bot-${version}-arm64.zip`,
+ `Akeru-Bot-${version}-x64.exe`,
+ `Akeru-Bot-${version}-x64.exe.blockmap`,
+ `Akeru-Bot-${version}-x64.AppImage`,
+ "latest-mac.yml",
+ "latest.yml",
+ "latest-linux.yml",
+ `akeru-bot-${version}.tgz`,
+ ];
+}
+
+export async function verifyReleaseAssets(directory: string, version: string): Promise<string> {
+ const expected = expectedReleaseAssetNames(version).toSorted();
+ const actual = (await NodeFSP.readdir(directory))
+ .filter((name) => name !== "SHA256SUMS")
+ .toSorted();
+ if (actual.join("\n") !== expected.join("\n")) {
+ throw new Error(
+ `Release assets differ.\nExpected:\n${expected.join("\n")}\nActual:\n${actual.join("\n")}`,
+ );
+ }
+
+ const sums: string[] = [];
+ for (const name of actual) {
+ const path = NodePath.join(directory, name);
+ if (!(await NodeFSP.stat(path)).isFile())
+ throw new Error(`Release asset is not a file: ${name}`);
+ sums.push(
+ `${NodeCrypto.createHash("sha256")
+ .update(await NodeFSP.readFile(path))
+ .digest("hex")} ${name}`,
+ );
+ }
+ const contents = `${sums.join("\n")}\n`;
+ await NodeFSP.writeFile(NodePath.join(directory, "SHA256SUMS"), contents);
+
+ for (const line of contents.trimEnd().split("\n")) {
+ const [hash, name] = line.split(" ");
+ if (!name) throw new Error(`Invalid SHA256SUMS line: ${line}`);
+ const actualHash = NodeCrypto.createHash("sha256")
+ .update(await NodeFSP.readFile(NodePath.join(directory, NodePath.basename(name))))
+ .digest("hex");
+ if (hash !== actualHash) throw new Error(`SHA-256 verification failed: ${name}`);
+ }
+ return contents;
+}
+
+if (import.meta.main) {
+ const [directory, version] = process.argv.slice(2);
+ if (!directory || !version) throw new Error("Usage: verify-release-assets <directory> <version>");
+ await verifyReleaseAssets(directory, version);
+}
diff --git a/scripts/verify-release-candidate.test.ts b/scripts/verify-release-candidate.test.ts
new file mode 100644
index 000000000..38f877d5f
--- /dev/null
+++ b/scripts/verify-release-candidate.test.ts
@@ -0,0 +1,57 @@
+// @effect-diagnostics nodeBuiltinImport:off - Tests use isolated temporary release directories.
+import * as NodeAssert from "node:assert/strict";
+import * as NodeFS from "node:fs";
+import * as NodeOS from "node:os";
+import * as NodePath from "node:path";
+import { describe, it } from "vite-plus/test";
+
+import { expectedReleaseAssetNames } from "./verify-release-assets.ts";
+import { verifyReleaseCandidate, writeReleaseChecksums } from "./verify-release-candidate.ts";
+
+const version = "1.2.3";
+const assets = expectedReleaseAssetNames(version);
+
+function fixture(): string {
+ const directory = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "akeru-release-verify-"));
+ for (const asset of assets) NodeFS.writeFileSync(NodePath.join(directory, asset), asset);
+ writeReleaseChecksums(directory, version);
+ return directory;
+}
+
+describe("verifyReleaseCandidate", () => {
+ it("accepts the exact stable asset set and generated checksums", () => {
+ const directory = fixture();
+ try {
+ NodeAssert.doesNotThrow(() => verifyReleaseCandidate(directory, version));
+ } finally {
+ NodeFS.rmSync(directory, { recursive: true });
+ }
+ });
+
+ it("rejects a checksum mismatch", () => {
+ const directory = fixture();
+ try {
+ NodeFS.appendFileSync(NodePath.join(directory, assets[0]!), "tampered");
+ NodeAssert.throws(() => verifyReleaseCandidate(directory, version), /SHA256 mismatch/);
+ } finally {
+ NodeFS.rmSync(directory, { recursive: true });
+ }
+ });
+
+ it("rejects nightly versions and assets", () => {
+ const directory = fixture();
+ try {
+ NodeAssert.throws(
+ () => verifyReleaseCandidate(directory, "1.2.3-nightly.1"),
+ /Stable release version must be plain semver/,
+ );
+ NodeFS.writeFileSync(NodePath.join(directory, "latest-nightly.yml"), "nightly");
+ NodeAssert.throws(
+ () => verifyReleaseCandidate(directory, version),
+ /Release assets do not match/,
+ );
+ } finally {
+ NodeFS.rmSync(directory, { recursive: true });
+ }
+ });
+});
diff --git a/scripts/verify-release-candidate.ts b/scripts/verify-release-candidate.ts
new file mode 100644
index 000000000..4b9cacbf8
--- /dev/null
+++ b/scripts/verify-release-candidate.ts
@@ -0,0 +1,62 @@
+// @effect-diagnostics nodeBuiltinImport:off globalConsole:off - Release verification runs before an Effect runtime exists.
+import * as NodeCrypto from "node:crypto";
+import * as NodeFS from "node:fs";
+import * as NodePath from "node:path";
+import * as NodeURL from "node:url";
+
+import { expectedReleaseAssetNames } from "./verify-release-assets.ts";
+
+const sha256 = (path: string) =>
+ NodeCrypto.createHash("sha256").update(NodeFS.readFileSync(path)).digest("hex");
+
+export function verifyReleaseCandidate(directory: string, version: string): void {
+ if (!/^\d+\.\d+\.\d+$/.test(version)) {
+ throw new Error(`Stable release version must be plain semver, received '${version}'.`);
+ }
+
+ const stableAssets = expectedReleaseAssetNames(version);
+ const expected = [...stableAssets, "SHA256SUMS"].sort();
+ const actual = NodeFS.readdirSync(directory).sort();
+ if (JSON.stringify(actual) !== JSON.stringify(expected)) {
+ throw new Error(
+ `Release assets do not match.\nExpected: ${expected.join(", ")}\nActual: ${actual.join(", ")}`,
+ );
+ }
+
+ const checksums = new Map(
+ NodeFS.readFileSync(NodePath.join(directory, "SHA256SUMS"), "utf8")
+ .trimEnd()
+ .split("\n")
+ .map((line) => {
+ const match = /^([a-f0-9]{64}) ([^/]+)$/.exec(line);
+ if (!match) throw new Error(`Invalid SHA256SUMS line: '${line}'.`);
+ return [match[2], match[1]];
+ }),
+ );
+
+ for (const asset of stableAssets) {
+ const digest = sha256(NodePath.join(directory, asset));
+ if (checksums.get(asset) !== digest) {
+ throw new Error(`SHA256 mismatch for '${asset}'.`);
+ }
+ }
+ if (checksums.size !== stableAssets.length) {
+ throw new Error("SHA256SUMS does not contain exactly one entry for every release asset.");
+ }
+}
+
+export function writeReleaseChecksums(directory: string, version: string): void {
+ const contents = expectedReleaseAssetNames(version)
+ .map((asset) => `${sha256(NodePath.join(directory, asset))} ${asset}`)
+ .join("\n");
+ NodeFS.writeFileSync(NodePath.join(directory, "SHA256SUMS"), `${contents}\n`);
+}
+
+if (process.argv[1] && import.meta.url === NodeURL.pathToFileURL(process.argv[1]).href) {
+ const [directory, version] = process.argv.slice(2);
+ if (!directory || !version) {
+ throw new Error("Usage: node scripts/verify-release-candidate.ts <directory> <version>");
+ }
+ verifyReleaseCandidate(NodePath.resolve(directory), version);
+ console.log(`Verified stable release candidate ${version}.`);
+}