From d6baa6dc6977090b51b727e9f5b40ec3c951e867 Mon Sep 17 00:00:00 2001
From: BurntToasters <61037367+BurntToasters@users.noreply.github.com>
Date: Sun, 25 Oct 2026 16:41:43 -0700
Subject: [PATCH 01/58] NEW - Updater: Add compact macOS updates
Publish per-architecture zstd app archives for smaller macOS in-app updates, with legacy-feed fallback and end-to-end coverage.
---
ARCHITECTURE.md | 23 +
CHANGELOG.md | 8 +-
e2e/updater-zst.failure-modes.md | 61 ++
package-lock.json | 4 +-
package.json | 7 +-
run.rosie.rosi.metainfo.xml | 1 +
scripts/e2e-updater-zst.mjs | 530 +++++++++++++
scripts/gpg-sign.js | 59 +-
scripts/pack-macos-updater-zst.js | 289 +++++++
scripts/updater-signature-verifier.d.ts | 1 +
scripts/updater-signature-verifier.js | 11 +-
scripts/validate-updater-live.js | 8 +
scripts/validate-updater-manifest.js | 5 +-
scripts/verify-release-draft.js | 4 +
src-tauri/Cargo.lock | 31 +-
src-tauri/Cargo.toml | 2 +-
src-tauri/Info.plist | 2 +-
src-tauri/build.rs | 2 +
src-tauri/capabilities/default.json | 1 +
src-tauri/gen/schemas/acl-manifests.json | 2 +-
src-tauri/gen/schemas/capabilities.json | 2 +-
src-tauri/gen/schemas/desktop-schema.json | 12 +
src-tauri/gen/schemas/macOS-schema.json | 12 +
.../get_compact_updater_target.toml | 11 +
src-tauri/src/main.rs | 1 +
src-tauri/src/platform.rs | 24 +
src-tauri/tauri.conf.json | 4 +-
.../vendor/tauri-plugin-updater/Cargo.lock | 41 +
.../vendor/tauri-plugin-updater/Cargo.toml | 4 +
.../vendor/tauri-plugin-updater/PATCHES.md | 21 +-
.../vendor/tauri-plugin-updater/ROSI.patch | 739 +++++++++++-------
.../src/appimage_archive.rs | 28 +-
.../tauri-plugin-updater/src/updater.rs | 193 ++++-
src/commands.ts | 1 +
src/updater.ts | 32 +-
35 files changed, 1853 insertions(+), 323 deletions(-)
create mode 100644 e2e/updater-zst.failure-modes.md
create mode 100644 scripts/e2e-updater-zst.mjs
create mode 100644 scripts/pack-macos-updater-zst.js
create mode 100644 src-tauri/permissions/autogenerated/get_compact_updater_target.toml
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index dd28bb1c..3806d87a 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -111,6 +111,28 @@ builds. The release pipeline (`scripts/run-release.js`, `release-session.js`,
The vendored `src-tauri/vendor/tauri-plugin-updater` carries install-safety
patches, documented in `src-tauri/vendor/tauri-plugin-updater/PATCHES.md`.
+### Compact macOS updates
+
+Fresh installs use the universal DMG/ZIP. In-app updates on macOS download a
+per-arch `ROSI-{aarch64,x86_64}.app.tar.zst` instead of the universal
+`ROSI.app.tar.gz` (141.5 MB to about 60 MB):
+
+- `release:mac:continue` also runs `tauri build --target {aarch64,x86_64}-apple-darwin --bundles app`.
+ `scripts/pack-macos-updater-zst.js` then repacks each per-arch `.app.tar.gz` with
+ `zstd --long=27` and signs the result (`tauri signer sign --app-version`). The long
+ window dedupes `rosi-ffmpeg` against `rosi-ffprobe`. The tar bytes are unchanged, so
+ the bundle signature and staple survive.
+- `scripts/gpg-sign.js` publishes them under `latest-darwin[-beta]-{arch}-app-zst.json`
+ and never collects the per-arch builds' arch-less `.app.tar.gz`.
+- Packaged macOS apps ask for that target (`get_compact_updater_target`). If the
+ compact feed is missing they fall back to the universal feed, which stays published
+ for clients older than 5.1.0.
+- `rosi-yt-dlp` is upstream's universal2 binary and already compressed, so about
+ 36 MB of every update is yt-dlp.
+
+Failure modes: `e2e/updater-zst.failure-modes.md`. Check: `npm run test:e2e:updater-zst`
+(report in `e2e/artifacts/updater-zst-report.json`).
+
### macOS entitlements for sidecars (planned, not implemented)
Today `src-tauri/entitlements.plist` grants `disable-library-validation` and
@@ -150,6 +172,7 @@ Ordered plan (confirm each Tauri step with a dry run before changing the pipelin
insert steps 2 to 5 into `scripts/release-session.js` or `run-release.js`
between `tauri build` and checksum/GPG signing in `scripts/gpg-sign.js`.
7. Regenerated artifacts to re-check before publish: the `.app`, `.app.tar.gz`,
+ the per-arch bundles and their `.app.tar.zst` (repack after re-signing),
`.sig`, the `latest-*.json` manifests, the DMG, the ZIP, checksums, and
GPG signatures. `verify-release-draft.js` must pass on the final set.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7ec647cf..d45e6d60 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,8 +2,8 @@
| Windows |
macOS |
Linux |
| :-- | :-- | :-- |
-| **EXE: [x64](https://github.com/BurntToasters/ROSI/releases/download/v5.0.2/ROSI-Windows-x64.exe) / [arm64](https://github.com/BurntToasters/ROSI/releases/download/v5.0.2/ROSI-Windows-arm64.exe)** | **[Universal DMG](https://github.com/BurntToasters/ROSI/releases/download/v5.0.2/ROSI-MacOS-universal.dmg)** | **AppImage:** [x64](https://github.com/BurntToasters/ROSI/releases/download/v5.0.2/ROSI-Linux-x64.AppImage) |
-|
"]
diff --git a/src-tauri/Info.plist b/src-tauri/Info.plist
index 9e7ca1e8..8f3054e5 100644
--- a/src-tauri/Info.plist
+++ b/src-tauri/Info.plist
@@ -3,6 +3,6 @@
CFBundleShortVersionString
- 5.0.2
+ 5.1.0
diff --git a/src-tauri/build.rs b/src-tauri/build.rs
index 6ff67727..cbd8c735 100644
--- a/src-tauri/build.rs
+++ b/src-tauri/build.rs
@@ -41,6 +41,7 @@ const COMMANDS: &[&str] = &[
"get_app_platform",
"get_distribution_channel",
"get_beta_updater_target",
+ "get_compact_updater_target",
"restart_app",
"log_error",
"notify_settings_flushed",
@@ -87,6 +88,7 @@ const COMMANDS_WITH_E2E: &[&str] = &[
"get_app_platform",
"get_distribution_channel",
"get_beta_updater_target",
+ "get_compact_updater_target",
"restart_app",
"log_error",
"notify_settings_flushed",
diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json
index 111a3754..a8c9517b 100644
--- a/src-tauri/capabilities/default.json
+++ b/src-tauri/capabilities/default.json
@@ -48,6 +48,7 @@
"allow-get-app-platform",
"allow-get-distribution-channel",
"allow-get-beta-updater-target",
+ "allow-get-compact-updater-target",
"allow-restart-app",
"allow-log-error",
"allow-notify-settings-flushed",
diff --git a/src-tauri/gen/schemas/acl-manifests.json b/src-tauri/gen/schemas/acl-manifests.json
index ad1c8e12..dbd84013 100644
--- a/src-tauri/gen/schemas/acl-manifests.json
+++ b/src-tauri/gen/schemas/acl-manifests.json
@@ -1 +1 @@
-{"__app-acl__":{"default_permission":null,"permissions":{"allow-add-to-queue":{"identifier":"allow-add-to-queue","description":"Enables the add_to_queue command without any pre-configured scope.","commands":{"allow":["add_to_queue"],"deny":[]}},"allow-cancel-download":{"identifier":"allow-cancel-download","description":"Enables the cancel_download command without any pre-configured scope.","commands":{"allow":["cancel_download"],"deny":[]}},"allow-cancel-formats":{"identifier":"allow-cancel-formats","description":"Enables the cancel_formats command without any pre-configured scope.","commands":{"allow":["cancel_formats"],"deny":[]}},"allow-cancel-queue":{"identifier":"allow-cancel-queue","description":"Enables the cancel_queue command without any pre-configured scope.","commands":{"allow":["cancel_queue"],"deny":[]}},"allow-cancel-video-info":{"identifier":"allow-cancel-video-info","description":"Enables the cancel_video_info command without any pre-configured scope.","commands":{"allow":["cancel_video_info"],"deny":[]}},"allow-check-deno-installed":{"identifier":"allow-check-deno-installed","description":"Enables the check_deno_installed command without any pre-configured scope.","commands":{"allow":["check_deno_installed"],"deny":[]}},"allow-clear-download-activity":{"identifier":"allow-clear-download-activity","description":"Enables the clear_download_activity command without any pre-configured scope.","commands":{"allow":["clear_download_activity"],"deny":[]}},"allow-clear-finished-queue":{"identifier":"allow-clear-finished-queue","description":"Enables the clear_finished_queue command without any pre-configured scope.","commands":{"allow":["clear_finished_queue"],"deny":[]}},"allow-clear-queue":{"identifier":"allow-clear-queue","description":"Enables the clear_queue command without any pre-configured scope.","commands":{"allow":["clear_queue"],"deny":[]}},"allow-detect-gpu":{"identifier":"allow-detect-gpu","description":"Enables the detect_gpu command without any pre-configured scope.","commands":{"allow":["detect_gpu"],"deny":[]}},"allow-download-video":{"identifier":"allow-download-video","description":"Enables the download_video command without any pre-configured scope.","commands":{"allow":["download_video"],"deny":[]}},"allow-e2e-cancel-close-request":{"identifier":"allow-e2e-cancel-close-request","description":"Enables the e2e_cancel_close_request command without any pre-configured scope.","commands":{"allow":["e2e_cancel_close_request"],"deny":[]}},"allow-e2e-emit-stale-download-events":{"identifier":"allow-e2e-emit-stale-download-events","description":"Enables the e2e_emit_stale_download_events command without any pre-configured scope.","commands":{"allow":["e2e_emit_stale_download_events"],"deny":[]}},"allow-e2e-network-pipelining-probe":{"identifier":"allow-e2e-network-pipelining-probe","description":"Enables the e2e_network_pipelining_probe command without any pre-configured scope.","commands":{"allow":["e2e_network_pipelining_probe"],"deny":[]}},"allow-e2e-updater-install-probe":{"identifier":"allow-e2e-updater-install-probe","description":"Enables the e2e_updater_install_probe command without any pre-configured scope.","commands":{"allow":["e2e_updater_install_probe"],"deny":[]}},"allow-export-settings":{"identifier":"allow-export-settings","description":"Enables the export_settings command without any pre-configured scope.","commands":{"allow":["export_settings"],"deny":[]}},"allow-get-app-platform":{"identifier":"allow-get-app-platform","description":"Enables the get_app_platform command without any pre-configured scope.","commands":{"allow":["get_app_platform"],"deny":[]}},"allow-get-beta-updater-target":{"identifier":"allow-get-beta-updater-target","description":"Enables the get_beta_updater_target command without any pre-configured scope.","commands":{"allow":["get_beta_updater_target"],"deny":[]}},"allow-get-default-settings":{"identifier":"allow-get-default-settings","description":"Enables the get_default_settings command without any pre-configured scope.","commands":{"allow":["get_default_settings"],"deny":[]}},"allow-get-distribution-channel":{"identifier":"allow-get-distribution-channel","description":"Enables the get_distribution_channel command without any pre-configured scope.","commands":{"allow":["get_distribution_channel"],"deny":[]}},"allow-get-download-activity":{"identifier":"allow-get-download-activity","description":"Enables the get_download_activity command without any pre-configured scope.","commands":{"allow":["get_download_activity"],"deny":[]}},"allow-get-formats":{"identifier":"allow-get-formats","description":"Enables the get_formats command without any pre-configured scope.","commands":{"allow":["get_formats"],"deny":[]}},"allow-get-queue":{"identifier":"allow-get-queue","description":"Enables the get_queue command without any pre-configured scope.","commands":{"allow":["get_queue"],"deny":[]}},"allow-get-settings":{"identifier":"allow-get-settings","description":"Enables the get_settings command without any pre-configured scope.","commands":{"allow":["get_settings"],"deny":[]}},"allow-get-stats":{"identifier":"allow-get-stats","description":"Enables the get_stats command without any pre-configured scope.","commands":{"allow":["get_stats"],"deny":[]}},"allow-get-video-info":{"identifier":"allow-get-video-info","description":"Enables the get_video_info command without any pre-configured scope.","commands":{"allow":["get_video_info"],"deny":[]}},"allow-import-settings":{"identifier":"allow-import-settings","description":"Enables the import_settings command without any pre-configured scope.","commands":{"allow":["import_settings"],"deny":[]}},"allow-install-deno":{"identifier":"allow-install-deno","description":"Enables the install_deno command without any pre-configured scope.","commands":{"allow":["install_deno"],"deny":[]}},"allow-is-flatpak":{"identifier":"allow-is-flatpak","description":"Enables the is_flatpak command without any pre-configured scope.","commands":{"allow":["is_flatpak"],"deny":[]}},"allow-is-packaged":{"identifier":"allow-is-packaged","description":"Enables the is_packaged command without any pre-configured scope.","commands":{"allow":["is_packaged"],"deny":[]}},"allow-log-error":{"identifier":"allow-log-error","description":"Enables the log_error command without any pre-configured scope.","commands":{"allow":["log_error"],"deny":[]}},"allow-mark-main-window-ready":{"identifier":"allow-mark-main-window-ready","description":"Enables the mark_main_window_ready command without any pre-configured scope.","commands":{"allow":["mark_main_window_ready"],"deny":[]}},"allow-notify-settings-flushed":{"identifier":"allow-notify-settings-flushed","description":"Enables the notify_settings_flushed command without any pre-configured scope.","commands":{"allow":["notify_settings_flushed"],"deny":[]}},"allow-open-external":{"identifier":"allow-open-external","description":"Enables the open_external command without any pre-configured scope.","commands":{"allow":["open_external"],"deny":[]}},"allow-open-file-location":{"identifier":"allow-open-file-location","description":"Enables the open_file_location command without any pre-configured scope.","commands":{"allow":["open_file_location"],"deny":[]}},"allow-remove-from-queue":{"identifier":"allow-remove-from-queue","description":"Enables the remove_from_queue command without any pre-configured scope.","commands":{"allow":["remove_from_queue"],"deny":[]}},"allow-reorder-queue-item":{"identifier":"allow-reorder-queue-item","description":"Enables the reorder_queue_item command without any pre-configured scope.","commands":{"allow":["reorder_queue_item"],"deny":[]}},"allow-reset-settings":{"identifier":"allow-reset-settings","description":"Enables the reset_settings command without any pre-configured scope.","commands":{"allow":["reset_settings"],"deny":[]}},"allow-reset-stats":{"identifier":"allow-reset-stats","description":"Enables the reset_stats command without any pre-configured scope.","commands":{"allow":["reset_stats"],"deny":[]}},"allow-restart-app":{"identifier":"allow-restart-app","description":"Enables the restart_app command without any pre-configured scope.","commands":{"allow":["restart_app"],"deny":[]}},"allow-retry-queue-item":{"identifier":"allow-retry-queue-item","description":"Enables the retry_queue_item command without any pre-configured scope.","commands":{"allow":["retry_queue_item"],"deny":[]}},"allow-save-settings":{"identifier":"allow-save-settings","description":"Enables the save_settings command without any pre-configured scope.","commands":{"allow":["save_settings"],"deny":[]}},"allow-select-download-location":{"identifier":"allow-select-download-location","description":"Enables the select_download_location command without any pre-configured scope.","commands":{"allow":["select_download_location"],"deny":[]}},"allow-show-notification":{"identifier":"allow-show-notification","description":"Enables the show_notification command without any pre-configured scope.","commands":{"allow":["show_notification"],"deny":[]}},"allow-start-queue":{"identifier":"allow-start-queue","description":"Enables the start_queue command without any pre-configured scope.","commands":{"allow":["start_queue"],"deny":[]}},"deny-add-to-queue":{"identifier":"deny-add-to-queue","description":"Denies the add_to_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["add_to_queue"]}},"deny-cancel-download":{"identifier":"deny-cancel-download","description":"Denies the cancel_download command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel_download"]}},"deny-cancel-formats":{"identifier":"deny-cancel-formats","description":"Denies the cancel_formats command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel_formats"]}},"deny-cancel-queue":{"identifier":"deny-cancel-queue","description":"Denies the cancel_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel_queue"]}},"deny-cancel-video-info":{"identifier":"deny-cancel-video-info","description":"Denies the cancel_video_info command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel_video_info"]}},"deny-check-deno-installed":{"identifier":"deny-check-deno-installed","description":"Denies the check_deno_installed command without any pre-configured scope.","commands":{"allow":[],"deny":["check_deno_installed"]}},"deny-clear-download-activity":{"identifier":"deny-clear-download-activity","description":"Denies the clear_download_activity command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_download_activity"]}},"deny-clear-finished-queue":{"identifier":"deny-clear-finished-queue","description":"Denies the clear_finished_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_finished_queue"]}},"deny-clear-queue":{"identifier":"deny-clear-queue","description":"Denies the clear_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_queue"]}},"deny-detect-gpu":{"identifier":"deny-detect-gpu","description":"Denies the detect_gpu command without any pre-configured scope.","commands":{"allow":[],"deny":["detect_gpu"]}},"deny-download-video":{"identifier":"deny-download-video","description":"Denies the download_video command without any pre-configured scope.","commands":{"allow":[],"deny":["download_video"]}},"deny-e2e-cancel-close-request":{"identifier":"deny-e2e-cancel-close-request","description":"Denies the e2e_cancel_close_request command without any pre-configured scope.","commands":{"allow":[],"deny":["e2e_cancel_close_request"]}},"deny-e2e-emit-stale-download-events":{"identifier":"deny-e2e-emit-stale-download-events","description":"Denies the e2e_emit_stale_download_events command without any pre-configured scope.","commands":{"allow":[],"deny":["e2e_emit_stale_download_events"]}},"deny-e2e-network-pipelining-probe":{"identifier":"deny-e2e-network-pipelining-probe","description":"Denies the e2e_network_pipelining_probe command without any pre-configured scope.","commands":{"allow":[],"deny":["e2e_network_pipelining_probe"]}},"deny-e2e-updater-install-probe":{"identifier":"deny-e2e-updater-install-probe","description":"Denies the e2e_updater_install_probe command without any pre-configured scope.","commands":{"allow":[],"deny":["e2e_updater_install_probe"]}},"deny-export-settings":{"identifier":"deny-export-settings","description":"Denies the export_settings command without any pre-configured scope.","commands":{"allow":[],"deny":["export_settings"]}},"deny-get-app-platform":{"identifier":"deny-get-app-platform","description":"Denies the get_app_platform command without any pre-configured scope.","commands":{"allow":[],"deny":["get_app_platform"]}},"deny-get-beta-updater-target":{"identifier":"deny-get-beta-updater-target","description":"Denies the get_beta_updater_target command without any pre-configured scope.","commands":{"allow":[],"deny":["get_beta_updater_target"]}},"deny-get-default-settings":{"identifier":"deny-get-default-settings","description":"Denies the get_default_settings command without any pre-configured scope.","commands":{"allow":[],"deny":["get_default_settings"]}},"deny-get-distribution-channel":{"identifier":"deny-get-distribution-channel","description":"Denies the get_distribution_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["get_distribution_channel"]}},"deny-get-download-activity":{"identifier":"deny-get-download-activity","description":"Denies the get_download_activity command without any pre-configured scope.","commands":{"allow":[],"deny":["get_download_activity"]}},"deny-get-formats":{"identifier":"deny-get-formats","description":"Denies the get_formats command without any pre-configured scope.","commands":{"allow":[],"deny":["get_formats"]}},"deny-get-queue":{"identifier":"deny-get-queue","description":"Denies the get_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["get_queue"]}},"deny-get-settings":{"identifier":"deny-get-settings","description":"Denies the get_settings command without any pre-configured scope.","commands":{"allow":[],"deny":["get_settings"]}},"deny-get-stats":{"identifier":"deny-get-stats","description":"Denies the get_stats command without any pre-configured scope.","commands":{"allow":[],"deny":["get_stats"]}},"deny-get-video-info":{"identifier":"deny-get-video-info","description":"Denies the get_video_info command without any pre-configured scope.","commands":{"allow":[],"deny":["get_video_info"]}},"deny-import-settings":{"identifier":"deny-import-settings","description":"Denies the import_settings command without any pre-configured scope.","commands":{"allow":[],"deny":["import_settings"]}},"deny-install-deno":{"identifier":"deny-install-deno","description":"Denies the install_deno command without any pre-configured scope.","commands":{"allow":[],"deny":["install_deno"]}},"deny-is-flatpak":{"identifier":"deny-is-flatpak","description":"Denies the is_flatpak command without any pre-configured scope.","commands":{"allow":[],"deny":["is_flatpak"]}},"deny-is-packaged":{"identifier":"deny-is-packaged","description":"Denies the is_packaged command without any pre-configured scope.","commands":{"allow":[],"deny":["is_packaged"]}},"deny-log-error":{"identifier":"deny-log-error","description":"Denies the log_error command without any pre-configured scope.","commands":{"allow":[],"deny":["log_error"]}},"deny-mark-main-window-ready":{"identifier":"deny-mark-main-window-ready","description":"Denies the mark_main_window_ready command without any pre-configured scope.","commands":{"allow":[],"deny":["mark_main_window_ready"]}},"deny-notify-settings-flushed":{"identifier":"deny-notify-settings-flushed","description":"Denies the notify_settings_flushed command without any pre-configured scope.","commands":{"allow":[],"deny":["notify_settings_flushed"]}},"deny-open-external":{"identifier":"deny-open-external","description":"Denies the open_external command without any pre-configured scope.","commands":{"allow":[],"deny":["open_external"]}},"deny-open-file-location":{"identifier":"deny-open-file-location","description":"Denies the open_file_location command without any pre-configured scope.","commands":{"allow":[],"deny":["open_file_location"]}},"deny-remove-from-queue":{"identifier":"deny-remove-from-queue","description":"Denies the remove_from_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_from_queue"]}},"deny-reorder-queue-item":{"identifier":"deny-reorder-queue-item","description":"Denies the reorder_queue_item command without any pre-configured scope.","commands":{"allow":[],"deny":["reorder_queue_item"]}},"deny-reset-settings":{"identifier":"deny-reset-settings","description":"Denies the reset_settings command without any pre-configured scope.","commands":{"allow":[],"deny":["reset_settings"]}},"deny-reset-stats":{"identifier":"deny-reset-stats","description":"Denies the reset_stats command without any pre-configured scope.","commands":{"allow":[],"deny":["reset_stats"]}},"deny-restart-app":{"identifier":"deny-restart-app","description":"Denies the restart_app command without any pre-configured scope.","commands":{"allow":[],"deny":["restart_app"]}},"deny-retry-queue-item":{"identifier":"deny-retry-queue-item","description":"Denies the retry_queue_item command without any pre-configured scope.","commands":{"allow":[],"deny":["retry_queue_item"]}},"deny-save-settings":{"identifier":"deny-save-settings","description":"Denies the save_settings command without any pre-configured scope.","commands":{"allow":[],"deny":["save_settings"]}},"deny-select-download-location":{"identifier":"deny-select-download-location","description":"Denies the select_download_location command without any pre-configured scope.","commands":{"allow":[],"deny":["select_download_location"]}},"deny-show-notification":{"identifier":"deny-show-notification","description":"Denies the show_notification command without any pre-configured scope.","commands":{"allow":[],"deny":["show_notification"]}},"deny-start-queue":{"identifier":"deny-start-queue","description":"Denies the start_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["start_queue"]}}},"permission_sets":{},"global_scope_schema":null},"core":{"default_permission":{"identifier":"default","description":"Default core plugins set.","permissions":["core:path:default","core:event:default","core:window:default","core:webview:default","core:app:default","core:image:default","core:resources:default","core:menu:default","core:tray:default"]},"permissions":{},"permission_sets":{},"global_scope_schema":null},"core:app":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-version","allow-name","allow-tauri-version","allow-identifier","allow-bundle-type","allow-register-listener","allow-remove-listener","allow-supports-multiple-windows"]},"permissions":{"allow-app-hide":{"identifier":"allow-app-hide","description":"Enables the app_hide command without any pre-configured scope.","commands":{"allow":["app_hide"],"deny":[]}},"allow-app-show":{"identifier":"allow-app-show","description":"Enables the app_show command without any pre-configured scope.","commands":{"allow":["app_show"],"deny":[]}},"allow-bundle-type":{"identifier":"allow-bundle-type","description":"Enables the bundle_type command without any pre-configured scope.","commands":{"allow":["bundle_type"],"deny":[]}},"allow-default-window-icon":{"identifier":"allow-default-window-icon","description":"Enables the default_window_icon command without any pre-configured scope.","commands":{"allow":["default_window_icon"],"deny":[]}},"allow-exit":{"identifier":"allow-exit","description":"Enables the exit command without any pre-configured scope.","commands":{"allow":["exit"],"deny":[]}},"allow-fetch-data-store-identifiers":{"identifier":"allow-fetch-data-store-identifiers","description":"Enables the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":["fetch_data_store_identifiers"],"deny":[]}},"allow-identifier":{"identifier":"allow-identifier","description":"Enables the identifier command without any pre-configured scope.","commands":{"allow":["identifier"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-data-store":{"identifier":"allow-remove-data-store","description":"Enables the remove_data_store command without any pre-configured scope.","commands":{"allow":["remove_data_store"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-set-app-theme":{"identifier":"allow-set-app-theme","description":"Enables the set_app_theme command without any pre-configured scope.","commands":{"allow":["set_app_theme"],"deny":[]}},"allow-set-dock-visibility":{"identifier":"allow-set-dock-visibility","description":"Enables the set_dock_visibility command without any pre-configured scope.","commands":{"allow":["set_dock_visibility"],"deny":[]}},"allow-supports-multiple-windows":{"identifier":"allow-supports-multiple-windows","description":"Enables the supports_multiple_windows command without any pre-configured scope.","commands":{"allow":["supports_multiple_windows"],"deny":[]}},"allow-tauri-version":{"identifier":"allow-tauri-version","description":"Enables the tauri_version command without any pre-configured scope.","commands":{"allow":["tauri_version"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-app-hide":{"identifier":"deny-app-hide","description":"Denies the app_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["app_hide"]}},"deny-app-show":{"identifier":"deny-app-show","description":"Denies the app_show command without any pre-configured scope.","commands":{"allow":[],"deny":["app_show"]}},"deny-bundle-type":{"identifier":"deny-bundle-type","description":"Denies the bundle_type command without any pre-configured scope.","commands":{"allow":[],"deny":["bundle_type"]}},"deny-default-window-icon":{"identifier":"deny-default-window-icon","description":"Denies the default_window_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["default_window_icon"]}},"deny-exit":{"identifier":"deny-exit","description":"Denies the exit command without any pre-configured scope.","commands":{"allow":[],"deny":["exit"]}},"deny-fetch-data-store-identifiers":{"identifier":"deny-fetch-data-store-identifiers","description":"Denies the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch_data_store_identifiers"]}},"deny-identifier":{"identifier":"deny-identifier","description":"Denies the identifier command without any pre-configured scope.","commands":{"allow":[],"deny":["identifier"]}},"deny-name":{"identifier":"deny-name","description":"Denies the name command without any pre-configured scope.","commands":{"allow":[],"deny":["name"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-data-store":{"identifier":"deny-remove-data-store","description":"Denies the remove_data_store command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_data_store"]}},"deny-remove-listener":{"identifier":"deny-remove-listener","description":"Denies the remove_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_listener"]}},"deny-set-app-theme":{"identifier":"deny-set-app-theme","description":"Denies the set_app_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_app_theme"]}},"deny-set-dock-visibility":{"identifier":"deny-set-dock-visibility","description":"Denies the set_dock_visibility command without any pre-configured scope.","commands":{"allow":[],"deny":["set_dock_visibility"]}},"deny-supports-multiple-windows":{"identifier":"deny-supports-multiple-windows","description":"Denies the supports_multiple_windows command without any pre-configured scope.","commands":{"allow":[],"deny":["supports_multiple_windows"]}},"deny-tauri-version":{"identifier":"deny-tauri-version","description":"Denies the tauri_version command without any pre-configured scope.","commands":{"allow":[],"deny":["tauri_version"]}},"deny-version":{"identifier":"deny-version","description":"Denies the version command without any pre-configured scope.","commands":{"allow":[],"deny":["version"]}}},"permission_sets":{},"global_scope_schema":null},"core:event":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-listen","allow-unlisten","allow-emit","allow-emit-to"]},"permissions":{"allow-emit":{"identifier":"allow-emit","description":"Enables the emit command without any pre-configured scope.","commands":{"allow":["emit"],"deny":[]}},"allow-emit-to":{"identifier":"allow-emit-to","description":"Enables the emit_to command without any pre-configured scope.","commands":{"allow":["emit_to"],"deny":[]}},"allow-listen":{"identifier":"allow-listen","description":"Enables the listen command without any pre-configured scope.","commands":{"allow":["listen"],"deny":[]}},"allow-unlisten":{"identifier":"allow-unlisten","description":"Enables the unlisten command without any pre-configured scope.","commands":{"allow":["unlisten"],"deny":[]}},"deny-emit":{"identifier":"deny-emit","description":"Denies the emit command without any pre-configured scope.","commands":{"allow":[],"deny":["emit"]}},"deny-emit-to":{"identifier":"deny-emit-to","description":"Denies the emit_to command without any pre-configured scope.","commands":{"allow":[],"deny":["emit_to"]}},"deny-listen":{"identifier":"deny-listen","description":"Denies the listen command without any pre-configured scope.","commands":{"allow":[],"deny":["listen"]}},"deny-unlisten":{"identifier":"deny-unlisten","description":"Denies the unlisten command without any pre-configured scope.","commands":{"allow":[],"deny":["unlisten"]}}},"permission_sets":{},"global_scope_schema":null},"core:image":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-from-bytes","allow-from-path","allow-rgba","allow-size"]},"permissions":{"allow-from-bytes":{"identifier":"allow-from-bytes","description":"Enables the from_bytes command without any pre-configured scope.","commands":{"allow":["from_bytes"],"deny":[]}},"allow-from-path":{"identifier":"allow-from-path","description":"Enables the from_path command without any pre-configured scope.","commands":{"allow":["from_path"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-rgba":{"identifier":"allow-rgba","description":"Enables the rgba command without any pre-configured scope.","commands":{"allow":["rgba"],"deny":[]}},"allow-size":{"identifier":"allow-size","description":"Enables the size command without any pre-configured scope.","commands":{"allow":["size"],"deny":[]}},"deny-from-bytes":{"identifier":"deny-from-bytes","description":"Denies the from_bytes command without any pre-configured scope.","commands":{"allow":[],"deny":["from_bytes"]}},"deny-from-path":{"identifier":"deny-from-path","description":"Denies the from_path command without any pre-configured scope.","commands":{"allow":[],"deny":["from_path"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-rgba":{"identifier":"deny-rgba","description":"Denies the rgba command without any pre-configured scope.","commands":{"allow":[],"deny":["rgba"]}},"deny-size":{"identifier":"deny-size","description":"Denies the size command without any pre-configured scope.","commands":{"allow":[],"deny":["size"]}}},"permission_sets":{},"global_scope_schema":null},"core:menu":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-append","allow-prepend","allow-insert","allow-remove","allow-remove-at","allow-items","allow-get","allow-popup","allow-create-default","allow-set-as-app-menu","allow-set-as-window-menu","allow-text","allow-set-text","allow-is-enabled","allow-set-enabled","allow-set-accelerator","allow-set-as-windows-menu-for-nsapp","allow-set-as-help-menu-for-nsapp","allow-is-checked","allow-set-checked","allow-set-icon"]},"permissions":{"allow-append":{"identifier":"allow-append","description":"Enables the append command without any pre-configured scope.","commands":{"allow":["append"],"deny":[]}},"allow-create-default":{"identifier":"allow-create-default","description":"Enables the create_default command without any pre-configured scope.","commands":{"allow":["create_default"],"deny":[]}},"allow-get":{"identifier":"allow-get","description":"Enables the get command without any pre-configured scope.","commands":{"allow":["get"],"deny":[]}},"allow-insert":{"identifier":"allow-insert","description":"Enables the insert command without any pre-configured scope.","commands":{"allow":["insert"],"deny":[]}},"allow-is-checked":{"identifier":"allow-is-checked","description":"Enables the is_checked command without any pre-configured scope.","commands":{"allow":["is_checked"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-items":{"identifier":"allow-items","description":"Enables the items command without any pre-configured scope.","commands":{"allow":["items"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-popup":{"identifier":"allow-popup","description":"Enables the popup command without any pre-configured scope.","commands":{"allow":["popup"],"deny":[]}},"allow-prepend":{"identifier":"allow-prepend","description":"Enables the prepend command without any pre-configured scope.","commands":{"allow":["prepend"],"deny":[]}},"allow-remove":{"identifier":"allow-remove","description":"Enables the remove command without any pre-configured scope.","commands":{"allow":["remove"],"deny":[]}},"allow-remove-at":{"identifier":"allow-remove-at","description":"Enables the remove_at command without any pre-configured scope.","commands":{"allow":["remove_at"],"deny":[]}},"allow-set-accelerator":{"identifier":"allow-set-accelerator","description":"Enables the set_accelerator command without any pre-configured scope.","commands":{"allow":["set_accelerator"],"deny":[]}},"allow-set-as-app-menu":{"identifier":"allow-set-as-app-menu","description":"Enables the set_as_app_menu command without any pre-configured scope.","commands":{"allow":["set_as_app_menu"],"deny":[]}},"allow-set-as-help-menu-for-nsapp":{"identifier":"allow-set-as-help-menu-for-nsapp","description":"Enables the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_help_menu_for_nsapp"],"deny":[]}},"allow-set-as-window-menu":{"identifier":"allow-set-as-window-menu","description":"Enables the set_as_window_menu command without any pre-configured scope.","commands":{"allow":["set_as_window_menu"],"deny":[]}},"allow-set-as-windows-menu-for-nsapp":{"identifier":"allow-set-as-windows-menu-for-nsapp","description":"Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_windows_menu_for_nsapp"],"deny":[]}},"allow-set-checked":{"identifier":"allow-set-checked","description":"Enables the set_checked command without any pre-configured scope.","commands":{"allow":["set_checked"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-text":{"identifier":"allow-set-text","description":"Enables the set_text command without any pre-configured scope.","commands":{"allow":["set_text"],"deny":[]}},"allow-text":{"identifier":"allow-text","description":"Enables the text command without any pre-configured scope.","commands":{"allow":["text"],"deny":[]}},"deny-append":{"identifier":"deny-append","description":"Denies the append command without any pre-configured scope.","commands":{"allow":[],"deny":["append"]}},"deny-create-default":{"identifier":"deny-create-default","description":"Denies the create_default command without any pre-configured scope.","commands":{"allow":[],"deny":["create_default"]}},"deny-get":{"identifier":"deny-get","description":"Denies the get command without any pre-configured scope.","commands":{"allow":[],"deny":["get"]}},"deny-insert":{"identifier":"deny-insert","description":"Denies the insert command without any pre-configured scope.","commands":{"allow":[],"deny":["insert"]}},"deny-is-checked":{"identifier":"deny-is-checked","description":"Denies the is_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["is_checked"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-items":{"identifier":"deny-items","description":"Denies the items command without any pre-configured scope.","commands":{"allow":[],"deny":["items"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-popup":{"identifier":"deny-popup","description":"Denies the popup command without any pre-configured scope.","commands":{"allow":[],"deny":["popup"]}},"deny-prepend":{"identifier":"deny-prepend","description":"Denies the prepend command without any pre-configured scope.","commands":{"allow":[],"deny":["prepend"]}},"deny-remove":{"identifier":"deny-remove","description":"Denies the remove command without any pre-configured scope.","commands":{"allow":[],"deny":["remove"]}},"deny-remove-at":{"identifier":"deny-remove-at","description":"Denies the remove_at command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_at"]}},"deny-set-accelerator":{"identifier":"deny-set-accelerator","description":"Denies the set_accelerator command without any pre-configured scope.","commands":{"allow":[],"deny":["set_accelerator"]}},"deny-set-as-app-menu":{"identifier":"deny-set-as-app-menu","description":"Denies the set_as_app_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_app_menu"]}},"deny-set-as-help-menu-for-nsapp":{"identifier":"deny-set-as-help-menu-for-nsapp","description":"Denies the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_help_menu_for_nsapp"]}},"deny-set-as-window-menu":{"identifier":"deny-set-as-window-menu","description":"Denies the set_as_window_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_window_menu"]}},"deny-set-as-windows-menu-for-nsapp":{"identifier":"deny-set-as-windows-menu-for-nsapp","description":"Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_windows_menu_for_nsapp"]}},"deny-set-checked":{"identifier":"deny-set-checked","description":"Denies the set_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["set_checked"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-text":{"identifier":"deny-set-text","description":"Denies the set_text command without any pre-configured scope.","commands":{"allow":[],"deny":["set_text"]}},"deny-text":{"identifier":"deny-text","description":"Denies the text command without any pre-configured scope.","commands":{"allow":[],"deny":["text"]}}},"permission_sets":{},"global_scope_schema":null},"core:path":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-resolve-directory","allow-resolve","allow-normalize","allow-join","allow-dirname","allow-extname","allow-basename","allow-is-absolute"]},"permissions":{"allow-basename":{"identifier":"allow-basename","description":"Enables the basename command without any pre-configured scope.","commands":{"allow":["basename"],"deny":[]}},"allow-dirname":{"identifier":"allow-dirname","description":"Enables the dirname command without any pre-configured scope.","commands":{"allow":["dirname"],"deny":[]}},"allow-extname":{"identifier":"allow-extname","description":"Enables the extname command without any pre-configured scope.","commands":{"allow":["extname"],"deny":[]}},"allow-is-absolute":{"identifier":"allow-is-absolute","description":"Enables the is_absolute command without any pre-configured scope.","commands":{"allow":["is_absolute"],"deny":[]}},"allow-join":{"identifier":"allow-join","description":"Enables the join command without any pre-configured scope.","commands":{"allow":["join"],"deny":[]}},"allow-normalize":{"identifier":"allow-normalize","description":"Enables the normalize command without any pre-configured scope.","commands":{"allow":["normalize"],"deny":[]}},"allow-resolve":{"identifier":"allow-resolve","description":"Enables the resolve command without any pre-configured scope.","commands":{"allow":["resolve"],"deny":[]}},"allow-resolve-directory":{"identifier":"allow-resolve-directory","description":"Enables the resolve_directory command without any pre-configured scope.","commands":{"allow":["resolve_directory"],"deny":[]}},"deny-basename":{"identifier":"deny-basename","description":"Denies the basename command without any pre-configured scope.","commands":{"allow":[],"deny":["basename"]}},"deny-dirname":{"identifier":"deny-dirname","description":"Denies the dirname command without any pre-configured scope.","commands":{"allow":[],"deny":["dirname"]}},"deny-extname":{"identifier":"deny-extname","description":"Denies the extname command without any pre-configured scope.","commands":{"allow":[],"deny":["extname"]}},"deny-is-absolute":{"identifier":"deny-is-absolute","description":"Denies the is_absolute command without any pre-configured scope.","commands":{"allow":[],"deny":["is_absolute"]}},"deny-join":{"identifier":"deny-join","description":"Denies the join command without any pre-configured scope.","commands":{"allow":[],"deny":["join"]}},"deny-normalize":{"identifier":"deny-normalize","description":"Denies the normalize command without any pre-configured scope.","commands":{"allow":[],"deny":["normalize"]}},"deny-resolve":{"identifier":"deny-resolve","description":"Denies the resolve command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve"]}},"deny-resolve-directory":{"identifier":"deny-resolve-directory","description":"Denies the resolve_directory command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve_directory"]}}},"permission_sets":{},"global_scope_schema":null},"core:resources":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-close"]},"permissions":{"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}}},"permission_sets":{},"global_scope_schema":null},"core:tray":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-get-by-id","allow-remove-by-id","allow-set-icon","allow-set-menu","allow-set-tooltip","allow-set-title","allow-set-visible","allow-set-temp-dir-path","allow-set-icon-as-template","allow-set-icon-with-as-template","allow-set-show-menu-on-left-click"]},"permissions":{"allow-get-by-id":{"identifier":"allow-get-by-id","description":"Enables the get_by_id command without any pre-configured scope.","commands":{"allow":["get_by_id"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-remove-by-id":{"identifier":"allow-remove-by-id","description":"Enables the remove_by_id command without any pre-configured scope.","commands":{"allow":["remove_by_id"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-icon-as-template":{"identifier":"allow-set-icon-as-template","description":"Enables the set_icon_as_template command without any pre-configured scope.","commands":{"allow":["set_icon_as_template"],"deny":[]}},"allow-set-icon-with-as-template":{"identifier":"allow-set-icon-with-as-template","description":"Enables the set_icon_with_as_template command without any pre-configured scope.","commands":{"allow":["set_icon_with_as_template"],"deny":[]}},"allow-set-menu":{"identifier":"allow-set-menu","description":"Enables the set_menu command without any pre-configured scope.","commands":{"allow":["set_menu"],"deny":[]}},"allow-set-show-menu-on-left-click":{"identifier":"allow-set-show-menu-on-left-click","description":"Enables the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":["set_show_menu_on_left_click"],"deny":[]}},"allow-set-temp-dir-path":{"identifier":"allow-set-temp-dir-path","description":"Enables the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":["set_temp_dir_path"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-tooltip":{"identifier":"allow-set-tooltip","description":"Enables the set_tooltip command without any pre-configured scope.","commands":{"allow":["set_tooltip"],"deny":[]}},"allow-set-visible":{"identifier":"allow-set-visible","description":"Enables the set_visible command without any pre-configured scope.","commands":{"allow":["set_visible"],"deny":[]}},"deny-get-by-id":{"identifier":"deny-get-by-id","description":"Denies the get_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["get_by_id"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-remove-by-id":{"identifier":"deny-remove-by-id","description":"Denies the remove_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_by_id"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-icon-as-template":{"identifier":"deny-set-icon-as-template","description":"Denies the set_icon_as_template command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon_as_template"]}},"deny-set-icon-with-as-template":{"identifier":"deny-set-icon-with-as-template","description":"Denies the set_icon_with_as_template command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon_with_as_template"]}},"deny-set-menu":{"identifier":"deny-set-menu","description":"Denies the set_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_menu"]}},"deny-set-show-menu-on-left-click":{"identifier":"deny-set-show-menu-on-left-click","description":"Denies the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":[],"deny":["set_show_menu_on_left_click"]}},"deny-set-temp-dir-path":{"identifier":"deny-set-temp-dir-path","description":"Denies the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":[],"deny":["set_temp_dir_path"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-tooltip":{"identifier":"deny-set-tooltip","description":"Denies the set_tooltip command without any pre-configured scope.","commands":{"allow":[],"deny":["set_tooltip"]}},"deny-set-visible":{"identifier":"deny-set-visible","description":"Denies the set_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible"]}}},"permission_sets":{},"global_scope_schema":null},"core:webview":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-webviews","allow-webview-position","allow-webview-size","allow-internal-toggle-devtools"]},"permissions":{"allow-clear-all-browsing-data":{"identifier":"allow-clear-all-browsing-data","description":"Enables the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":["clear_all_browsing_data"],"deny":[]}},"allow-create-webview":{"identifier":"allow-create-webview","description":"Enables the create_webview command without any pre-configured scope.","commands":{"allow":["create_webview"],"deny":[]}},"allow-create-webview-window":{"identifier":"allow-create-webview-window","description":"Enables the create_webview_window command without any pre-configured scope.","commands":{"allow":["create_webview_window"],"deny":[]}},"allow-get-all-webviews":{"identifier":"allow-get-all-webviews","description":"Enables the get_all_webviews command without any pre-configured scope.","commands":{"allow":["get_all_webviews"],"deny":[]}},"allow-internal-toggle-devtools":{"identifier":"allow-internal-toggle-devtools","description":"Enables the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":["internal_toggle_devtools"],"deny":[]}},"allow-print":{"identifier":"allow-print","description":"Enables the print command without any pre-configured scope.","commands":{"allow":["print"],"deny":[]}},"allow-reparent":{"identifier":"allow-reparent","description":"Enables the reparent command without any pre-configured scope.","commands":{"allow":["reparent"],"deny":[]}},"allow-set-webview-auto-resize":{"identifier":"allow-set-webview-auto-resize","description":"Enables the set_webview_auto_resize command without any pre-configured scope.","commands":{"allow":["set_webview_auto_resize"],"deny":[]}},"allow-set-webview-background-color":{"identifier":"allow-set-webview-background-color","description":"Enables the set_webview_background_color command without any pre-configured scope.","commands":{"allow":["set_webview_background_color"],"deny":[]}},"allow-set-webview-focus":{"identifier":"allow-set-webview-focus","description":"Enables the set_webview_focus command without any pre-configured scope.","commands":{"allow":["set_webview_focus"],"deny":[]}},"allow-set-webview-position":{"identifier":"allow-set-webview-position","description":"Enables the set_webview_position command without any pre-configured scope.","commands":{"allow":["set_webview_position"],"deny":[]}},"allow-set-webview-size":{"identifier":"allow-set-webview-size","description":"Enables the set_webview_size command without any pre-configured scope.","commands":{"allow":["set_webview_size"],"deny":[]}},"allow-set-webview-zoom":{"identifier":"allow-set-webview-zoom","description":"Enables the set_webview_zoom command without any pre-configured scope.","commands":{"allow":["set_webview_zoom"],"deny":[]}},"allow-webview-close":{"identifier":"allow-webview-close","description":"Enables the webview_close command without any pre-configured scope.","commands":{"allow":["webview_close"],"deny":[]}},"allow-webview-hide":{"identifier":"allow-webview-hide","description":"Enables the webview_hide command without any pre-configured scope.","commands":{"allow":["webview_hide"],"deny":[]}},"allow-webview-position":{"identifier":"allow-webview-position","description":"Enables the webview_position command without any pre-configured scope.","commands":{"allow":["webview_position"],"deny":[]}},"allow-webview-show":{"identifier":"allow-webview-show","description":"Enables the webview_show command without any pre-configured scope.","commands":{"allow":["webview_show"],"deny":[]}},"allow-webview-size":{"identifier":"allow-webview-size","description":"Enables the webview_size command without any pre-configured scope.","commands":{"allow":["webview_size"],"deny":[]}},"deny-clear-all-browsing-data":{"identifier":"deny-clear-all-browsing-data","description":"Denies the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_all_browsing_data"]}},"deny-create-webview":{"identifier":"deny-create-webview","description":"Denies the create_webview command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview"]}},"deny-create-webview-window":{"identifier":"deny-create-webview-window","description":"Denies the create_webview_window command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview_window"]}},"deny-get-all-webviews":{"identifier":"deny-get-all-webviews","description":"Denies the get_all_webviews command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_webviews"]}},"deny-internal-toggle-devtools":{"identifier":"deny-internal-toggle-devtools","description":"Denies the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_devtools"]}},"deny-print":{"identifier":"deny-print","description":"Denies the print command without any pre-configured scope.","commands":{"allow":[],"deny":["print"]}},"deny-reparent":{"identifier":"deny-reparent","description":"Denies the reparent command without any pre-configured scope.","commands":{"allow":[],"deny":["reparent"]}},"deny-set-webview-auto-resize":{"identifier":"deny-set-webview-auto-resize","description":"Denies the set_webview_auto_resize command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_auto_resize"]}},"deny-set-webview-background-color":{"identifier":"deny-set-webview-background-color","description":"Denies the set_webview_background_color command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_background_color"]}},"deny-set-webview-focus":{"identifier":"deny-set-webview-focus","description":"Denies the set_webview_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_focus"]}},"deny-set-webview-position":{"identifier":"deny-set-webview-position","description":"Denies the set_webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_position"]}},"deny-set-webview-size":{"identifier":"deny-set-webview-size","description":"Denies the set_webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_size"]}},"deny-set-webview-zoom":{"identifier":"deny-set-webview-zoom","description":"Denies the set_webview_zoom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_zoom"]}},"deny-webview-close":{"identifier":"deny-webview-close","description":"Denies the webview_close command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_close"]}},"deny-webview-hide":{"identifier":"deny-webview-hide","description":"Denies the webview_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_hide"]}},"deny-webview-position":{"identifier":"deny-webview-position","description":"Denies the webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_position"]}},"deny-webview-show":{"identifier":"deny-webview-show","description":"Denies the webview_show command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_show"]}},"deny-webview-size":{"identifier":"deny-webview-size","description":"Denies the webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_size"]}}},"permission_sets":{},"global_scope_schema":null},"core:window":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-windows","allow-scale-factor","allow-inner-position","allow-outer-position","allow-inner-size","allow-outer-size","allow-is-fullscreen","allow-is-minimized","allow-is-maximized","allow-is-focused","allow-is-decorated","allow-is-resizable","allow-is-maximizable","allow-is-minimizable","allow-is-closable","allow-is-visible","allow-is-enabled","allow-title","allow-current-monitor","allow-primary-monitor","allow-monitor-from-point","allow-available-monitors","allow-cursor-position","allow-theme","allow-is-always-on-top","allow-activity-name","allow-scene-identifier","allow-internal-toggle-maximize"]},"permissions":{"allow-activity-name":{"identifier":"allow-activity-name","description":"Enables the activity_name command without any pre-configured scope.","commands":{"allow":["activity_name"],"deny":[]}},"allow-available-monitors":{"identifier":"allow-available-monitors","description":"Enables the available_monitors command without any pre-configured scope.","commands":{"allow":["available_monitors"],"deny":[]}},"allow-center":{"identifier":"allow-center","description":"Enables the center command without any pre-configured scope.","commands":{"allow":["center"],"deny":[]}},"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"allow-create":{"identifier":"allow-create","description":"Enables the create command without any pre-configured scope.","commands":{"allow":["create"],"deny":[]}},"allow-current-monitor":{"identifier":"allow-current-monitor","description":"Enables the current_monitor command without any pre-configured scope.","commands":{"allow":["current_monitor"],"deny":[]}},"allow-cursor-position":{"identifier":"allow-cursor-position","description":"Enables the cursor_position command without any pre-configured scope.","commands":{"allow":["cursor_position"],"deny":[]}},"allow-destroy":{"identifier":"allow-destroy","description":"Enables the destroy command without any pre-configured scope.","commands":{"allow":["destroy"],"deny":[]}},"allow-get-all-windows":{"identifier":"allow-get-all-windows","description":"Enables the get_all_windows command without any pre-configured scope.","commands":{"allow":["get_all_windows"],"deny":[]}},"allow-hide":{"identifier":"allow-hide","description":"Enables the hide command without any pre-configured scope.","commands":{"allow":["hide"],"deny":[]}},"allow-inner-position":{"identifier":"allow-inner-position","description":"Enables the inner_position command without any pre-configured scope.","commands":{"allow":["inner_position"],"deny":[]}},"allow-inner-size":{"identifier":"allow-inner-size","description":"Enables the inner_size command without any pre-configured scope.","commands":{"allow":["inner_size"],"deny":[]}},"allow-internal-toggle-maximize":{"identifier":"allow-internal-toggle-maximize","description":"Enables the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":["internal_toggle_maximize"],"deny":[]}},"allow-is-always-on-top":{"identifier":"allow-is-always-on-top","description":"Enables the is_always_on_top command without any pre-configured scope.","commands":{"allow":["is_always_on_top"],"deny":[]}},"allow-is-closable":{"identifier":"allow-is-closable","description":"Enables the is_closable command without any pre-configured scope.","commands":{"allow":["is_closable"],"deny":[]}},"allow-is-decorated":{"identifier":"allow-is-decorated","description":"Enables the is_decorated command without any pre-configured scope.","commands":{"allow":["is_decorated"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-is-focused":{"identifier":"allow-is-focused","description":"Enables the is_focused command without any pre-configured scope.","commands":{"allow":["is_focused"],"deny":[]}},"allow-is-fullscreen":{"identifier":"allow-is-fullscreen","description":"Enables the is_fullscreen command without any pre-configured scope.","commands":{"allow":["is_fullscreen"],"deny":[]}},"allow-is-maximizable":{"identifier":"allow-is-maximizable","description":"Enables the is_maximizable command without any pre-configured scope.","commands":{"allow":["is_maximizable"],"deny":[]}},"allow-is-maximized":{"identifier":"allow-is-maximized","description":"Enables the is_maximized command without any pre-configured scope.","commands":{"allow":["is_maximized"],"deny":[]}},"allow-is-minimizable":{"identifier":"allow-is-minimizable","description":"Enables the is_minimizable command without any pre-configured scope.","commands":{"allow":["is_minimizable"],"deny":[]}},"allow-is-minimized":{"identifier":"allow-is-minimized","description":"Enables the is_minimized command without any pre-configured scope.","commands":{"allow":["is_minimized"],"deny":[]}},"allow-is-resizable":{"identifier":"allow-is-resizable","description":"Enables the is_resizable command without any pre-configured scope.","commands":{"allow":["is_resizable"],"deny":[]}},"allow-is-visible":{"identifier":"allow-is-visible","description":"Enables the is_visible command without any pre-configured scope.","commands":{"allow":["is_visible"],"deny":[]}},"allow-maximize":{"identifier":"allow-maximize","description":"Enables the maximize command without any pre-configured scope.","commands":{"allow":["maximize"],"deny":[]}},"allow-minimize":{"identifier":"allow-minimize","description":"Enables the minimize command without any pre-configured scope.","commands":{"allow":["minimize"],"deny":[]}},"allow-monitor-from-point":{"identifier":"allow-monitor-from-point","description":"Enables the monitor_from_point command without any pre-configured scope.","commands":{"allow":["monitor_from_point"],"deny":[]}},"allow-outer-position":{"identifier":"allow-outer-position","description":"Enables the outer_position command without any pre-configured scope.","commands":{"allow":["outer_position"],"deny":[]}},"allow-outer-size":{"identifier":"allow-outer-size","description":"Enables the outer_size command without any pre-configured scope.","commands":{"allow":["outer_size"],"deny":[]}},"allow-primary-monitor":{"identifier":"allow-primary-monitor","description":"Enables the primary_monitor command without any pre-configured scope.","commands":{"allow":["primary_monitor"],"deny":[]}},"allow-request-user-attention":{"identifier":"allow-request-user-attention","description":"Enables the request_user_attention command without any pre-configured scope.","commands":{"allow":["request_user_attention"],"deny":[]}},"allow-scale-factor":{"identifier":"allow-scale-factor","description":"Enables the scale_factor command without any pre-configured scope.","commands":{"allow":["scale_factor"],"deny":[]}},"allow-scene-identifier":{"identifier":"allow-scene-identifier","description":"Enables the scene_identifier command without any pre-configured scope.","commands":{"allow":["scene_identifier"],"deny":[]}},"allow-set-always-on-bottom":{"identifier":"allow-set-always-on-bottom","description":"Enables the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":["set_always_on_bottom"],"deny":[]}},"allow-set-always-on-top":{"identifier":"allow-set-always-on-top","description":"Enables the set_always_on_top command without any pre-configured scope.","commands":{"allow":["set_always_on_top"],"deny":[]}},"allow-set-background-color":{"identifier":"allow-set-background-color","description":"Enables the set_background_color command without any pre-configured scope.","commands":{"allow":["set_background_color"],"deny":[]}},"allow-set-badge-count":{"identifier":"allow-set-badge-count","description":"Enables the set_badge_count command without any pre-configured scope.","commands":{"allow":["set_badge_count"],"deny":[]}},"allow-set-badge-label":{"identifier":"allow-set-badge-label","description":"Enables the set_badge_label command without any pre-configured scope.","commands":{"allow":["set_badge_label"],"deny":[]}},"allow-set-closable":{"identifier":"allow-set-closable","description":"Enables the set_closable command without any pre-configured scope.","commands":{"allow":["set_closable"],"deny":[]}},"allow-set-content-protected":{"identifier":"allow-set-content-protected","description":"Enables the set_content_protected command without any pre-configured scope.","commands":{"allow":["set_content_protected"],"deny":[]}},"allow-set-cursor-grab":{"identifier":"allow-set-cursor-grab","description":"Enables the set_cursor_grab command without any pre-configured scope.","commands":{"allow":["set_cursor_grab"],"deny":[]}},"allow-set-cursor-icon":{"identifier":"allow-set-cursor-icon","description":"Enables the set_cursor_icon command without any pre-configured scope.","commands":{"allow":["set_cursor_icon"],"deny":[]}},"allow-set-cursor-position":{"identifier":"allow-set-cursor-position","description":"Enables the set_cursor_position command without any pre-configured scope.","commands":{"allow":["set_cursor_position"],"deny":[]}},"allow-set-cursor-visible":{"identifier":"allow-set-cursor-visible","description":"Enables the set_cursor_visible command without any pre-configured scope.","commands":{"allow":["set_cursor_visible"],"deny":[]}},"allow-set-decorations":{"identifier":"allow-set-decorations","description":"Enables the set_decorations command without any pre-configured scope.","commands":{"allow":["set_decorations"],"deny":[]}},"allow-set-effects":{"identifier":"allow-set-effects","description":"Enables the set_effects command without any pre-configured scope.","commands":{"allow":["set_effects"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-focus":{"identifier":"allow-set-focus","description":"Enables the set_focus command without any pre-configured scope.","commands":{"allow":["set_focus"],"deny":[]}},"allow-set-focusable":{"identifier":"allow-set-focusable","description":"Enables the set_focusable command without any pre-configured scope.","commands":{"allow":["set_focusable"],"deny":[]}},"allow-set-fullscreen":{"identifier":"allow-set-fullscreen","description":"Enables the set_fullscreen command without any pre-configured scope.","commands":{"allow":["set_fullscreen"],"deny":[]}},"allow-set-fullscreen-on-monitor":{"identifier":"allow-set-fullscreen-on-monitor","description":"Enables the set_fullscreen_on_monitor command without any pre-configured scope.","commands":{"allow":["set_fullscreen_on_monitor"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-ignore-cursor-events":{"identifier":"allow-set-ignore-cursor-events","description":"Enables the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":["set_ignore_cursor_events"],"deny":[]}},"allow-set-max-size":{"identifier":"allow-set-max-size","description":"Enables the set_max_size command without any pre-configured scope.","commands":{"allow":["set_max_size"],"deny":[]}},"allow-set-maximizable":{"identifier":"allow-set-maximizable","description":"Enables the set_maximizable command without any pre-configured scope.","commands":{"allow":["set_maximizable"],"deny":[]}},"allow-set-min-size":{"identifier":"allow-set-min-size","description":"Enables the set_min_size command without any pre-configured scope.","commands":{"allow":["set_min_size"],"deny":[]}},"allow-set-minimizable":{"identifier":"allow-set-minimizable","description":"Enables the set_minimizable command without any pre-configured scope.","commands":{"allow":["set_minimizable"],"deny":[]}},"allow-set-overlay-icon":{"identifier":"allow-set-overlay-icon","description":"Enables the set_overlay_icon command without any pre-configured scope.","commands":{"allow":["set_overlay_icon"],"deny":[]}},"allow-set-position":{"identifier":"allow-set-position","description":"Enables the set_position command without any pre-configured scope.","commands":{"allow":["set_position"],"deny":[]}},"allow-set-progress-bar":{"identifier":"allow-set-progress-bar","description":"Enables the set_progress_bar command without any pre-configured scope.","commands":{"allow":["set_progress_bar"],"deny":[]}},"allow-set-resizable":{"identifier":"allow-set-resizable","description":"Enables the set_resizable command without any pre-configured scope.","commands":{"allow":["set_resizable"],"deny":[]}},"allow-set-shadow":{"identifier":"allow-set-shadow","description":"Enables the set_shadow command without any pre-configured scope.","commands":{"allow":["set_shadow"],"deny":[]}},"allow-set-simple-fullscreen":{"identifier":"allow-set-simple-fullscreen","description":"Enables the set_simple_fullscreen command without any pre-configured scope.","commands":{"allow":["set_simple_fullscreen"],"deny":[]}},"allow-set-size":{"identifier":"allow-set-size","description":"Enables the set_size command without any pre-configured scope.","commands":{"allow":["set_size"],"deny":[]}},"allow-set-size-constraints":{"identifier":"allow-set-size-constraints","description":"Enables the set_size_constraints command without any pre-configured scope.","commands":{"allow":["set_size_constraints"],"deny":[]}},"allow-set-skip-taskbar":{"identifier":"allow-set-skip-taskbar","description":"Enables the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":["set_skip_taskbar"],"deny":[]}},"allow-set-theme":{"identifier":"allow-set-theme","description":"Enables the set_theme command without any pre-configured scope.","commands":{"allow":["set_theme"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-title-bar-style":{"identifier":"allow-set-title-bar-style","description":"Enables the set_title_bar_style command without any pre-configured scope.","commands":{"allow":["set_title_bar_style"],"deny":[]}},"allow-set-visible-on-all-workspaces":{"identifier":"allow-set-visible-on-all-workspaces","description":"Enables the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":["set_visible_on_all_workspaces"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"allow-start-dragging":{"identifier":"allow-start-dragging","description":"Enables the start_dragging command without any pre-configured scope.","commands":{"allow":["start_dragging"],"deny":[]}},"allow-start-resize-dragging":{"identifier":"allow-start-resize-dragging","description":"Enables the start_resize_dragging command without any pre-configured scope.","commands":{"allow":["start_resize_dragging"],"deny":[]}},"allow-theme":{"identifier":"allow-theme","description":"Enables the theme command without any pre-configured scope.","commands":{"allow":["theme"],"deny":[]}},"allow-title":{"identifier":"allow-title","description":"Enables the title command without any pre-configured scope.","commands":{"allow":["title"],"deny":[]}},"allow-toggle-maximize":{"identifier":"allow-toggle-maximize","description":"Enables the toggle_maximize command without any pre-configured scope.","commands":{"allow":["toggle_maximize"],"deny":[]}},"allow-unmaximize":{"identifier":"allow-unmaximize","description":"Enables the unmaximize command without any pre-configured scope.","commands":{"allow":["unmaximize"],"deny":[]}},"allow-unminimize":{"identifier":"allow-unminimize","description":"Enables the unminimize command without any pre-configured scope.","commands":{"allow":["unminimize"],"deny":[]}},"deny-activity-name":{"identifier":"deny-activity-name","description":"Denies the activity_name command without any pre-configured scope.","commands":{"allow":[],"deny":["activity_name"]}},"deny-available-monitors":{"identifier":"deny-available-monitors","description":"Denies the available_monitors command without any pre-configured scope.","commands":{"allow":[],"deny":["available_monitors"]}},"deny-center":{"identifier":"deny-center","description":"Denies the center command without any pre-configured scope.","commands":{"allow":[],"deny":["center"]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}},"deny-create":{"identifier":"deny-create","description":"Denies the create command without any pre-configured scope.","commands":{"allow":[],"deny":["create"]}},"deny-current-monitor":{"identifier":"deny-current-monitor","description":"Denies the current_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["current_monitor"]}},"deny-cursor-position":{"identifier":"deny-cursor-position","description":"Denies the cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["cursor_position"]}},"deny-destroy":{"identifier":"deny-destroy","description":"Denies the destroy command without any pre-configured scope.","commands":{"allow":[],"deny":["destroy"]}},"deny-get-all-windows":{"identifier":"deny-get-all-windows","description":"Denies the get_all_windows command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_windows"]}},"deny-hide":{"identifier":"deny-hide","description":"Denies the hide command without any pre-configured scope.","commands":{"allow":[],"deny":["hide"]}},"deny-inner-position":{"identifier":"deny-inner-position","description":"Denies the inner_position command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_position"]}},"deny-inner-size":{"identifier":"deny-inner-size","description":"Denies the inner_size command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_size"]}},"deny-internal-toggle-maximize":{"identifier":"deny-internal-toggle-maximize","description":"Denies the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_maximize"]}},"deny-is-always-on-top":{"identifier":"deny-is-always-on-top","description":"Denies the is_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["is_always_on_top"]}},"deny-is-closable":{"identifier":"deny-is-closable","description":"Denies the is_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_closable"]}},"deny-is-decorated":{"identifier":"deny-is-decorated","description":"Denies the is_decorated command without any pre-configured scope.","commands":{"allow":[],"deny":["is_decorated"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-is-focused":{"identifier":"deny-is-focused","description":"Denies the is_focused command without any pre-configured scope.","commands":{"allow":[],"deny":["is_focused"]}},"deny-is-fullscreen":{"identifier":"deny-is-fullscreen","description":"Denies the is_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["is_fullscreen"]}},"deny-is-maximizable":{"identifier":"deny-is-maximizable","description":"Denies the is_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximizable"]}},"deny-is-maximized":{"identifier":"deny-is-maximized","description":"Denies the is_maximized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximized"]}},"deny-is-minimizable":{"identifier":"deny-is-minimizable","description":"Denies the is_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimizable"]}},"deny-is-minimized":{"identifier":"deny-is-minimized","description":"Denies the is_minimized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimized"]}},"deny-is-resizable":{"identifier":"deny-is-resizable","description":"Denies the is_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_resizable"]}},"deny-is-visible":{"identifier":"deny-is-visible","description":"Denies the is_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["is_visible"]}},"deny-maximize":{"identifier":"deny-maximize","description":"Denies the maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["maximize"]}},"deny-minimize":{"identifier":"deny-minimize","description":"Denies the minimize command without any pre-configured scope.","commands":{"allow":[],"deny":["minimize"]}},"deny-monitor-from-point":{"identifier":"deny-monitor-from-point","description":"Denies the monitor_from_point command without any pre-configured scope.","commands":{"allow":[],"deny":["monitor_from_point"]}},"deny-outer-position":{"identifier":"deny-outer-position","description":"Denies the outer_position command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_position"]}},"deny-outer-size":{"identifier":"deny-outer-size","description":"Denies the outer_size command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_size"]}},"deny-primary-monitor":{"identifier":"deny-primary-monitor","description":"Denies the primary_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["primary_monitor"]}},"deny-request-user-attention":{"identifier":"deny-request-user-attention","description":"Denies the request_user_attention command without any pre-configured scope.","commands":{"allow":[],"deny":["request_user_attention"]}},"deny-scale-factor":{"identifier":"deny-scale-factor","description":"Denies the scale_factor command without any pre-configured scope.","commands":{"allow":[],"deny":["scale_factor"]}},"deny-scene-identifier":{"identifier":"deny-scene-identifier","description":"Denies the scene_identifier command without any pre-configured scope.","commands":{"allow":[],"deny":["scene_identifier"]}},"deny-set-always-on-bottom":{"identifier":"deny-set-always-on-bottom","description":"Denies the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_bottom"]}},"deny-set-always-on-top":{"identifier":"deny-set-always-on-top","description":"Denies the set_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_top"]}},"deny-set-background-color":{"identifier":"deny-set-background-color","description":"Denies the set_background_color command without any pre-configured scope.","commands":{"allow":[],"deny":["set_background_color"]}},"deny-set-badge-count":{"identifier":"deny-set-badge-count","description":"Denies the set_badge_count command without any pre-configured scope.","commands":{"allow":[],"deny":["set_badge_count"]}},"deny-set-badge-label":{"identifier":"deny-set-badge-label","description":"Denies the set_badge_label command without any pre-configured scope.","commands":{"allow":[],"deny":["set_badge_label"]}},"deny-set-closable":{"identifier":"deny-set-closable","description":"Denies the set_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_closable"]}},"deny-set-content-protected":{"identifier":"deny-set-content-protected","description":"Denies the set_content_protected command without any pre-configured scope.","commands":{"allow":[],"deny":["set_content_protected"]}},"deny-set-cursor-grab":{"identifier":"deny-set-cursor-grab","description":"Denies the set_cursor_grab command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_grab"]}},"deny-set-cursor-icon":{"identifier":"deny-set-cursor-icon","description":"Denies the set_cursor_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_icon"]}},"deny-set-cursor-position":{"identifier":"deny-set-cursor-position","description":"Denies the set_cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_position"]}},"deny-set-cursor-visible":{"identifier":"deny-set-cursor-visible","description":"Denies the set_cursor_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_visible"]}},"deny-set-decorations":{"identifier":"deny-set-decorations","description":"Denies the set_decorations command without any pre-configured scope.","commands":{"allow":[],"deny":["set_decorations"]}},"deny-set-effects":{"identifier":"deny-set-effects","description":"Denies the set_effects command without any pre-configured scope.","commands":{"allow":[],"deny":["set_effects"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-focus":{"identifier":"deny-set-focus","description":"Denies the set_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focus"]}},"deny-set-focusable":{"identifier":"deny-set-focusable","description":"Denies the set_focusable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focusable"]}},"deny-set-fullscreen":{"identifier":"deny-set-fullscreen","description":"Denies the set_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_fullscreen"]}},"deny-set-fullscreen-on-monitor":{"identifier":"deny-set-fullscreen-on-monitor","description":"Denies the set_fullscreen_on_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["set_fullscreen_on_monitor"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-ignore-cursor-events":{"identifier":"deny-set-ignore-cursor-events","description":"Denies the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":[],"deny":["set_ignore_cursor_events"]}},"deny-set-max-size":{"identifier":"deny-set-max-size","description":"Denies the set_max_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_max_size"]}},"deny-set-maximizable":{"identifier":"deny-set-maximizable","description":"Denies the set_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_maximizable"]}},"deny-set-min-size":{"identifier":"deny-set-min-size","description":"Denies the set_min_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_min_size"]}},"deny-set-minimizable":{"identifier":"deny-set-minimizable","description":"Denies the set_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_minimizable"]}},"deny-set-overlay-icon":{"identifier":"deny-set-overlay-icon","description":"Denies the set_overlay_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_overlay_icon"]}},"deny-set-position":{"identifier":"deny-set-position","description":"Denies the set_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_position"]}},"deny-set-progress-bar":{"identifier":"deny-set-progress-bar","description":"Denies the set_progress_bar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_progress_bar"]}},"deny-set-resizable":{"identifier":"deny-set-resizable","description":"Denies the set_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_resizable"]}},"deny-set-shadow":{"identifier":"deny-set-shadow","description":"Denies the set_shadow command without any pre-configured scope.","commands":{"allow":[],"deny":["set_shadow"]}},"deny-set-simple-fullscreen":{"identifier":"deny-set-simple-fullscreen","description":"Denies the set_simple_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_simple_fullscreen"]}},"deny-set-size":{"identifier":"deny-set-size","description":"Denies the set_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size"]}},"deny-set-size-constraints":{"identifier":"deny-set-size-constraints","description":"Denies the set_size_constraints command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size_constraints"]}},"deny-set-skip-taskbar":{"identifier":"deny-set-skip-taskbar","description":"Denies the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_skip_taskbar"]}},"deny-set-theme":{"identifier":"deny-set-theme","description":"Denies the set_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_theme"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-title-bar-style":{"identifier":"deny-set-title-bar-style","description":"Denies the set_title_bar_style command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title_bar_style"]}},"deny-set-visible-on-all-workspaces":{"identifier":"deny-set-visible-on-all-workspaces","description":"Denies the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible_on_all_workspaces"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}},"deny-start-dragging":{"identifier":"deny-start-dragging","description":"Denies the start_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_dragging"]}},"deny-start-resize-dragging":{"identifier":"deny-start-resize-dragging","description":"Denies the start_resize_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_resize_dragging"]}},"deny-theme":{"identifier":"deny-theme","description":"Denies the theme command without any pre-configured scope.","commands":{"allow":[],"deny":["theme"]}},"deny-title":{"identifier":"deny-title","description":"Denies the title command without any pre-configured scope.","commands":{"allow":[],"deny":["title"]}},"deny-toggle-maximize":{"identifier":"deny-toggle-maximize","description":"Denies the toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["toggle_maximize"]}},"deny-unmaximize":{"identifier":"deny-unmaximize","description":"Denies the unmaximize command without any pre-configured scope.","commands":{"allow":[],"deny":["unmaximize"]}},"deny-unminimize":{"identifier":"deny-unminimize","description":"Denies the unminimize command without any pre-configured scope.","commands":{"allow":[],"deny":["unminimize"]}}},"permission_sets":{},"global_scope_schema":null},"dialog":{"default_permission":{"identifier":"default","description":"This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n","permissions":["allow-message","allow-save","allow-open"]},"permissions":{"allow-ask":{"identifier":"allow-ask","description":"Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)","commands":{"allow":["message"],"deny":[]}},"allow-confirm":{"identifier":"allow-confirm","description":"Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)","commands":{"allow":["message"],"deny":[]}},"allow-message":{"identifier":"allow-message","description":"Enables the message command without any pre-configured scope.","commands":{"allow":["message"],"deny":[]}},"allow-open":{"identifier":"allow-open","description":"Enables the open command without any pre-configured scope.","commands":{"allow":["open"],"deny":[]}},"allow-save":{"identifier":"allow-save","description":"Enables the save command without any pre-configured scope.","commands":{"allow":["save"],"deny":[]}},"deny-ask":{"identifier":"deny-ask","description":"Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)","commands":{"allow":[],"deny":["message"]}},"deny-confirm":{"identifier":"deny-confirm","description":"Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)","commands":{"allow":[],"deny":["message"]}},"deny-message":{"identifier":"deny-message","description":"Denies the message command without any pre-configured scope.","commands":{"allow":[],"deny":["message"]}},"deny-open":{"identifier":"deny-open","description":"Denies the open command without any pre-configured scope.","commands":{"allow":[],"deny":["open"]}},"deny-save":{"identifier":"deny-save","description":"Denies the save command without any pre-configured scope.","commands":{"allow":[],"deny":["save"]}}},"permission_sets":{},"global_scope_schema":null},"notification":{"default_permission":{"identifier":"default","description":"This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n","permissions":["allow-is-permission-granted","allow-request-permission","allow-notify","allow-register-action-types","allow-register-listener","allow-remove-listener","allow-cancel","allow-get-pending","allow-remove-active","allow-get-active","allow-check-permissions","allow-show","allow-batch","allow-list-channels","allow-delete-channel","allow-create-channel","allow-permission-state"]},"permissions":{"allow-batch":{"identifier":"allow-batch","description":"Enables the batch command without any pre-configured scope.","commands":{"allow":["batch"],"deny":[]}},"allow-cancel":{"identifier":"allow-cancel","description":"Enables the cancel command without any pre-configured scope.","commands":{"allow":["cancel"],"deny":[]}},"allow-check-permissions":{"identifier":"allow-check-permissions","description":"Enables the check_permissions command without any pre-configured scope.","commands":{"allow":["check_permissions"],"deny":[]}},"allow-create-channel":{"identifier":"allow-create-channel","description":"Enables the create_channel command without any pre-configured scope.","commands":{"allow":["create_channel"],"deny":[]}},"allow-delete-channel":{"identifier":"allow-delete-channel","description":"Enables the delete_channel command without any pre-configured scope.","commands":{"allow":["delete_channel"],"deny":[]}},"allow-get-active":{"identifier":"allow-get-active","description":"Enables the get_active command without any pre-configured scope.","commands":{"allow":["get_active"],"deny":[]}},"allow-get-pending":{"identifier":"allow-get-pending","description":"Enables the get_pending command without any pre-configured scope.","commands":{"allow":["get_pending"],"deny":[]}},"allow-is-permission-granted":{"identifier":"allow-is-permission-granted","description":"Enables the is_permission_granted command without any pre-configured scope.","commands":{"allow":["is_permission_granted"],"deny":[]}},"allow-list-channels":{"identifier":"allow-list-channels","description":"Enables the list_channels command without any pre-configured scope.","commands":{"allow":["list_channels"],"deny":[]}},"allow-notify":{"identifier":"allow-notify","description":"Enables the notify command without any pre-configured scope.","commands":{"allow":["notify"],"deny":[]}},"allow-permission-state":{"identifier":"allow-permission-state","description":"Enables the permission_state command without any pre-configured scope.","commands":{"allow":["permission_state"],"deny":[]}},"allow-register-action-types":{"identifier":"allow-register-action-types","description":"Enables the register_action_types command without any pre-configured scope.","commands":{"allow":["register_action_types"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-active":{"identifier":"allow-remove-active","description":"Enables the remove_active command without any pre-configured scope.","commands":{"allow":["remove_active"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-request-permission":{"identifier":"allow-request-permission","description":"Enables the request_permission command without any pre-configured scope.","commands":{"allow":["request_permission"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"deny-batch":{"identifier":"deny-batch","description":"Denies the batch command without any pre-configured scope.","commands":{"allow":[],"deny":["batch"]}},"deny-cancel":{"identifier":"deny-cancel","description":"Denies the cancel command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel"]}},"deny-check-permissions":{"identifier":"deny-check-permissions","description":"Denies the check_permissions command without any pre-configured scope.","commands":{"allow":[],"deny":["check_permissions"]}},"deny-create-channel":{"identifier":"deny-create-channel","description":"Denies the create_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["create_channel"]}},"deny-delete-channel":{"identifier":"deny-delete-channel","description":"Denies the delete_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["delete_channel"]}},"deny-get-active":{"identifier":"deny-get-active","description":"Denies the get_active command without any pre-configured scope.","commands":{"allow":[],"deny":["get_active"]}},"deny-get-pending":{"identifier":"deny-get-pending","description":"Denies the get_pending command without any pre-configured scope.","commands":{"allow":[],"deny":["get_pending"]}},"deny-is-permission-granted":{"identifier":"deny-is-permission-granted","description":"Denies the is_permission_granted command without any pre-configured scope.","commands":{"allow":[],"deny":["is_permission_granted"]}},"deny-list-channels":{"identifier":"deny-list-channels","description":"Denies the list_channels command without any pre-configured scope.","commands":{"allow":[],"deny":["list_channels"]}},"deny-notify":{"identifier":"deny-notify","description":"Denies the notify command without any pre-configured scope.","commands":{"allow":[],"deny":["notify"]}},"deny-permission-state":{"identifier":"deny-permission-state","description":"Denies the permission_state command without any pre-configured scope.","commands":{"allow":[],"deny":["permission_state"]}},"deny-register-action-types":{"identifier":"deny-register-action-types","description":"Denies the register_action_types command without any pre-configured scope.","commands":{"allow":[],"deny":["register_action_types"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-active":{"identifier":"deny-remove-active","description":"Denies the remove_active command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_active"]}},"deny-remove-listener":{"identifier":"deny-remove-listener","description":"Denies the remove_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_listener"]}},"deny-request-permission":{"identifier":"deny-request-permission","description":"Denies the request_permission command without any pre-configured scope.","commands":{"allow":[],"deny":["request_permission"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}}},"permission_sets":{},"global_scope_schema":null},"opener":{"default_permission":{"identifier":"default","description":"This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer","permissions":["allow-open-url","allow-reveal-item-in-dir","allow-default-urls"]},"permissions":{"allow-default-urls":{"identifier":"allow-default-urls","description":"This enables opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"url":"mailto:*"},{"url":"tel:*"},{"url":"http://*"},{"url":"https://*"}]}},"allow-open-path":{"identifier":"allow-open-path","description":"Enables the open_path command without any pre-configured scope.","commands":{"allow":["open_path"],"deny":[]}},"allow-open-url":{"identifier":"allow-open-url","description":"Enables the open_url command without any pre-configured scope.","commands":{"allow":["open_url"],"deny":[]}},"allow-reveal-item-in-dir":{"identifier":"allow-reveal-item-in-dir","description":"Enables the reveal_item_in_dir command without any pre-configured scope.","commands":{"allow":["reveal_item_in_dir"],"deny":[]}},"deny-open-path":{"identifier":"deny-open-path","description":"Denies the open_path command without any pre-configured scope.","commands":{"allow":[],"deny":["open_path"]}},"deny-open-url":{"identifier":"deny-open-url","description":"Denies the open_url command without any pre-configured scope.","commands":{"allow":[],"deny":["open_url"]}},"deny-reveal-item-in-dir":{"identifier":"deny-reveal-item-in-dir","description":"Denies the reveal_item_in_dir command without any pre-configured scope.","commands":{"allow":[],"deny":["reveal_item_in_dir"]}}},"permission_sets":{},"global_scope_schema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"properties":{"app":{"allOf":[{"$ref":"#/definitions/Application"}],"description":"An application to open this url with, for example: firefox."},"url":{"description":"A URL that can be opened by the webview when using the Opener APIs.\n\nWildcards can be used following the UNIX glob pattern.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"","type":"string"}},"required":["url"],"type":"object"},{"properties":{"app":{"allOf":[{"$ref":"#/definitions/Application"}],"description":"An application to open this path with, for example: xdg-open."},"path":{"description":"A path that can be opened by the webview when using the Opener APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.","type":"string"}},"required":["path"],"type":"object"}],"definitions":{"Application":{"anyOf":[{"description":"Open in default application.","type":"null"},{"description":"If true, allow open with any application.","type":"boolean"},{"description":"Allow specific application to open with.","type":"string"}],"description":"Opener scope application."}},"description":"Opener scope entry.","title":"OpenerScopeEntry"}},"process":{"default_permission":{"identifier":"default","description":"This permission set configures which\nprocess features are by default exposed.\n\n#### Granted Permissions\n\nThis enables to quit via `allow-exit` and restart via `allow-restart`\nthe application.\n","permissions":["allow-exit","allow-restart"]},"permissions":{"allow-exit":{"identifier":"allow-exit","description":"Enables the exit command without any pre-configured scope.","commands":{"allow":["exit"],"deny":[]}},"allow-restart":{"identifier":"allow-restart","description":"Enables the restart command without any pre-configured scope.","commands":{"allow":["restart"],"deny":[]}},"deny-exit":{"identifier":"deny-exit","description":"Denies the exit command without any pre-configured scope.","commands":{"allow":[],"deny":["exit"]}},"deny-restart":{"identifier":"deny-restart","description":"Denies the restart command without any pre-configured scope.","commands":{"allow":[],"deny":["restart"]}}},"permission_sets":{},"global_scope_schema":null},"updater":{"default_permission":{"identifier":"default","description":"This permission set configures which kind of\nupdater functions are exposed to the frontend.\n\n#### Granted Permissions\n\nThe full workflow from checking for updates to installing them\nis enabled.\n\n","permissions":["allow-check","allow-download","allow-install","allow-download-and-install"]},"permissions":{"allow-check":{"identifier":"allow-check","description":"Enables the check command without any pre-configured scope.","commands":{"allow":["check"],"deny":[]}},"allow-download":{"identifier":"allow-download","description":"Enables the download command without any pre-configured scope.","commands":{"allow":["download"],"deny":[]}},"allow-download-and-install":{"identifier":"allow-download-and-install","description":"Enables the download_and_install command without any pre-configured scope.","commands":{"allow":["download_and_install"],"deny":[]}},"allow-install":{"identifier":"allow-install","description":"Enables the install command without any pre-configured scope.","commands":{"allow":["install"],"deny":[]}},"deny-check":{"identifier":"deny-check","description":"Denies the check command without any pre-configured scope.","commands":{"allow":[],"deny":["check"]}},"deny-download":{"identifier":"deny-download","description":"Denies the download command without any pre-configured scope.","commands":{"allow":[],"deny":["download"]}},"deny-download-and-install":{"identifier":"deny-download-and-install","description":"Denies the download_and_install command without any pre-configured scope.","commands":{"allow":[],"deny":["download_and_install"]}},"deny-install":{"identifier":"deny-install","description":"Denies the install command without any pre-configured scope.","commands":{"allow":[],"deny":["install"]}}},"permission_sets":{},"global_scope_schema":null}}
\ No newline at end of file
+{"__app-acl__":{"default_permission":null,"permissions":{"allow-add-to-queue":{"identifier":"allow-add-to-queue","description":"Enables the add_to_queue command without any pre-configured scope.","commands":{"allow":["add_to_queue"],"deny":[]}},"allow-cancel-download":{"identifier":"allow-cancel-download","description":"Enables the cancel_download command without any pre-configured scope.","commands":{"allow":["cancel_download"],"deny":[]}},"allow-cancel-formats":{"identifier":"allow-cancel-formats","description":"Enables the cancel_formats command without any pre-configured scope.","commands":{"allow":["cancel_formats"],"deny":[]}},"allow-cancel-queue":{"identifier":"allow-cancel-queue","description":"Enables the cancel_queue command without any pre-configured scope.","commands":{"allow":["cancel_queue"],"deny":[]}},"allow-cancel-video-info":{"identifier":"allow-cancel-video-info","description":"Enables the cancel_video_info command without any pre-configured scope.","commands":{"allow":["cancel_video_info"],"deny":[]}},"allow-check-deno-installed":{"identifier":"allow-check-deno-installed","description":"Enables the check_deno_installed command without any pre-configured scope.","commands":{"allow":["check_deno_installed"],"deny":[]}},"allow-clear-download-activity":{"identifier":"allow-clear-download-activity","description":"Enables the clear_download_activity command without any pre-configured scope.","commands":{"allow":["clear_download_activity"],"deny":[]}},"allow-clear-finished-queue":{"identifier":"allow-clear-finished-queue","description":"Enables the clear_finished_queue command without any pre-configured scope.","commands":{"allow":["clear_finished_queue"],"deny":[]}},"allow-clear-queue":{"identifier":"allow-clear-queue","description":"Enables the clear_queue command without any pre-configured scope.","commands":{"allow":["clear_queue"],"deny":[]}},"allow-detect-gpu":{"identifier":"allow-detect-gpu","description":"Enables the detect_gpu command without any pre-configured scope.","commands":{"allow":["detect_gpu"],"deny":[]}},"allow-download-video":{"identifier":"allow-download-video","description":"Enables the download_video command without any pre-configured scope.","commands":{"allow":["download_video"],"deny":[]}},"allow-e2e-cancel-close-request":{"identifier":"allow-e2e-cancel-close-request","description":"Enables the e2e_cancel_close_request command without any pre-configured scope.","commands":{"allow":["e2e_cancel_close_request"],"deny":[]}},"allow-e2e-emit-stale-download-events":{"identifier":"allow-e2e-emit-stale-download-events","description":"Enables the e2e_emit_stale_download_events command without any pre-configured scope.","commands":{"allow":["e2e_emit_stale_download_events"],"deny":[]}},"allow-e2e-network-pipelining-probe":{"identifier":"allow-e2e-network-pipelining-probe","description":"Enables the e2e_network_pipelining_probe command without any pre-configured scope.","commands":{"allow":["e2e_network_pipelining_probe"],"deny":[]}},"allow-e2e-updater-install-probe":{"identifier":"allow-e2e-updater-install-probe","description":"Enables the e2e_updater_install_probe command without any pre-configured scope.","commands":{"allow":["e2e_updater_install_probe"],"deny":[]}},"allow-export-settings":{"identifier":"allow-export-settings","description":"Enables the export_settings command without any pre-configured scope.","commands":{"allow":["export_settings"],"deny":[]}},"allow-get-app-platform":{"identifier":"allow-get-app-platform","description":"Enables the get_app_platform command without any pre-configured scope.","commands":{"allow":["get_app_platform"],"deny":[]}},"allow-get-beta-updater-target":{"identifier":"allow-get-beta-updater-target","description":"Enables the get_beta_updater_target command without any pre-configured scope.","commands":{"allow":["get_beta_updater_target"],"deny":[]}},"allow-get-compact-updater-target":{"identifier":"allow-get-compact-updater-target","description":"Enables the get_compact_updater_target command without any pre-configured scope.","commands":{"allow":["get_compact_updater_target"],"deny":[]}},"allow-get-default-settings":{"identifier":"allow-get-default-settings","description":"Enables the get_default_settings command without any pre-configured scope.","commands":{"allow":["get_default_settings"],"deny":[]}},"allow-get-distribution-channel":{"identifier":"allow-get-distribution-channel","description":"Enables the get_distribution_channel command without any pre-configured scope.","commands":{"allow":["get_distribution_channel"],"deny":[]}},"allow-get-download-activity":{"identifier":"allow-get-download-activity","description":"Enables the get_download_activity command without any pre-configured scope.","commands":{"allow":["get_download_activity"],"deny":[]}},"allow-get-formats":{"identifier":"allow-get-formats","description":"Enables the get_formats command without any pre-configured scope.","commands":{"allow":["get_formats"],"deny":[]}},"allow-get-queue":{"identifier":"allow-get-queue","description":"Enables the get_queue command without any pre-configured scope.","commands":{"allow":["get_queue"],"deny":[]}},"allow-get-settings":{"identifier":"allow-get-settings","description":"Enables the get_settings command without any pre-configured scope.","commands":{"allow":["get_settings"],"deny":[]}},"allow-get-stats":{"identifier":"allow-get-stats","description":"Enables the get_stats command without any pre-configured scope.","commands":{"allow":["get_stats"],"deny":[]}},"allow-get-video-info":{"identifier":"allow-get-video-info","description":"Enables the get_video_info command without any pre-configured scope.","commands":{"allow":["get_video_info"],"deny":[]}},"allow-import-settings":{"identifier":"allow-import-settings","description":"Enables the import_settings command without any pre-configured scope.","commands":{"allow":["import_settings"],"deny":[]}},"allow-install-deno":{"identifier":"allow-install-deno","description":"Enables the install_deno command without any pre-configured scope.","commands":{"allow":["install_deno"],"deny":[]}},"allow-is-flatpak":{"identifier":"allow-is-flatpak","description":"Enables the is_flatpak command without any pre-configured scope.","commands":{"allow":["is_flatpak"],"deny":[]}},"allow-is-packaged":{"identifier":"allow-is-packaged","description":"Enables the is_packaged command without any pre-configured scope.","commands":{"allow":["is_packaged"],"deny":[]}},"allow-log-error":{"identifier":"allow-log-error","description":"Enables the log_error command without any pre-configured scope.","commands":{"allow":["log_error"],"deny":[]}},"allow-mark-main-window-ready":{"identifier":"allow-mark-main-window-ready","description":"Enables the mark_main_window_ready command without any pre-configured scope.","commands":{"allow":["mark_main_window_ready"],"deny":[]}},"allow-notify-settings-flushed":{"identifier":"allow-notify-settings-flushed","description":"Enables the notify_settings_flushed command without any pre-configured scope.","commands":{"allow":["notify_settings_flushed"],"deny":[]}},"allow-open-external":{"identifier":"allow-open-external","description":"Enables the open_external command without any pre-configured scope.","commands":{"allow":["open_external"],"deny":[]}},"allow-open-file-location":{"identifier":"allow-open-file-location","description":"Enables the open_file_location command without any pre-configured scope.","commands":{"allow":["open_file_location"],"deny":[]}},"allow-remove-from-queue":{"identifier":"allow-remove-from-queue","description":"Enables the remove_from_queue command without any pre-configured scope.","commands":{"allow":["remove_from_queue"],"deny":[]}},"allow-reorder-queue-item":{"identifier":"allow-reorder-queue-item","description":"Enables the reorder_queue_item command without any pre-configured scope.","commands":{"allow":["reorder_queue_item"],"deny":[]}},"allow-reset-settings":{"identifier":"allow-reset-settings","description":"Enables the reset_settings command without any pre-configured scope.","commands":{"allow":["reset_settings"],"deny":[]}},"allow-reset-stats":{"identifier":"allow-reset-stats","description":"Enables the reset_stats command without any pre-configured scope.","commands":{"allow":["reset_stats"],"deny":[]}},"allow-restart-app":{"identifier":"allow-restart-app","description":"Enables the restart_app command without any pre-configured scope.","commands":{"allow":["restart_app"],"deny":[]}},"allow-retry-queue-item":{"identifier":"allow-retry-queue-item","description":"Enables the retry_queue_item command without any pre-configured scope.","commands":{"allow":["retry_queue_item"],"deny":[]}},"allow-save-settings":{"identifier":"allow-save-settings","description":"Enables the save_settings command without any pre-configured scope.","commands":{"allow":["save_settings"],"deny":[]}},"allow-select-download-location":{"identifier":"allow-select-download-location","description":"Enables the select_download_location command without any pre-configured scope.","commands":{"allow":["select_download_location"],"deny":[]}},"allow-show-notification":{"identifier":"allow-show-notification","description":"Enables the show_notification command without any pre-configured scope.","commands":{"allow":["show_notification"],"deny":[]}},"allow-start-queue":{"identifier":"allow-start-queue","description":"Enables the start_queue command without any pre-configured scope.","commands":{"allow":["start_queue"],"deny":[]}},"deny-add-to-queue":{"identifier":"deny-add-to-queue","description":"Denies the add_to_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["add_to_queue"]}},"deny-cancel-download":{"identifier":"deny-cancel-download","description":"Denies the cancel_download command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel_download"]}},"deny-cancel-formats":{"identifier":"deny-cancel-formats","description":"Denies the cancel_formats command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel_formats"]}},"deny-cancel-queue":{"identifier":"deny-cancel-queue","description":"Denies the cancel_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel_queue"]}},"deny-cancel-video-info":{"identifier":"deny-cancel-video-info","description":"Denies the cancel_video_info command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel_video_info"]}},"deny-check-deno-installed":{"identifier":"deny-check-deno-installed","description":"Denies the check_deno_installed command without any pre-configured scope.","commands":{"allow":[],"deny":["check_deno_installed"]}},"deny-clear-download-activity":{"identifier":"deny-clear-download-activity","description":"Denies the clear_download_activity command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_download_activity"]}},"deny-clear-finished-queue":{"identifier":"deny-clear-finished-queue","description":"Denies the clear_finished_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_finished_queue"]}},"deny-clear-queue":{"identifier":"deny-clear-queue","description":"Denies the clear_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_queue"]}},"deny-detect-gpu":{"identifier":"deny-detect-gpu","description":"Denies the detect_gpu command without any pre-configured scope.","commands":{"allow":[],"deny":["detect_gpu"]}},"deny-download-video":{"identifier":"deny-download-video","description":"Denies the download_video command without any pre-configured scope.","commands":{"allow":[],"deny":["download_video"]}},"deny-e2e-cancel-close-request":{"identifier":"deny-e2e-cancel-close-request","description":"Denies the e2e_cancel_close_request command without any pre-configured scope.","commands":{"allow":[],"deny":["e2e_cancel_close_request"]}},"deny-e2e-emit-stale-download-events":{"identifier":"deny-e2e-emit-stale-download-events","description":"Denies the e2e_emit_stale_download_events command without any pre-configured scope.","commands":{"allow":[],"deny":["e2e_emit_stale_download_events"]}},"deny-e2e-network-pipelining-probe":{"identifier":"deny-e2e-network-pipelining-probe","description":"Denies the e2e_network_pipelining_probe command without any pre-configured scope.","commands":{"allow":[],"deny":["e2e_network_pipelining_probe"]}},"deny-e2e-updater-install-probe":{"identifier":"deny-e2e-updater-install-probe","description":"Denies the e2e_updater_install_probe command without any pre-configured scope.","commands":{"allow":[],"deny":["e2e_updater_install_probe"]}},"deny-export-settings":{"identifier":"deny-export-settings","description":"Denies the export_settings command without any pre-configured scope.","commands":{"allow":[],"deny":["export_settings"]}},"deny-get-app-platform":{"identifier":"deny-get-app-platform","description":"Denies the get_app_platform command without any pre-configured scope.","commands":{"allow":[],"deny":["get_app_platform"]}},"deny-get-beta-updater-target":{"identifier":"deny-get-beta-updater-target","description":"Denies the get_beta_updater_target command without any pre-configured scope.","commands":{"allow":[],"deny":["get_beta_updater_target"]}},"deny-get-compact-updater-target":{"identifier":"deny-get-compact-updater-target","description":"Denies the get_compact_updater_target command without any pre-configured scope.","commands":{"allow":[],"deny":["get_compact_updater_target"]}},"deny-get-default-settings":{"identifier":"deny-get-default-settings","description":"Denies the get_default_settings command without any pre-configured scope.","commands":{"allow":[],"deny":["get_default_settings"]}},"deny-get-distribution-channel":{"identifier":"deny-get-distribution-channel","description":"Denies the get_distribution_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["get_distribution_channel"]}},"deny-get-download-activity":{"identifier":"deny-get-download-activity","description":"Denies the get_download_activity command without any pre-configured scope.","commands":{"allow":[],"deny":["get_download_activity"]}},"deny-get-formats":{"identifier":"deny-get-formats","description":"Denies the get_formats command without any pre-configured scope.","commands":{"allow":[],"deny":["get_formats"]}},"deny-get-queue":{"identifier":"deny-get-queue","description":"Denies the get_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["get_queue"]}},"deny-get-settings":{"identifier":"deny-get-settings","description":"Denies the get_settings command without any pre-configured scope.","commands":{"allow":[],"deny":["get_settings"]}},"deny-get-stats":{"identifier":"deny-get-stats","description":"Denies the get_stats command without any pre-configured scope.","commands":{"allow":[],"deny":["get_stats"]}},"deny-get-video-info":{"identifier":"deny-get-video-info","description":"Denies the get_video_info command without any pre-configured scope.","commands":{"allow":[],"deny":["get_video_info"]}},"deny-import-settings":{"identifier":"deny-import-settings","description":"Denies the import_settings command without any pre-configured scope.","commands":{"allow":[],"deny":["import_settings"]}},"deny-install-deno":{"identifier":"deny-install-deno","description":"Denies the install_deno command without any pre-configured scope.","commands":{"allow":[],"deny":["install_deno"]}},"deny-is-flatpak":{"identifier":"deny-is-flatpak","description":"Denies the is_flatpak command without any pre-configured scope.","commands":{"allow":[],"deny":["is_flatpak"]}},"deny-is-packaged":{"identifier":"deny-is-packaged","description":"Denies the is_packaged command without any pre-configured scope.","commands":{"allow":[],"deny":["is_packaged"]}},"deny-log-error":{"identifier":"deny-log-error","description":"Denies the log_error command without any pre-configured scope.","commands":{"allow":[],"deny":["log_error"]}},"deny-mark-main-window-ready":{"identifier":"deny-mark-main-window-ready","description":"Denies the mark_main_window_ready command without any pre-configured scope.","commands":{"allow":[],"deny":["mark_main_window_ready"]}},"deny-notify-settings-flushed":{"identifier":"deny-notify-settings-flushed","description":"Denies the notify_settings_flushed command without any pre-configured scope.","commands":{"allow":[],"deny":["notify_settings_flushed"]}},"deny-open-external":{"identifier":"deny-open-external","description":"Denies the open_external command without any pre-configured scope.","commands":{"allow":[],"deny":["open_external"]}},"deny-open-file-location":{"identifier":"deny-open-file-location","description":"Denies the open_file_location command without any pre-configured scope.","commands":{"allow":[],"deny":["open_file_location"]}},"deny-remove-from-queue":{"identifier":"deny-remove-from-queue","description":"Denies the remove_from_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_from_queue"]}},"deny-reorder-queue-item":{"identifier":"deny-reorder-queue-item","description":"Denies the reorder_queue_item command without any pre-configured scope.","commands":{"allow":[],"deny":["reorder_queue_item"]}},"deny-reset-settings":{"identifier":"deny-reset-settings","description":"Denies the reset_settings command without any pre-configured scope.","commands":{"allow":[],"deny":["reset_settings"]}},"deny-reset-stats":{"identifier":"deny-reset-stats","description":"Denies the reset_stats command without any pre-configured scope.","commands":{"allow":[],"deny":["reset_stats"]}},"deny-restart-app":{"identifier":"deny-restart-app","description":"Denies the restart_app command without any pre-configured scope.","commands":{"allow":[],"deny":["restart_app"]}},"deny-retry-queue-item":{"identifier":"deny-retry-queue-item","description":"Denies the retry_queue_item command without any pre-configured scope.","commands":{"allow":[],"deny":["retry_queue_item"]}},"deny-save-settings":{"identifier":"deny-save-settings","description":"Denies the save_settings command without any pre-configured scope.","commands":{"allow":[],"deny":["save_settings"]}},"deny-select-download-location":{"identifier":"deny-select-download-location","description":"Denies the select_download_location command without any pre-configured scope.","commands":{"allow":[],"deny":["select_download_location"]}},"deny-show-notification":{"identifier":"deny-show-notification","description":"Denies the show_notification command without any pre-configured scope.","commands":{"allow":[],"deny":["show_notification"]}},"deny-start-queue":{"identifier":"deny-start-queue","description":"Denies the start_queue command without any pre-configured scope.","commands":{"allow":[],"deny":["start_queue"]}}},"permission_sets":{},"global_scope_schema":null},"core":{"default_permission":{"identifier":"default","description":"Default core plugins set.","permissions":["core:path:default","core:event:default","core:window:default","core:webview:default","core:app:default","core:image:default","core:resources:default","core:menu:default","core:tray:default"]},"permissions":{},"permission_sets":{},"global_scope_schema":null},"core:app":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-version","allow-name","allow-tauri-version","allow-identifier","allow-bundle-type","allow-register-listener","allow-remove-listener","allow-supports-multiple-windows"]},"permissions":{"allow-app-hide":{"identifier":"allow-app-hide","description":"Enables the app_hide command without any pre-configured scope.","commands":{"allow":["app_hide"],"deny":[]}},"allow-app-show":{"identifier":"allow-app-show","description":"Enables the app_show command without any pre-configured scope.","commands":{"allow":["app_show"],"deny":[]}},"allow-bundle-type":{"identifier":"allow-bundle-type","description":"Enables the bundle_type command without any pre-configured scope.","commands":{"allow":["bundle_type"],"deny":[]}},"allow-default-window-icon":{"identifier":"allow-default-window-icon","description":"Enables the default_window_icon command without any pre-configured scope.","commands":{"allow":["default_window_icon"],"deny":[]}},"allow-exit":{"identifier":"allow-exit","description":"Enables the exit command without any pre-configured scope.","commands":{"allow":["exit"],"deny":[]}},"allow-fetch-data-store-identifiers":{"identifier":"allow-fetch-data-store-identifiers","description":"Enables the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":["fetch_data_store_identifiers"],"deny":[]}},"allow-identifier":{"identifier":"allow-identifier","description":"Enables the identifier command without any pre-configured scope.","commands":{"allow":["identifier"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-data-store":{"identifier":"allow-remove-data-store","description":"Enables the remove_data_store command without any pre-configured scope.","commands":{"allow":["remove_data_store"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-set-app-theme":{"identifier":"allow-set-app-theme","description":"Enables the set_app_theme command without any pre-configured scope.","commands":{"allow":["set_app_theme"],"deny":[]}},"allow-set-dock-visibility":{"identifier":"allow-set-dock-visibility","description":"Enables the set_dock_visibility command without any pre-configured scope.","commands":{"allow":["set_dock_visibility"],"deny":[]}},"allow-supports-multiple-windows":{"identifier":"allow-supports-multiple-windows","description":"Enables the supports_multiple_windows command without any pre-configured scope.","commands":{"allow":["supports_multiple_windows"],"deny":[]}},"allow-tauri-version":{"identifier":"allow-tauri-version","description":"Enables the tauri_version command without any pre-configured scope.","commands":{"allow":["tauri_version"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-app-hide":{"identifier":"deny-app-hide","description":"Denies the app_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["app_hide"]}},"deny-app-show":{"identifier":"deny-app-show","description":"Denies the app_show command without any pre-configured scope.","commands":{"allow":[],"deny":["app_show"]}},"deny-bundle-type":{"identifier":"deny-bundle-type","description":"Denies the bundle_type command without any pre-configured scope.","commands":{"allow":[],"deny":["bundle_type"]}},"deny-default-window-icon":{"identifier":"deny-default-window-icon","description":"Denies the default_window_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["default_window_icon"]}},"deny-exit":{"identifier":"deny-exit","description":"Denies the exit command without any pre-configured scope.","commands":{"allow":[],"deny":["exit"]}},"deny-fetch-data-store-identifiers":{"identifier":"deny-fetch-data-store-identifiers","description":"Denies the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch_data_store_identifiers"]}},"deny-identifier":{"identifier":"deny-identifier","description":"Denies the identifier command without any pre-configured scope.","commands":{"allow":[],"deny":["identifier"]}},"deny-name":{"identifier":"deny-name","description":"Denies the name command without any pre-configured scope.","commands":{"allow":[],"deny":["name"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-data-store":{"identifier":"deny-remove-data-store","description":"Denies the remove_data_store command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_data_store"]}},"deny-remove-listener":{"identifier":"deny-remove-listener","description":"Denies the remove_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_listener"]}},"deny-set-app-theme":{"identifier":"deny-set-app-theme","description":"Denies the set_app_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_app_theme"]}},"deny-set-dock-visibility":{"identifier":"deny-set-dock-visibility","description":"Denies the set_dock_visibility command without any pre-configured scope.","commands":{"allow":[],"deny":["set_dock_visibility"]}},"deny-supports-multiple-windows":{"identifier":"deny-supports-multiple-windows","description":"Denies the supports_multiple_windows command without any pre-configured scope.","commands":{"allow":[],"deny":["supports_multiple_windows"]}},"deny-tauri-version":{"identifier":"deny-tauri-version","description":"Denies the tauri_version command without any pre-configured scope.","commands":{"allow":[],"deny":["tauri_version"]}},"deny-version":{"identifier":"deny-version","description":"Denies the version command without any pre-configured scope.","commands":{"allow":[],"deny":["version"]}}},"permission_sets":{},"global_scope_schema":null},"core:event":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-listen","allow-unlisten","allow-emit","allow-emit-to"]},"permissions":{"allow-emit":{"identifier":"allow-emit","description":"Enables the emit command without any pre-configured scope.","commands":{"allow":["emit"],"deny":[]}},"allow-emit-to":{"identifier":"allow-emit-to","description":"Enables the emit_to command without any pre-configured scope.","commands":{"allow":["emit_to"],"deny":[]}},"allow-listen":{"identifier":"allow-listen","description":"Enables the listen command without any pre-configured scope.","commands":{"allow":["listen"],"deny":[]}},"allow-unlisten":{"identifier":"allow-unlisten","description":"Enables the unlisten command without any pre-configured scope.","commands":{"allow":["unlisten"],"deny":[]}},"deny-emit":{"identifier":"deny-emit","description":"Denies the emit command without any pre-configured scope.","commands":{"allow":[],"deny":["emit"]}},"deny-emit-to":{"identifier":"deny-emit-to","description":"Denies the emit_to command without any pre-configured scope.","commands":{"allow":[],"deny":["emit_to"]}},"deny-listen":{"identifier":"deny-listen","description":"Denies the listen command without any pre-configured scope.","commands":{"allow":[],"deny":["listen"]}},"deny-unlisten":{"identifier":"deny-unlisten","description":"Denies the unlisten command without any pre-configured scope.","commands":{"allow":[],"deny":["unlisten"]}}},"permission_sets":{},"global_scope_schema":null},"core:image":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-from-bytes","allow-from-path","allow-rgba","allow-size"]},"permissions":{"allow-from-bytes":{"identifier":"allow-from-bytes","description":"Enables the from_bytes command without any pre-configured scope.","commands":{"allow":["from_bytes"],"deny":[]}},"allow-from-path":{"identifier":"allow-from-path","description":"Enables the from_path command without any pre-configured scope.","commands":{"allow":["from_path"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-rgba":{"identifier":"allow-rgba","description":"Enables the rgba command without any pre-configured scope.","commands":{"allow":["rgba"],"deny":[]}},"allow-size":{"identifier":"allow-size","description":"Enables the size command without any pre-configured scope.","commands":{"allow":["size"],"deny":[]}},"deny-from-bytes":{"identifier":"deny-from-bytes","description":"Denies the from_bytes command without any pre-configured scope.","commands":{"allow":[],"deny":["from_bytes"]}},"deny-from-path":{"identifier":"deny-from-path","description":"Denies the from_path command without any pre-configured scope.","commands":{"allow":[],"deny":["from_path"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-rgba":{"identifier":"deny-rgba","description":"Denies the rgba command without any pre-configured scope.","commands":{"allow":[],"deny":["rgba"]}},"deny-size":{"identifier":"deny-size","description":"Denies the size command without any pre-configured scope.","commands":{"allow":[],"deny":["size"]}}},"permission_sets":{},"global_scope_schema":null},"core:menu":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-append","allow-prepend","allow-insert","allow-remove","allow-remove-at","allow-items","allow-get","allow-popup","allow-create-default","allow-set-as-app-menu","allow-set-as-window-menu","allow-text","allow-set-text","allow-is-enabled","allow-set-enabled","allow-set-accelerator","allow-set-as-windows-menu-for-nsapp","allow-set-as-help-menu-for-nsapp","allow-is-checked","allow-set-checked","allow-set-icon"]},"permissions":{"allow-append":{"identifier":"allow-append","description":"Enables the append command without any pre-configured scope.","commands":{"allow":["append"],"deny":[]}},"allow-create-default":{"identifier":"allow-create-default","description":"Enables the create_default command without any pre-configured scope.","commands":{"allow":["create_default"],"deny":[]}},"allow-get":{"identifier":"allow-get","description":"Enables the get command without any pre-configured scope.","commands":{"allow":["get"],"deny":[]}},"allow-insert":{"identifier":"allow-insert","description":"Enables the insert command without any pre-configured scope.","commands":{"allow":["insert"],"deny":[]}},"allow-is-checked":{"identifier":"allow-is-checked","description":"Enables the is_checked command without any pre-configured scope.","commands":{"allow":["is_checked"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-items":{"identifier":"allow-items","description":"Enables the items command without any pre-configured scope.","commands":{"allow":["items"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-popup":{"identifier":"allow-popup","description":"Enables the popup command without any pre-configured scope.","commands":{"allow":["popup"],"deny":[]}},"allow-prepend":{"identifier":"allow-prepend","description":"Enables the prepend command without any pre-configured scope.","commands":{"allow":["prepend"],"deny":[]}},"allow-remove":{"identifier":"allow-remove","description":"Enables the remove command without any pre-configured scope.","commands":{"allow":["remove"],"deny":[]}},"allow-remove-at":{"identifier":"allow-remove-at","description":"Enables the remove_at command without any pre-configured scope.","commands":{"allow":["remove_at"],"deny":[]}},"allow-set-accelerator":{"identifier":"allow-set-accelerator","description":"Enables the set_accelerator command without any pre-configured scope.","commands":{"allow":["set_accelerator"],"deny":[]}},"allow-set-as-app-menu":{"identifier":"allow-set-as-app-menu","description":"Enables the set_as_app_menu command without any pre-configured scope.","commands":{"allow":["set_as_app_menu"],"deny":[]}},"allow-set-as-help-menu-for-nsapp":{"identifier":"allow-set-as-help-menu-for-nsapp","description":"Enables the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_help_menu_for_nsapp"],"deny":[]}},"allow-set-as-window-menu":{"identifier":"allow-set-as-window-menu","description":"Enables the set_as_window_menu command without any pre-configured scope.","commands":{"allow":["set_as_window_menu"],"deny":[]}},"allow-set-as-windows-menu-for-nsapp":{"identifier":"allow-set-as-windows-menu-for-nsapp","description":"Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":["set_as_windows_menu_for_nsapp"],"deny":[]}},"allow-set-checked":{"identifier":"allow-set-checked","description":"Enables the set_checked command without any pre-configured scope.","commands":{"allow":["set_checked"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-text":{"identifier":"allow-set-text","description":"Enables the set_text command without any pre-configured scope.","commands":{"allow":["set_text"],"deny":[]}},"allow-text":{"identifier":"allow-text","description":"Enables the text command without any pre-configured scope.","commands":{"allow":["text"],"deny":[]}},"deny-append":{"identifier":"deny-append","description":"Denies the append command without any pre-configured scope.","commands":{"allow":[],"deny":["append"]}},"deny-create-default":{"identifier":"deny-create-default","description":"Denies the create_default command without any pre-configured scope.","commands":{"allow":[],"deny":["create_default"]}},"deny-get":{"identifier":"deny-get","description":"Denies the get command without any pre-configured scope.","commands":{"allow":[],"deny":["get"]}},"deny-insert":{"identifier":"deny-insert","description":"Denies the insert command without any pre-configured scope.","commands":{"allow":[],"deny":["insert"]}},"deny-is-checked":{"identifier":"deny-is-checked","description":"Denies the is_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["is_checked"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-items":{"identifier":"deny-items","description":"Denies the items command without any pre-configured scope.","commands":{"allow":[],"deny":["items"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-popup":{"identifier":"deny-popup","description":"Denies the popup command without any pre-configured scope.","commands":{"allow":[],"deny":["popup"]}},"deny-prepend":{"identifier":"deny-prepend","description":"Denies the prepend command without any pre-configured scope.","commands":{"allow":[],"deny":["prepend"]}},"deny-remove":{"identifier":"deny-remove","description":"Denies the remove command without any pre-configured scope.","commands":{"allow":[],"deny":["remove"]}},"deny-remove-at":{"identifier":"deny-remove-at","description":"Denies the remove_at command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_at"]}},"deny-set-accelerator":{"identifier":"deny-set-accelerator","description":"Denies the set_accelerator command without any pre-configured scope.","commands":{"allow":[],"deny":["set_accelerator"]}},"deny-set-as-app-menu":{"identifier":"deny-set-as-app-menu","description":"Denies the set_as_app_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_app_menu"]}},"deny-set-as-help-menu-for-nsapp":{"identifier":"deny-set-as-help-menu-for-nsapp","description":"Denies the set_as_help_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_help_menu_for_nsapp"]}},"deny-set-as-window-menu":{"identifier":"deny-set-as-window-menu","description":"Denies the set_as_window_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_window_menu"]}},"deny-set-as-windows-menu-for-nsapp":{"identifier":"deny-set-as-windows-menu-for-nsapp","description":"Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope.","commands":{"allow":[],"deny":["set_as_windows_menu_for_nsapp"]}},"deny-set-checked":{"identifier":"deny-set-checked","description":"Denies the set_checked command without any pre-configured scope.","commands":{"allow":[],"deny":["set_checked"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-text":{"identifier":"deny-set-text","description":"Denies the set_text command without any pre-configured scope.","commands":{"allow":[],"deny":["set_text"]}},"deny-text":{"identifier":"deny-text","description":"Denies the text command without any pre-configured scope.","commands":{"allow":[],"deny":["text"]}}},"permission_sets":{},"global_scope_schema":null},"core:path":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-resolve-directory","allow-resolve","allow-normalize","allow-join","allow-dirname","allow-extname","allow-basename","allow-is-absolute"]},"permissions":{"allow-basename":{"identifier":"allow-basename","description":"Enables the basename command without any pre-configured scope.","commands":{"allow":["basename"],"deny":[]}},"allow-dirname":{"identifier":"allow-dirname","description":"Enables the dirname command without any pre-configured scope.","commands":{"allow":["dirname"],"deny":[]}},"allow-extname":{"identifier":"allow-extname","description":"Enables the extname command without any pre-configured scope.","commands":{"allow":["extname"],"deny":[]}},"allow-is-absolute":{"identifier":"allow-is-absolute","description":"Enables the is_absolute command without any pre-configured scope.","commands":{"allow":["is_absolute"],"deny":[]}},"allow-join":{"identifier":"allow-join","description":"Enables the join command without any pre-configured scope.","commands":{"allow":["join"],"deny":[]}},"allow-normalize":{"identifier":"allow-normalize","description":"Enables the normalize command without any pre-configured scope.","commands":{"allow":["normalize"],"deny":[]}},"allow-resolve":{"identifier":"allow-resolve","description":"Enables the resolve command without any pre-configured scope.","commands":{"allow":["resolve"],"deny":[]}},"allow-resolve-directory":{"identifier":"allow-resolve-directory","description":"Enables the resolve_directory command without any pre-configured scope.","commands":{"allow":["resolve_directory"],"deny":[]}},"deny-basename":{"identifier":"deny-basename","description":"Denies the basename command without any pre-configured scope.","commands":{"allow":[],"deny":["basename"]}},"deny-dirname":{"identifier":"deny-dirname","description":"Denies the dirname command without any pre-configured scope.","commands":{"allow":[],"deny":["dirname"]}},"deny-extname":{"identifier":"deny-extname","description":"Denies the extname command without any pre-configured scope.","commands":{"allow":[],"deny":["extname"]}},"deny-is-absolute":{"identifier":"deny-is-absolute","description":"Denies the is_absolute command without any pre-configured scope.","commands":{"allow":[],"deny":["is_absolute"]}},"deny-join":{"identifier":"deny-join","description":"Denies the join command without any pre-configured scope.","commands":{"allow":[],"deny":["join"]}},"deny-normalize":{"identifier":"deny-normalize","description":"Denies the normalize command without any pre-configured scope.","commands":{"allow":[],"deny":["normalize"]}},"deny-resolve":{"identifier":"deny-resolve","description":"Denies the resolve command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve"]}},"deny-resolve-directory":{"identifier":"deny-resolve-directory","description":"Denies the resolve_directory command without any pre-configured scope.","commands":{"allow":[],"deny":["resolve_directory"]}}},"permission_sets":{},"global_scope_schema":null},"core:resources":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-close"]},"permissions":{"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}}},"permission_sets":{},"global_scope_schema":null},"core:tray":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin, which enables all commands.","permissions":["allow-new","allow-get-by-id","allow-remove-by-id","allow-set-icon","allow-set-menu","allow-set-tooltip","allow-set-title","allow-set-visible","allow-set-temp-dir-path","allow-set-icon-as-template","allow-set-icon-with-as-template","allow-set-show-menu-on-left-click"]},"permissions":{"allow-get-by-id":{"identifier":"allow-get-by-id","description":"Enables the get_by_id command without any pre-configured scope.","commands":{"allow":["get_by_id"],"deny":[]}},"allow-new":{"identifier":"allow-new","description":"Enables the new command without any pre-configured scope.","commands":{"allow":["new"],"deny":[]}},"allow-remove-by-id":{"identifier":"allow-remove-by-id","description":"Enables the remove_by_id command without any pre-configured scope.","commands":{"allow":["remove_by_id"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-icon-as-template":{"identifier":"allow-set-icon-as-template","description":"Enables the set_icon_as_template command without any pre-configured scope.","commands":{"allow":["set_icon_as_template"],"deny":[]}},"allow-set-icon-with-as-template":{"identifier":"allow-set-icon-with-as-template","description":"Enables the set_icon_with_as_template command without any pre-configured scope.","commands":{"allow":["set_icon_with_as_template"],"deny":[]}},"allow-set-menu":{"identifier":"allow-set-menu","description":"Enables the set_menu command without any pre-configured scope.","commands":{"allow":["set_menu"],"deny":[]}},"allow-set-show-menu-on-left-click":{"identifier":"allow-set-show-menu-on-left-click","description":"Enables the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":["set_show_menu_on_left_click"],"deny":[]}},"allow-set-temp-dir-path":{"identifier":"allow-set-temp-dir-path","description":"Enables the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":["set_temp_dir_path"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-tooltip":{"identifier":"allow-set-tooltip","description":"Enables the set_tooltip command without any pre-configured scope.","commands":{"allow":["set_tooltip"],"deny":[]}},"allow-set-visible":{"identifier":"allow-set-visible","description":"Enables the set_visible command without any pre-configured scope.","commands":{"allow":["set_visible"],"deny":[]}},"deny-get-by-id":{"identifier":"deny-get-by-id","description":"Denies the get_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["get_by_id"]}},"deny-new":{"identifier":"deny-new","description":"Denies the new command without any pre-configured scope.","commands":{"allow":[],"deny":["new"]}},"deny-remove-by-id":{"identifier":"deny-remove-by-id","description":"Denies the remove_by_id command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_by_id"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-icon-as-template":{"identifier":"deny-set-icon-as-template","description":"Denies the set_icon_as_template command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon_as_template"]}},"deny-set-icon-with-as-template":{"identifier":"deny-set-icon-with-as-template","description":"Denies the set_icon_with_as_template command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon_with_as_template"]}},"deny-set-menu":{"identifier":"deny-set-menu","description":"Denies the set_menu command without any pre-configured scope.","commands":{"allow":[],"deny":["set_menu"]}},"deny-set-show-menu-on-left-click":{"identifier":"deny-set-show-menu-on-left-click","description":"Denies the set_show_menu_on_left_click command without any pre-configured scope.","commands":{"allow":[],"deny":["set_show_menu_on_left_click"]}},"deny-set-temp-dir-path":{"identifier":"deny-set-temp-dir-path","description":"Denies the set_temp_dir_path command without any pre-configured scope.","commands":{"allow":[],"deny":["set_temp_dir_path"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-tooltip":{"identifier":"deny-set-tooltip","description":"Denies the set_tooltip command without any pre-configured scope.","commands":{"allow":[],"deny":["set_tooltip"]}},"deny-set-visible":{"identifier":"deny-set-visible","description":"Denies the set_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible"]}}},"permission_sets":{},"global_scope_schema":null},"core:webview":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-webviews","allow-webview-position","allow-webview-size","allow-internal-toggle-devtools"]},"permissions":{"allow-clear-all-browsing-data":{"identifier":"allow-clear-all-browsing-data","description":"Enables the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":["clear_all_browsing_data"],"deny":[]}},"allow-create-webview":{"identifier":"allow-create-webview","description":"Enables the create_webview command without any pre-configured scope.","commands":{"allow":["create_webview"],"deny":[]}},"allow-create-webview-window":{"identifier":"allow-create-webview-window","description":"Enables the create_webview_window command without any pre-configured scope.","commands":{"allow":["create_webview_window"],"deny":[]}},"allow-get-all-webviews":{"identifier":"allow-get-all-webviews","description":"Enables the get_all_webviews command without any pre-configured scope.","commands":{"allow":["get_all_webviews"],"deny":[]}},"allow-internal-toggle-devtools":{"identifier":"allow-internal-toggle-devtools","description":"Enables the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":["internal_toggle_devtools"],"deny":[]}},"allow-print":{"identifier":"allow-print","description":"Enables the print command without any pre-configured scope.","commands":{"allow":["print"],"deny":[]}},"allow-reparent":{"identifier":"allow-reparent","description":"Enables the reparent command without any pre-configured scope.","commands":{"allow":["reparent"],"deny":[]}},"allow-set-webview-auto-resize":{"identifier":"allow-set-webview-auto-resize","description":"Enables the set_webview_auto_resize command without any pre-configured scope.","commands":{"allow":["set_webview_auto_resize"],"deny":[]}},"allow-set-webview-background-color":{"identifier":"allow-set-webview-background-color","description":"Enables the set_webview_background_color command without any pre-configured scope.","commands":{"allow":["set_webview_background_color"],"deny":[]}},"allow-set-webview-focus":{"identifier":"allow-set-webview-focus","description":"Enables the set_webview_focus command without any pre-configured scope.","commands":{"allow":["set_webview_focus"],"deny":[]}},"allow-set-webview-position":{"identifier":"allow-set-webview-position","description":"Enables the set_webview_position command without any pre-configured scope.","commands":{"allow":["set_webview_position"],"deny":[]}},"allow-set-webview-size":{"identifier":"allow-set-webview-size","description":"Enables the set_webview_size command without any pre-configured scope.","commands":{"allow":["set_webview_size"],"deny":[]}},"allow-set-webview-zoom":{"identifier":"allow-set-webview-zoom","description":"Enables the set_webview_zoom command without any pre-configured scope.","commands":{"allow":["set_webview_zoom"],"deny":[]}},"allow-webview-close":{"identifier":"allow-webview-close","description":"Enables the webview_close command without any pre-configured scope.","commands":{"allow":["webview_close"],"deny":[]}},"allow-webview-hide":{"identifier":"allow-webview-hide","description":"Enables the webview_hide command without any pre-configured scope.","commands":{"allow":["webview_hide"],"deny":[]}},"allow-webview-position":{"identifier":"allow-webview-position","description":"Enables the webview_position command without any pre-configured scope.","commands":{"allow":["webview_position"],"deny":[]}},"allow-webview-show":{"identifier":"allow-webview-show","description":"Enables the webview_show command without any pre-configured scope.","commands":{"allow":["webview_show"],"deny":[]}},"allow-webview-size":{"identifier":"allow-webview-size","description":"Enables the webview_size command without any pre-configured scope.","commands":{"allow":["webview_size"],"deny":[]}},"deny-clear-all-browsing-data":{"identifier":"deny-clear-all-browsing-data","description":"Denies the clear_all_browsing_data command without any pre-configured scope.","commands":{"allow":[],"deny":["clear_all_browsing_data"]}},"deny-create-webview":{"identifier":"deny-create-webview","description":"Denies the create_webview command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview"]}},"deny-create-webview-window":{"identifier":"deny-create-webview-window","description":"Denies the create_webview_window command without any pre-configured scope.","commands":{"allow":[],"deny":["create_webview_window"]}},"deny-get-all-webviews":{"identifier":"deny-get-all-webviews","description":"Denies the get_all_webviews command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_webviews"]}},"deny-internal-toggle-devtools":{"identifier":"deny-internal-toggle-devtools","description":"Denies the internal_toggle_devtools command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_devtools"]}},"deny-print":{"identifier":"deny-print","description":"Denies the print command without any pre-configured scope.","commands":{"allow":[],"deny":["print"]}},"deny-reparent":{"identifier":"deny-reparent","description":"Denies the reparent command without any pre-configured scope.","commands":{"allow":[],"deny":["reparent"]}},"deny-set-webview-auto-resize":{"identifier":"deny-set-webview-auto-resize","description":"Denies the set_webview_auto_resize command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_auto_resize"]}},"deny-set-webview-background-color":{"identifier":"deny-set-webview-background-color","description":"Denies the set_webview_background_color command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_background_color"]}},"deny-set-webview-focus":{"identifier":"deny-set-webview-focus","description":"Denies the set_webview_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_focus"]}},"deny-set-webview-position":{"identifier":"deny-set-webview-position","description":"Denies the set_webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_position"]}},"deny-set-webview-size":{"identifier":"deny-set-webview-size","description":"Denies the set_webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_size"]}},"deny-set-webview-zoom":{"identifier":"deny-set-webview-zoom","description":"Denies the set_webview_zoom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_webview_zoom"]}},"deny-webview-close":{"identifier":"deny-webview-close","description":"Denies the webview_close command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_close"]}},"deny-webview-hide":{"identifier":"deny-webview-hide","description":"Denies the webview_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_hide"]}},"deny-webview-position":{"identifier":"deny-webview-position","description":"Denies the webview_position command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_position"]}},"deny-webview-show":{"identifier":"deny-webview-show","description":"Denies the webview_show command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_show"]}},"deny-webview-size":{"identifier":"deny-webview-size","description":"Denies the webview_size command without any pre-configured scope.","commands":{"allow":[],"deny":["webview_size"]}}},"permission_sets":{},"global_scope_schema":null},"core:window":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-get-all-windows","allow-scale-factor","allow-inner-position","allow-outer-position","allow-inner-size","allow-outer-size","allow-is-fullscreen","allow-is-minimized","allow-is-maximized","allow-is-focused","allow-is-decorated","allow-is-resizable","allow-is-maximizable","allow-is-minimizable","allow-is-closable","allow-is-visible","allow-is-enabled","allow-title","allow-current-monitor","allow-primary-monitor","allow-monitor-from-point","allow-available-monitors","allow-cursor-position","allow-theme","allow-is-always-on-top","allow-activity-name","allow-scene-identifier","allow-internal-toggle-maximize"]},"permissions":{"allow-activity-name":{"identifier":"allow-activity-name","description":"Enables the activity_name command without any pre-configured scope.","commands":{"allow":["activity_name"],"deny":[]}},"allow-available-monitors":{"identifier":"allow-available-monitors","description":"Enables the available_monitors command without any pre-configured scope.","commands":{"allow":["available_monitors"],"deny":[]}},"allow-center":{"identifier":"allow-center","description":"Enables the center command without any pre-configured scope.","commands":{"allow":["center"],"deny":[]}},"allow-close":{"identifier":"allow-close","description":"Enables the close command without any pre-configured scope.","commands":{"allow":["close"],"deny":[]}},"allow-create":{"identifier":"allow-create","description":"Enables the create command without any pre-configured scope.","commands":{"allow":["create"],"deny":[]}},"allow-current-monitor":{"identifier":"allow-current-monitor","description":"Enables the current_monitor command without any pre-configured scope.","commands":{"allow":["current_monitor"],"deny":[]}},"allow-cursor-position":{"identifier":"allow-cursor-position","description":"Enables the cursor_position command without any pre-configured scope.","commands":{"allow":["cursor_position"],"deny":[]}},"allow-destroy":{"identifier":"allow-destroy","description":"Enables the destroy command without any pre-configured scope.","commands":{"allow":["destroy"],"deny":[]}},"allow-get-all-windows":{"identifier":"allow-get-all-windows","description":"Enables the get_all_windows command without any pre-configured scope.","commands":{"allow":["get_all_windows"],"deny":[]}},"allow-hide":{"identifier":"allow-hide","description":"Enables the hide command without any pre-configured scope.","commands":{"allow":["hide"],"deny":[]}},"allow-inner-position":{"identifier":"allow-inner-position","description":"Enables the inner_position command without any pre-configured scope.","commands":{"allow":["inner_position"],"deny":[]}},"allow-inner-size":{"identifier":"allow-inner-size","description":"Enables the inner_size command without any pre-configured scope.","commands":{"allow":["inner_size"],"deny":[]}},"allow-internal-toggle-maximize":{"identifier":"allow-internal-toggle-maximize","description":"Enables the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":["internal_toggle_maximize"],"deny":[]}},"allow-is-always-on-top":{"identifier":"allow-is-always-on-top","description":"Enables the is_always_on_top command without any pre-configured scope.","commands":{"allow":["is_always_on_top"],"deny":[]}},"allow-is-closable":{"identifier":"allow-is-closable","description":"Enables the is_closable command without any pre-configured scope.","commands":{"allow":["is_closable"],"deny":[]}},"allow-is-decorated":{"identifier":"allow-is-decorated","description":"Enables the is_decorated command without any pre-configured scope.","commands":{"allow":["is_decorated"],"deny":[]}},"allow-is-enabled":{"identifier":"allow-is-enabled","description":"Enables the is_enabled command without any pre-configured scope.","commands":{"allow":["is_enabled"],"deny":[]}},"allow-is-focused":{"identifier":"allow-is-focused","description":"Enables the is_focused command without any pre-configured scope.","commands":{"allow":["is_focused"],"deny":[]}},"allow-is-fullscreen":{"identifier":"allow-is-fullscreen","description":"Enables the is_fullscreen command without any pre-configured scope.","commands":{"allow":["is_fullscreen"],"deny":[]}},"allow-is-maximizable":{"identifier":"allow-is-maximizable","description":"Enables the is_maximizable command without any pre-configured scope.","commands":{"allow":["is_maximizable"],"deny":[]}},"allow-is-maximized":{"identifier":"allow-is-maximized","description":"Enables the is_maximized command without any pre-configured scope.","commands":{"allow":["is_maximized"],"deny":[]}},"allow-is-minimizable":{"identifier":"allow-is-minimizable","description":"Enables the is_minimizable command without any pre-configured scope.","commands":{"allow":["is_minimizable"],"deny":[]}},"allow-is-minimized":{"identifier":"allow-is-minimized","description":"Enables the is_minimized command without any pre-configured scope.","commands":{"allow":["is_minimized"],"deny":[]}},"allow-is-resizable":{"identifier":"allow-is-resizable","description":"Enables the is_resizable command without any pre-configured scope.","commands":{"allow":["is_resizable"],"deny":[]}},"allow-is-visible":{"identifier":"allow-is-visible","description":"Enables the is_visible command without any pre-configured scope.","commands":{"allow":["is_visible"],"deny":[]}},"allow-maximize":{"identifier":"allow-maximize","description":"Enables the maximize command without any pre-configured scope.","commands":{"allow":["maximize"],"deny":[]}},"allow-minimize":{"identifier":"allow-minimize","description":"Enables the minimize command without any pre-configured scope.","commands":{"allow":["minimize"],"deny":[]}},"allow-monitor-from-point":{"identifier":"allow-monitor-from-point","description":"Enables the monitor_from_point command without any pre-configured scope.","commands":{"allow":["monitor_from_point"],"deny":[]}},"allow-outer-position":{"identifier":"allow-outer-position","description":"Enables the outer_position command without any pre-configured scope.","commands":{"allow":["outer_position"],"deny":[]}},"allow-outer-size":{"identifier":"allow-outer-size","description":"Enables the outer_size command without any pre-configured scope.","commands":{"allow":["outer_size"],"deny":[]}},"allow-primary-monitor":{"identifier":"allow-primary-monitor","description":"Enables the primary_monitor command without any pre-configured scope.","commands":{"allow":["primary_monitor"],"deny":[]}},"allow-request-user-attention":{"identifier":"allow-request-user-attention","description":"Enables the request_user_attention command without any pre-configured scope.","commands":{"allow":["request_user_attention"],"deny":[]}},"allow-scale-factor":{"identifier":"allow-scale-factor","description":"Enables the scale_factor command without any pre-configured scope.","commands":{"allow":["scale_factor"],"deny":[]}},"allow-scene-identifier":{"identifier":"allow-scene-identifier","description":"Enables the scene_identifier command without any pre-configured scope.","commands":{"allow":["scene_identifier"],"deny":[]}},"allow-set-always-on-bottom":{"identifier":"allow-set-always-on-bottom","description":"Enables the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":["set_always_on_bottom"],"deny":[]}},"allow-set-always-on-top":{"identifier":"allow-set-always-on-top","description":"Enables the set_always_on_top command without any pre-configured scope.","commands":{"allow":["set_always_on_top"],"deny":[]}},"allow-set-background-color":{"identifier":"allow-set-background-color","description":"Enables the set_background_color command without any pre-configured scope.","commands":{"allow":["set_background_color"],"deny":[]}},"allow-set-badge-count":{"identifier":"allow-set-badge-count","description":"Enables the set_badge_count command without any pre-configured scope.","commands":{"allow":["set_badge_count"],"deny":[]}},"allow-set-badge-label":{"identifier":"allow-set-badge-label","description":"Enables the set_badge_label command without any pre-configured scope.","commands":{"allow":["set_badge_label"],"deny":[]}},"allow-set-closable":{"identifier":"allow-set-closable","description":"Enables the set_closable command without any pre-configured scope.","commands":{"allow":["set_closable"],"deny":[]}},"allow-set-content-protected":{"identifier":"allow-set-content-protected","description":"Enables the set_content_protected command without any pre-configured scope.","commands":{"allow":["set_content_protected"],"deny":[]}},"allow-set-cursor-grab":{"identifier":"allow-set-cursor-grab","description":"Enables the set_cursor_grab command without any pre-configured scope.","commands":{"allow":["set_cursor_grab"],"deny":[]}},"allow-set-cursor-icon":{"identifier":"allow-set-cursor-icon","description":"Enables the set_cursor_icon command without any pre-configured scope.","commands":{"allow":["set_cursor_icon"],"deny":[]}},"allow-set-cursor-position":{"identifier":"allow-set-cursor-position","description":"Enables the set_cursor_position command without any pre-configured scope.","commands":{"allow":["set_cursor_position"],"deny":[]}},"allow-set-cursor-visible":{"identifier":"allow-set-cursor-visible","description":"Enables the set_cursor_visible command without any pre-configured scope.","commands":{"allow":["set_cursor_visible"],"deny":[]}},"allow-set-decorations":{"identifier":"allow-set-decorations","description":"Enables the set_decorations command without any pre-configured scope.","commands":{"allow":["set_decorations"],"deny":[]}},"allow-set-effects":{"identifier":"allow-set-effects","description":"Enables the set_effects command without any pre-configured scope.","commands":{"allow":["set_effects"],"deny":[]}},"allow-set-enabled":{"identifier":"allow-set-enabled","description":"Enables the set_enabled command without any pre-configured scope.","commands":{"allow":["set_enabled"],"deny":[]}},"allow-set-focus":{"identifier":"allow-set-focus","description":"Enables the set_focus command without any pre-configured scope.","commands":{"allow":["set_focus"],"deny":[]}},"allow-set-focusable":{"identifier":"allow-set-focusable","description":"Enables the set_focusable command without any pre-configured scope.","commands":{"allow":["set_focusable"],"deny":[]}},"allow-set-fullscreen":{"identifier":"allow-set-fullscreen","description":"Enables the set_fullscreen command without any pre-configured scope.","commands":{"allow":["set_fullscreen"],"deny":[]}},"allow-set-fullscreen-on-monitor":{"identifier":"allow-set-fullscreen-on-monitor","description":"Enables the set_fullscreen_on_monitor command without any pre-configured scope.","commands":{"allow":["set_fullscreen_on_monitor"],"deny":[]}},"allow-set-icon":{"identifier":"allow-set-icon","description":"Enables the set_icon command without any pre-configured scope.","commands":{"allow":["set_icon"],"deny":[]}},"allow-set-ignore-cursor-events":{"identifier":"allow-set-ignore-cursor-events","description":"Enables the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":["set_ignore_cursor_events"],"deny":[]}},"allow-set-max-size":{"identifier":"allow-set-max-size","description":"Enables the set_max_size command without any pre-configured scope.","commands":{"allow":["set_max_size"],"deny":[]}},"allow-set-maximizable":{"identifier":"allow-set-maximizable","description":"Enables the set_maximizable command without any pre-configured scope.","commands":{"allow":["set_maximizable"],"deny":[]}},"allow-set-min-size":{"identifier":"allow-set-min-size","description":"Enables the set_min_size command without any pre-configured scope.","commands":{"allow":["set_min_size"],"deny":[]}},"allow-set-minimizable":{"identifier":"allow-set-minimizable","description":"Enables the set_minimizable command without any pre-configured scope.","commands":{"allow":["set_minimizable"],"deny":[]}},"allow-set-overlay-icon":{"identifier":"allow-set-overlay-icon","description":"Enables the set_overlay_icon command without any pre-configured scope.","commands":{"allow":["set_overlay_icon"],"deny":[]}},"allow-set-position":{"identifier":"allow-set-position","description":"Enables the set_position command without any pre-configured scope.","commands":{"allow":["set_position"],"deny":[]}},"allow-set-progress-bar":{"identifier":"allow-set-progress-bar","description":"Enables the set_progress_bar command without any pre-configured scope.","commands":{"allow":["set_progress_bar"],"deny":[]}},"allow-set-resizable":{"identifier":"allow-set-resizable","description":"Enables the set_resizable command without any pre-configured scope.","commands":{"allow":["set_resizable"],"deny":[]}},"allow-set-shadow":{"identifier":"allow-set-shadow","description":"Enables the set_shadow command without any pre-configured scope.","commands":{"allow":["set_shadow"],"deny":[]}},"allow-set-simple-fullscreen":{"identifier":"allow-set-simple-fullscreen","description":"Enables the set_simple_fullscreen command without any pre-configured scope.","commands":{"allow":["set_simple_fullscreen"],"deny":[]}},"allow-set-size":{"identifier":"allow-set-size","description":"Enables the set_size command without any pre-configured scope.","commands":{"allow":["set_size"],"deny":[]}},"allow-set-size-constraints":{"identifier":"allow-set-size-constraints","description":"Enables the set_size_constraints command without any pre-configured scope.","commands":{"allow":["set_size_constraints"],"deny":[]}},"allow-set-skip-taskbar":{"identifier":"allow-set-skip-taskbar","description":"Enables the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":["set_skip_taskbar"],"deny":[]}},"allow-set-theme":{"identifier":"allow-set-theme","description":"Enables the set_theme command without any pre-configured scope.","commands":{"allow":["set_theme"],"deny":[]}},"allow-set-title":{"identifier":"allow-set-title","description":"Enables the set_title command without any pre-configured scope.","commands":{"allow":["set_title"],"deny":[]}},"allow-set-title-bar-style":{"identifier":"allow-set-title-bar-style","description":"Enables the set_title_bar_style command without any pre-configured scope.","commands":{"allow":["set_title_bar_style"],"deny":[]}},"allow-set-visible-on-all-workspaces":{"identifier":"allow-set-visible-on-all-workspaces","description":"Enables the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":["set_visible_on_all_workspaces"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"allow-start-dragging":{"identifier":"allow-start-dragging","description":"Enables the start_dragging command without any pre-configured scope.","commands":{"allow":["start_dragging"],"deny":[]}},"allow-start-resize-dragging":{"identifier":"allow-start-resize-dragging","description":"Enables the start_resize_dragging command without any pre-configured scope.","commands":{"allow":["start_resize_dragging"],"deny":[]}},"allow-theme":{"identifier":"allow-theme","description":"Enables the theme command without any pre-configured scope.","commands":{"allow":["theme"],"deny":[]}},"allow-title":{"identifier":"allow-title","description":"Enables the title command without any pre-configured scope.","commands":{"allow":["title"],"deny":[]}},"allow-toggle-maximize":{"identifier":"allow-toggle-maximize","description":"Enables the toggle_maximize command without any pre-configured scope.","commands":{"allow":["toggle_maximize"],"deny":[]}},"allow-unmaximize":{"identifier":"allow-unmaximize","description":"Enables the unmaximize command without any pre-configured scope.","commands":{"allow":["unmaximize"],"deny":[]}},"allow-unminimize":{"identifier":"allow-unminimize","description":"Enables the unminimize command without any pre-configured scope.","commands":{"allow":["unminimize"],"deny":[]}},"deny-activity-name":{"identifier":"deny-activity-name","description":"Denies the activity_name command without any pre-configured scope.","commands":{"allow":[],"deny":["activity_name"]}},"deny-available-monitors":{"identifier":"deny-available-monitors","description":"Denies the available_monitors command without any pre-configured scope.","commands":{"allow":[],"deny":["available_monitors"]}},"deny-center":{"identifier":"deny-center","description":"Denies the center command without any pre-configured scope.","commands":{"allow":[],"deny":["center"]}},"deny-close":{"identifier":"deny-close","description":"Denies the close command without any pre-configured scope.","commands":{"allow":[],"deny":["close"]}},"deny-create":{"identifier":"deny-create","description":"Denies the create command without any pre-configured scope.","commands":{"allow":[],"deny":["create"]}},"deny-current-monitor":{"identifier":"deny-current-monitor","description":"Denies the current_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["current_monitor"]}},"deny-cursor-position":{"identifier":"deny-cursor-position","description":"Denies the cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["cursor_position"]}},"deny-destroy":{"identifier":"deny-destroy","description":"Denies the destroy command without any pre-configured scope.","commands":{"allow":[],"deny":["destroy"]}},"deny-get-all-windows":{"identifier":"deny-get-all-windows","description":"Denies the get_all_windows command without any pre-configured scope.","commands":{"allow":[],"deny":["get_all_windows"]}},"deny-hide":{"identifier":"deny-hide","description":"Denies the hide command without any pre-configured scope.","commands":{"allow":[],"deny":["hide"]}},"deny-inner-position":{"identifier":"deny-inner-position","description":"Denies the inner_position command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_position"]}},"deny-inner-size":{"identifier":"deny-inner-size","description":"Denies the inner_size command without any pre-configured scope.","commands":{"allow":[],"deny":["inner_size"]}},"deny-internal-toggle-maximize":{"identifier":"deny-internal-toggle-maximize","description":"Denies the internal_toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["internal_toggle_maximize"]}},"deny-is-always-on-top":{"identifier":"deny-is-always-on-top","description":"Denies the is_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["is_always_on_top"]}},"deny-is-closable":{"identifier":"deny-is-closable","description":"Denies the is_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_closable"]}},"deny-is-decorated":{"identifier":"deny-is-decorated","description":"Denies the is_decorated command without any pre-configured scope.","commands":{"allow":[],"deny":["is_decorated"]}},"deny-is-enabled":{"identifier":"deny-is-enabled","description":"Denies the is_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["is_enabled"]}},"deny-is-focused":{"identifier":"deny-is-focused","description":"Denies the is_focused command without any pre-configured scope.","commands":{"allow":[],"deny":["is_focused"]}},"deny-is-fullscreen":{"identifier":"deny-is-fullscreen","description":"Denies the is_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["is_fullscreen"]}},"deny-is-maximizable":{"identifier":"deny-is-maximizable","description":"Denies the is_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximizable"]}},"deny-is-maximized":{"identifier":"deny-is-maximized","description":"Denies the is_maximized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_maximized"]}},"deny-is-minimizable":{"identifier":"deny-is-minimizable","description":"Denies the is_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimizable"]}},"deny-is-minimized":{"identifier":"deny-is-minimized","description":"Denies the is_minimized command without any pre-configured scope.","commands":{"allow":[],"deny":["is_minimized"]}},"deny-is-resizable":{"identifier":"deny-is-resizable","description":"Denies the is_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["is_resizable"]}},"deny-is-visible":{"identifier":"deny-is-visible","description":"Denies the is_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["is_visible"]}},"deny-maximize":{"identifier":"deny-maximize","description":"Denies the maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["maximize"]}},"deny-minimize":{"identifier":"deny-minimize","description":"Denies the minimize command without any pre-configured scope.","commands":{"allow":[],"deny":["minimize"]}},"deny-monitor-from-point":{"identifier":"deny-monitor-from-point","description":"Denies the monitor_from_point command without any pre-configured scope.","commands":{"allow":[],"deny":["monitor_from_point"]}},"deny-outer-position":{"identifier":"deny-outer-position","description":"Denies the outer_position command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_position"]}},"deny-outer-size":{"identifier":"deny-outer-size","description":"Denies the outer_size command without any pre-configured scope.","commands":{"allow":[],"deny":["outer_size"]}},"deny-primary-monitor":{"identifier":"deny-primary-monitor","description":"Denies the primary_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["primary_monitor"]}},"deny-request-user-attention":{"identifier":"deny-request-user-attention","description":"Denies the request_user_attention command without any pre-configured scope.","commands":{"allow":[],"deny":["request_user_attention"]}},"deny-scale-factor":{"identifier":"deny-scale-factor","description":"Denies the scale_factor command without any pre-configured scope.","commands":{"allow":[],"deny":["scale_factor"]}},"deny-scene-identifier":{"identifier":"deny-scene-identifier","description":"Denies the scene_identifier command without any pre-configured scope.","commands":{"allow":[],"deny":["scene_identifier"]}},"deny-set-always-on-bottom":{"identifier":"deny-set-always-on-bottom","description":"Denies the set_always_on_bottom command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_bottom"]}},"deny-set-always-on-top":{"identifier":"deny-set-always-on-top","description":"Denies the set_always_on_top command without any pre-configured scope.","commands":{"allow":[],"deny":["set_always_on_top"]}},"deny-set-background-color":{"identifier":"deny-set-background-color","description":"Denies the set_background_color command without any pre-configured scope.","commands":{"allow":[],"deny":["set_background_color"]}},"deny-set-badge-count":{"identifier":"deny-set-badge-count","description":"Denies the set_badge_count command without any pre-configured scope.","commands":{"allow":[],"deny":["set_badge_count"]}},"deny-set-badge-label":{"identifier":"deny-set-badge-label","description":"Denies the set_badge_label command without any pre-configured scope.","commands":{"allow":[],"deny":["set_badge_label"]}},"deny-set-closable":{"identifier":"deny-set-closable","description":"Denies the set_closable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_closable"]}},"deny-set-content-protected":{"identifier":"deny-set-content-protected","description":"Denies the set_content_protected command without any pre-configured scope.","commands":{"allow":[],"deny":["set_content_protected"]}},"deny-set-cursor-grab":{"identifier":"deny-set-cursor-grab","description":"Denies the set_cursor_grab command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_grab"]}},"deny-set-cursor-icon":{"identifier":"deny-set-cursor-icon","description":"Denies the set_cursor_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_icon"]}},"deny-set-cursor-position":{"identifier":"deny-set-cursor-position","description":"Denies the set_cursor_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_position"]}},"deny-set-cursor-visible":{"identifier":"deny-set-cursor-visible","description":"Denies the set_cursor_visible command without any pre-configured scope.","commands":{"allow":[],"deny":["set_cursor_visible"]}},"deny-set-decorations":{"identifier":"deny-set-decorations","description":"Denies the set_decorations command without any pre-configured scope.","commands":{"allow":[],"deny":["set_decorations"]}},"deny-set-effects":{"identifier":"deny-set-effects","description":"Denies the set_effects command without any pre-configured scope.","commands":{"allow":[],"deny":["set_effects"]}},"deny-set-enabled":{"identifier":"deny-set-enabled","description":"Denies the set_enabled command without any pre-configured scope.","commands":{"allow":[],"deny":["set_enabled"]}},"deny-set-focus":{"identifier":"deny-set-focus","description":"Denies the set_focus command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focus"]}},"deny-set-focusable":{"identifier":"deny-set-focusable","description":"Denies the set_focusable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_focusable"]}},"deny-set-fullscreen":{"identifier":"deny-set-fullscreen","description":"Denies the set_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_fullscreen"]}},"deny-set-fullscreen-on-monitor":{"identifier":"deny-set-fullscreen-on-monitor","description":"Denies the set_fullscreen_on_monitor command without any pre-configured scope.","commands":{"allow":[],"deny":["set_fullscreen_on_monitor"]}},"deny-set-icon":{"identifier":"deny-set-icon","description":"Denies the set_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_icon"]}},"deny-set-ignore-cursor-events":{"identifier":"deny-set-ignore-cursor-events","description":"Denies the set_ignore_cursor_events command without any pre-configured scope.","commands":{"allow":[],"deny":["set_ignore_cursor_events"]}},"deny-set-max-size":{"identifier":"deny-set-max-size","description":"Denies the set_max_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_max_size"]}},"deny-set-maximizable":{"identifier":"deny-set-maximizable","description":"Denies the set_maximizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_maximizable"]}},"deny-set-min-size":{"identifier":"deny-set-min-size","description":"Denies the set_min_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_min_size"]}},"deny-set-minimizable":{"identifier":"deny-set-minimizable","description":"Denies the set_minimizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_minimizable"]}},"deny-set-overlay-icon":{"identifier":"deny-set-overlay-icon","description":"Denies the set_overlay_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["set_overlay_icon"]}},"deny-set-position":{"identifier":"deny-set-position","description":"Denies the set_position command without any pre-configured scope.","commands":{"allow":[],"deny":["set_position"]}},"deny-set-progress-bar":{"identifier":"deny-set-progress-bar","description":"Denies the set_progress_bar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_progress_bar"]}},"deny-set-resizable":{"identifier":"deny-set-resizable","description":"Denies the set_resizable command without any pre-configured scope.","commands":{"allow":[],"deny":["set_resizable"]}},"deny-set-shadow":{"identifier":"deny-set-shadow","description":"Denies the set_shadow command without any pre-configured scope.","commands":{"allow":[],"deny":["set_shadow"]}},"deny-set-simple-fullscreen":{"identifier":"deny-set-simple-fullscreen","description":"Denies the set_simple_fullscreen command without any pre-configured scope.","commands":{"allow":[],"deny":["set_simple_fullscreen"]}},"deny-set-size":{"identifier":"deny-set-size","description":"Denies the set_size command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size"]}},"deny-set-size-constraints":{"identifier":"deny-set-size-constraints","description":"Denies the set_size_constraints command without any pre-configured scope.","commands":{"allow":[],"deny":["set_size_constraints"]}},"deny-set-skip-taskbar":{"identifier":"deny-set-skip-taskbar","description":"Denies the set_skip_taskbar command without any pre-configured scope.","commands":{"allow":[],"deny":["set_skip_taskbar"]}},"deny-set-theme":{"identifier":"deny-set-theme","description":"Denies the set_theme command without any pre-configured scope.","commands":{"allow":[],"deny":["set_theme"]}},"deny-set-title":{"identifier":"deny-set-title","description":"Denies the set_title command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title"]}},"deny-set-title-bar-style":{"identifier":"deny-set-title-bar-style","description":"Denies the set_title_bar_style command without any pre-configured scope.","commands":{"allow":[],"deny":["set_title_bar_style"]}},"deny-set-visible-on-all-workspaces":{"identifier":"deny-set-visible-on-all-workspaces","description":"Denies the set_visible_on_all_workspaces command without any pre-configured scope.","commands":{"allow":[],"deny":["set_visible_on_all_workspaces"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}},"deny-start-dragging":{"identifier":"deny-start-dragging","description":"Denies the start_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_dragging"]}},"deny-start-resize-dragging":{"identifier":"deny-start-resize-dragging","description":"Denies the start_resize_dragging command without any pre-configured scope.","commands":{"allow":[],"deny":["start_resize_dragging"]}},"deny-theme":{"identifier":"deny-theme","description":"Denies the theme command without any pre-configured scope.","commands":{"allow":[],"deny":["theme"]}},"deny-title":{"identifier":"deny-title","description":"Denies the title command without any pre-configured scope.","commands":{"allow":[],"deny":["title"]}},"deny-toggle-maximize":{"identifier":"deny-toggle-maximize","description":"Denies the toggle_maximize command without any pre-configured scope.","commands":{"allow":[],"deny":["toggle_maximize"]}},"deny-unmaximize":{"identifier":"deny-unmaximize","description":"Denies the unmaximize command without any pre-configured scope.","commands":{"allow":[],"deny":["unmaximize"]}},"deny-unminimize":{"identifier":"deny-unminimize","description":"Denies the unminimize command without any pre-configured scope.","commands":{"allow":[],"deny":["unminimize"]}}},"permission_sets":{},"global_scope_schema":null},"dialog":{"default_permission":{"identifier":"default","description":"This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n","permissions":["allow-message","allow-save","allow-open"]},"permissions":{"allow-ask":{"identifier":"allow-ask","description":"Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)","commands":{"allow":["message"],"deny":[]}},"allow-confirm":{"identifier":"allow-confirm","description":"Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)","commands":{"allow":["message"],"deny":[]}},"allow-message":{"identifier":"allow-message","description":"Enables the message command without any pre-configured scope.","commands":{"allow":["message"],"deny":[]}},"allow-open":{"identifier":"allow-open","description":"Enables the open command without any pre-configured scope.","commands":{"allow":["open"],"deny":[]}},"allow-save":{"identifier":"allow-save","description":"Enables the save command without any pre-configured scope.","commands":{"allow":["save"],"deny":[]}},"deny-ask":{"identifier":"deny-ask","description":"Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)","commands":{"allow":[],"deny":["message"]}},"deny-confirm":{"identifier":"deny-confirm","description":"Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)","commands":{"allow":[],"deny":["message"]}},"deny-message":{"identifier":"deny-message","description":"Denies the message command without any pre-configured scope.","commands":{"allow":[],"deny":["message"]}},"deny-open":{"identifier":"deny-open","description":"Denies the open command without any pre-configured scope.","commands":{"allow":[],"deny":["open"]}},"deny-save":{"identifier":"deny-save","description":"Denies the save command without any pre-configured scope.","commands":{"allow":[],"deny":["save"]}}},"permission_sets":{},"global_scope_schema":null},"notification":{"default_permission":{"identifier":"default","description":"This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n","permissions":["allow-is-permission-granted","allow-request-permission","allow-notify","allow-register-action-types","allow-register-listener","allow-remove-listener","allow-cancel","allow-get-pending","allow-remove-active","allow-get-active","allow-check-permissions","allow-show","allow-batch","allow-list-channels","allow-delete-channel","allow-create-channel","allow-permission-state"]},"permissions":{"allow-batch":{"identifier":"allow-batch","description":"Enables the batch command without any pre-configured scope.","commands":{"allow":["batch"],"deny":[]}},"allow-cancel":{"identifier":"allow-cancel","description":"Enables the cancel command without any pre-configured scope.","commands":{"allow":["cancel"],"deny":[]}},"allow-check-permissions":{"identifier":"allow-check-permissions","description":"Enables the check_permissions command without any pre-configured scope.","commands":{"allow":["check_permissions"],"deny":[]}},"allow-create-channel":{"identifier":"allow-create-channel","description":"Enables the create_channel command without any pre-configured scope.","commands":{"allow":["create_channel"],"deny":[]}},"allow-delete-channel":{"identifier":"allow-delete-channel","description":"Enables the delete_channel command without any pre-configured scope.","commands":{"allow":["delete_channel"],"deny":[]}},"allow-get-active":{"identifier":"allow-get-active","description":"Enables the get_active command without any pre-configured scope.","commands":{"allow":["get_active"],"deny":[]}},"allow-get-pending":{"identifier":"allow-get-pending","description":"Enables the get_pending command without any pre-configured scope.","commands":{"allow":["get_pending"],"deny":[]}},"allow-is-permission-granted":{"identifier":"allow-is-permission-granted","description":"Enables the is_permission_granted command without any pre-configured scope.","commands":{"allow":["is_permission_granted"],"deny":[]}},"allow-list-channels":{"identifier":"allow-list-channels","description":"Enables the list_channels command without any pre-configured scope.","commands":{"allow":["list_channels"],"deny":[]}},"allow-notify":{"identifier":"allow-notify","description":"Enables the notify command without any pre-configured scope.","commands":{"allow":["notify"],"deny":[]}},"allow-permission-state":{"identifier":"allow-permission-state","description":"Enables the permission_state command without any pre-configured scope.","commands":{"allow":["permission_state"],"deny":[]}},"allow-register-action-types":{"identifier":"allow-register-action-types","description":"Enables the register_action_types command without any pre-configured scope.","commands":{"allow":["register_action_types"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-active":{"identifier":"allow-remove-active","description":"Enables the remove_active command without any pre-configured scope.","commands":{"allow":["remove_active"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-request-permission":{"identifier":"allow-request-permission","description":"Enables the request_permission command without any pre-configured scope.","commands":{"allow":["request_permission"],"deny":[]}},"allow-show":{"identifier":"allow-show","description":"Enables the show command without any pre-configured scope.","commands":{"allow":["show"],"deny":[]}},"deny-batch":{"identifier":"deny-batch","description":"Denies the batch command without any pre-configured scope.","commands":{"allow":[],"deny":["batch"]}},"deny-cancel":{"identifier":"deny-cancel","description":"Denies the cancel command without any pre-configured scope.","commands":{"allow":[],"deny":["cancel"]}},"deny-check-permissions":{"identifier":"deny-check-permissions","description":"Denies the check_permissions command without any pre-configured scope.","commands":{"allow":[],"deny":["check_permissions"]}},"deny-create-channel":{"identifier":"deny-create-channel","description":"Denies the create_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["create_channel"]}},"deny-delete-channel":{"identifier":"deny-delete-channel","description":"Denies the delete_channel command without any pre-configured scope.","commands":{"allow":[],"deny":["delete_channel"]}},"deny-get-active":{"identifier":"deny-get-active","description":"Denies the get_active command without any pre-configured scope.","commands":{"allow":[],"deny":["get_active"]}},"deny-get-pending":{"identifier":"deny-get-pending","description":"Denies the get_pending command without any pre-configured scope.","commands":{"allow":[],"deny":["get_pending"]}},"deny-is-permission-granted":{"identifier":"deny-is-permission-granted","description":"Denies the is_permission_granted command without any pre-configured scope.","commands":{"allow":[],"deny":["is_permission_granted"]}},"deny-list-channels":{"identifier":"deny-list-channels","description":"Denies the list_channels command without any pre-configured scope.","commands":{"allow":[],"deny":["list_channels"]}},"deny-notify":{"identifier":"deny-notify","description":"Denies the notify command without any pre-configured scope.","commands":{"allow":[],"deny":["notify"]}},"deny-permission-state":{"identifier":"deny-permission-state","description":"Denies the permission_state command without any pre-configured scope.","commands":{"allow":[],"deny":["permission_state"]}},"deny-register-action-types":{"identifier":"deny-register-action-types","description":"Denies the register_action_types command without any pre-configured scope.","commands":{"allow":[],"deny":["register_action_types"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-active":{"identifier":"deny-remove-active","description":"Denies the remove_active command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_active"]}},"deny-remove-listener":{"identifier":"deny-remove-listener","description":"Denies the remove_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["remove_listener"]}},"deny-request-permission":{"identifier":"deny-request-permission","description":"Denies the request_permission command without any pre-configured scope.","commands":{"allow":[],"deny":["request_permission"]}},"deny-show":{"identifier":"deny-show","description":"Denies the show command without any pre-configured scope.","commands":{"allow":[],"deny":["show"]}}},"permission_sets":{},"global_scope_schema":null},"opener":{"default_permission":{"identifier":"default","description":"This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer","permissions":["allow-open-url","allow-reveal-item-in-dir","allow-default-urls"]},"permissions":{"allow-default-urls":{"identifier":"allow-default-urls","description":"This enables opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application.","commands":{"allow":[],"deny":[]},"scope":{"allow":[{"url":"mailto:*"},{"url":"tel:*"},{"url":"http://*"},{"url":"https://*"}]}},"allow-open-path":{"identifier":"allow-open-path","description":"Enables the open_path command without any pre-configured scope.","commands":{"allow":["open_path"],"deny":[]}},"allow-open-url":{"identifier":"allow-open-url","description":"Enables the open_url command without any pre-configured scope.","commands":{"allow":["open_url"],"deny":[]}},"allow-reveal-item-in-dir":{"identifier":"allow-reveal-item-in-dir","description":"Enables the reveal_item_in_dir command without any pre-configured scope.","commands":{"allow":["reveal_item_in_dir"],"deny":[]}},"deny-open-path":{"identifier":"deny-open-path","description":"Denies the open_path command without any pre-configured scope.","commands":{"allow":[],"deny":["open_path"]}},"deny-open-url":{"identifier":"deny-open-url","description":"Denies the open_url command without any pre-configured scope.","commands":{"allow":[],"deny":["open_url"]}},"deny-reveal-item-in-dir":{"identifier":"deny-reveal-item-in-dir","description":"Denies the reveal_item_in_dir command without any pre-configured scope.","commands":{"allow":[],"deny":["reveal_item_in_dir"]}}},"permission_sets":{},"global_scope_schema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"properties":{"app":{"allOf":[{"$ref":"#/definitions/Application"}],"description":"An application to open this url with, for example: firefox."},"url":{"description":"A URL that can be opened by the webview when using the Opener APIs.\n\nWildcards can be used following the UNIX glob pattern.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"","type":"string"}},"required":["url"],"type":"object"},{"properties":{"app":{"allOf":[{"$ref":"#/definitions/Application"}],"description":"An application to open this path with, for example: xdg-open."},"path":{"description":"A path that can be opened by the webview when using the Opener APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.","type":"string"}},"required":["path"],"type":"object"}],"definitions":{"Application":{"anyOf":[{"description":"Open in default application.","type":"null"},{"description":"If true, allow open with any application.","type":"boolean"},{"description":"Allow specific application to open with.","type":"string"}],"description":"Opener scope application."}},"description":"Opener scope entry.","title":"OpenerScopeEntry"}},"process":{"default_permission":{"identifier":"default","description":"This permission set configures which\nprocess features are by default exposed.\n\n#### Granted Permissions\n\nThis enables to quit via `allow-exit` and restart via `allow-restart`\nthe application.\n","permissions":["allow-exit","allow-restart"]},"permissions":{"allow-exit":{"identifier":"allow-exit","description":"Enables the exit command without any pre-configured scope.","commands":{"allow":["exit"],"deny":[]}},"allow-restart":{"identifier":"allow-restart","description":"Enables the restart command without any pre-configured scope.","commands":{"allow":["restart"],"deny":[]}},"deny-exit":{"identifier":"deny-exit","description":"Denies the exit command without any pre-configured scope.","commands":{"allow":[],"deny":["exit"]}},"deny-restart":{"identifier":"deny-restart","description":"Denies the restart command without any pre-configured scope.","commands":{"allow":[],"deny":["restart"]}}},"permission_sets":{},"global_scope_schema":null},"updater":{"default_permission":{"identifier":"default","description":"This permission set configures which kind of\nupdater functions are exposed to the frontend.\n\n#### Granted Permissions\n\nThe full workflow from checking for updates to installing them\nis enabled.\n\n","permissions":["allow-check","allow-download","allow-install","allow-download-and-install"]},"permissions":{"allow-check":{"identifier":"allow-check","description":"Enables the check command without any pre-configured scope.","commands":{"allow":["check"],"deny":[]}},"allow-download":{"identifier":"allow-download","description":"Enables the download command without any pre-configured scope.","commands":{"allow":["download"],"deny":[]}},"allow-download-and-install":{"identifier":"allow-download-and-install","description":"Enables the download_and_install command without any pre-configured scope.","commands":{"allow":["download_and_install"],"deny":[]}},"allow-install":{"identifier":"allow-install","description":"Enables the install command without any pre-configured scope.","commands":{"allow":["install"],"deny":[]}},"deny-check":{"identifier":"deny-check","description":"Denies the check command without any pre-configured scope.","commands":{"allow":[],"deny":["check"]}},"deny-download":{"identifier":"deny-download","description":"Denies the download command without any pre-configured scope.","commands":{"allow":[],"deny":["download"]}},"deny-download-and-install":{"identifier":"deny-download-and-install","description":"Denies the download_and_install command without any pre-configured scope.","commands":{"allow":[],"deny":["download_and_install"]}},"deny-install":{"identifier":"deny-install","description":"Denies the install command without any pre-configured scope.","commands":{"allow":[],"deny":["install"]}}},"permission_sets":{},"global_scope_schema":null}}
\ No newline at end of file
diff --git a/src-tauri/gen/schemas/capabilities.json b/src-tauri/gen/schemas/capabilities.json
index 3aa0e4be..03a64d53 100644
--- a/src-tauri/gen/schemas/capabilities.json
+++ b/src-tauri/gen/schemas/capabilities.json
@@ -1 +1 @@
-{"default":{"identifier":"default","description":"Permissions for the ROSI main window","local":true,"windows":["main"],"permissions":["core:app:allow-version","core:event:allow-listen","core:event:allow-unlisten","core:window:allow-set-theme","updater:allow-check","updater:allow-download","updater:allow-install","allow-get-settings","allow-get-default-settings","allow-save-settings","allow-reset-settings","allow-export-settings","allow-import-settings","allow-get-stats","allow-reset-stats","allow-get-download-activity","allow-clear-download-activity","allow-get-formats","allow-cancel-formats","allow-get-video-info","allow-cancel-video-info","allow-download-video","allow-cancel-download","allow-add-to-queue","allow-remove-from-queue","allow-retry-queue-item","allow-reorder-queue-item","allow-clear-queue","allow-clear-finished-queue","allow-get-queue","allow-start-queue","allow-cancel-queue","allow-select-download-location","allow-open-external","allow-open-file-location","allow-show-notification","allow-check-deno-installed","allow-install-deno","allow-detect-gpu","allow-is-packaged","allow-is-flatpak","allow-get-app-platform","allow-get-distribution-channel","allow-get-beta-updater-target","allow-restart-app","allow-log-error","allow-notify-settings-flushed","allow-mark-main-window-ready"]},"splash":{"identifier":"splash","description":"Minimal permissions for the packaged startup splash window","local":true,"windows":["splash"],"permissions":["core:app:allow-version"]}}
\ No newline at end of file
+{"default":{"identifier":"default","description":"Permissions for the ROSI main window","local":true,"windows":["main"],"permissions":["core:app:allow-version","core:event:allow-listen","core:event:allow-unlisten","core:window:allow-set-theme","updater:allow-check","updater:allow-download","updater:allow-install","allow-get-settings","allow-get-default-settings","allow-save-settings","allow-reset-settings","allow-export-settings","allow-import-settings","allow-get-stats","allow-reset-stats","allow-get-download-activity","allow-clear-download-activity","allow-get-formats","allow-cancel-formats","allow-get-video-info","allow-cancel-video-info","allow-download-video","allow-cancel-download","allow-add-to-queue","allow-remove-from-queue","allow-retry-queue-item","allow-reorder-queue-item","allow-clear-queue","allow-clear-finished-queue","allow-get-queue","allow-start-queue","allow-cancel-queue","allow-select-download-location","allow-open-external","allow-open-file-location","allow-show-notification","allow-check-deno-installed","allow-install-deno","allow-detect-gpu","allow-is-packaged","allow-is-flatpak","allow-get-app-platform","allow-get-distribution-channel","allow-get-beta-updater-target","allow-get-compact-updater-target","allow-restart-app","allow-log-error","allow-notify-settings-flushed","allow-mark-main-window-ready"]},"splash":{"identifier":"splash","description":"Minimal permissions for the packaged startup splash window","local":true,"windows":["splash"],"permissions":["core:app:allow-version"]}}
\ No newline at end of file
diff --git a/src-tauri/gen/schemas/desktop-schema.json b/src-tauri/gen/schemas/desktop-schema.json
index 7a0a3b48..c8e4edfd 100644
--- a/src-tauri/gen/schemas/desktop-schema.json
+++ b/src-tauri/gen/schemas/desktop-schema.json
@@ -452,6 +452,12 @@
"const": "allow-get-beta-updater-target",
"markdownDescription": "Enables the get_beta_updater_target command without any pre-configured scope."
},
+ {
+ "description": "Enables the get_compact_updater_target command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-get-compact-updater-target",
+ "markdownDescription": "Enables the get_compact_updater_target command without any pre-configured scope."
+ },
{
"description": "Enables the get_default_settings command without any pre-configured scope.",
"type": "string",
@@ -722,6 +728,12 @@
"const": "deny-get-beta-updater-target",
"markdownDescription": "Denies the get_beta_updater_target command without any pre-configured scope."
},
+ {
+ "description": "Denies the get_compact_updater_target command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-get-compact-updater-target",
+ "markdownDescription": "Denies the get_compact_updater_target command without any pre-configured scope."
+ },
{
"description": "Denies the get_default_settings command without any pre-configured scope.",
"type": "string",
diff --git a/src-tauri/gen/schemas/macOS-schema.json b/src-tauri/gen/schemas/macOS-schema.json
index 7a0a3b48..c8e4edfd 100644
--- a/src-tauri/gen/schemas/macOS-schema.json
+++ b/src-tauri/gen/schemas/macOS-schema.json
@@ -452,6 +452,12 @@
"const": "allow-get-beta-updater-target",
"markdownDescription": "Enables the get_beta_updater_target command without any pre-configured scope."
},
+ {
+ "description": "Enables the get_compact_updater_target command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-get-compact-updater-target",
+ "markdownDescription": "Enables the get_compact_updater_target command without any pre-configured scope."
+ },
{
"description": "Enables the get_default_settings command without any pre-configured scope.",
"type": "string",
@@ -722,6 +728,12 @@
"const": "deny-get-beta-updater-target",
"markdownDescription": "Denies the get_beta_updater_target command without any pre-configured scope."
},
+ {
+ "description": "Denies the get_compact_updater_target command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-get-compact-updater-target",
+ "markdownDescription": "Denies the get_compact_updater_target command without any pre-configured scope."
+ },
{
"description": "Denies the get_default_settings command without any pre-configured scope.",
"type": "string",
diff --git a/src-tauri/permissions/autogenerated/get_compact_updater_target.toml b/src-tauri/permissions/autogenerated/get_compact_updater_target.toml
new file mode 100644
index 00000000..62cafab1
--- /dev/null
+++ b/src-tauri/permissions/autogenerated/get_compact_updater_target.toml
@@ -0,0 +1,11 @@
+# Automatically generated - DO NOT EDIT!
+
+[[permission]]
+identifier = "allow-get-compact-updater-target"
+description = "Enables the get_compact_updater_target command without any pre-configured scope."
+commands.allow = ["get_compact_updater_target"]
+
+[[permission]]
+identifier = "deny-get-compact-updater-target"
+description = "Denies the get_compact_updater_target command without any pre-configured scope."
+commands.deny = ["get_compact_updater_target"]
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index f429f342..09ef254d 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -160,6 +160,7 @@ macro_rules! generate_app_handler {
platform::get_app_platform,
platform::get_distribution_channel,
platform::get_beta_updater_target,
+ platform::get_compact_updater_target,
window::restart_app,
logging::log_error,
window::notify_settings_flushed,
diff --git a/src-tauri/src/platform.rs b/src-tauri/src/platform.rs
index 1256cc2a..bc0bbfe8 100644
--- a/src-tauri/src/platform.rs
+++ b/src-tauri/src/platform.rs
@@ -61,6 +61,30 @@ pub fn get_beta_updater_target() -> String {
}
}
+/// Packaged macOS apps update from per-arch `.app.tar.zst` archives
+/// (`scripts/pack-macos-updater-zst.js`). `None` everywhere else, so those
+/// builds keep the default or beta target.
+#[tauri::command]
+pub fn get_compact_updater_target(beta: bool) -> Option {
+ use tauri::utils::config::BundleType;
+
+ if !cfg!(target_os = "macos")
+ || !matches!(
+ tauri::utils::platform::bundle_type(),
+ Some(BundleType::App | BundleType::Dmg)
+ )
+ {
+ return None;
+ }
+ // Compile-time arch: a Rosetta process asks for the x86_64 bundle.
+ let arch = match std::env::consts::ARCH {
+ arch @ ("aarch64" | "x86_64") => arch,
+ _ => return None,
+ };
+ let channel = if beta { "-beta" } else { "" };
+ Some(format!("darwin{channel}-{arch}-app-zst"))
+}
+
/// The AppImage GTK hook (linuxdeploy-plugin-gtk, Tauri CLI < 2.12) exports
/// `GDK_BACKEND=x11` unconditionally. On a Wayland session without XWayland
/// there is no X display, so GTK init panics before any window appears. Fall
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index e7226f20..75eb5f90 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "ROSI",
- "version": "5.0.2",
+ "version": "5.1.0-beta.1",
"identifier": "run.rosie.rosi",
"build": {
"beforeDevCommand": "npm run dev",
@@ -81,7 +81,7 @@
"entitlements": "entitlements.plist",
"hardenedRuntime": true,
"minimumSystemVersion": "15.0",
- "bundleVersion": "5.0.29999",
+ "bundleVersion": "5.1.3001",
"dmg": {
"background": "dmg/background.png",
"windowSize": {
diff --git a/src-tauri/vendor/tauri-plugin-updater/Cargo.lock b/src-tauri/vendor/tauri-plugin-updater/Cargo.lock
index c9858be9..a5d50129 100644
--- a/src-tauri/vendor/tauri-plugin-updater/Cargo.lock
+++ b/src-tauri/vendor/tauri-plugin-updater/Cargo.lock
@@ -253,6 +253,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6651c9ed80effdc7db0ff72512157f901af5e3549e341e24b1dd4887d836d838"
dependencies = [
"find-msvc-tools",
+ "jobserver",
+ "libc",
"shlex",
]
@@ -1668,6 +1670,16 @@ dependencies = [
"syn 2.0.119",
]
+[[package]]
+name = "jobserver"
+version = "0.1.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3"
+dependencies = [
+ "getrandom 0.4.3",
+ "libc",
+]
+
[[package]]
name = "js-sys"
version = "0.3.106"
@@ -3506,6 +3518,7 @@ dependencies = [
"url",
"windows-sys 0.61.2",
"zip",
+ "zstd",
]
[[package]]
@@ -4784,3 +4797,31 @@ name = "zmij"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
+
+[[package]]
+name = "zstd"
+version = "0.13.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
+dependencies = [
+ "zstd-safe",
+]
+
+[[package]]
+name = "zstd-safe"
+version = "7.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64d80649ab6db9d9f6f9c80a40becd948eda4714a0a5ac8c4d157a32231c7882"
+dependencies = [
+ "zstd-sys",
+]
+
+[[package]]
+name = "zstd-sys"
+version = "2.1.2+zstd.1.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "481ada9c543b2323cbb7bbdbb5249177fbf0188ed959ed2c15e4b22421c84ed3"
+dependencies = [
+ "cc",
+ "pkg-config",
+]
diff --git a/src-tauri/vendor/tauri-plugin-updater/Cargo.toml b/src-tauri/vendor/tauri-plugin-updater/Cargo.toml
index d01b419c..066016be 100644
--- a/src-tauri/vendor/tauri-plugin-updater/Cargo.toml
+++ b/src-tauri/vendor/tauri-plugin-updater/Cargo.toml
@@ -187,6 +187,10 @@ features = ["full"]
[target.'cfg(target_os = "macos")'.dependencies.tar]
version = "0.4"
+[target.'cfg(target_os = "macos")'.dependencies.zstd]
+version = "0.13.3"
+default-features = false
+
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.61.0"
features = [
diff --git a/src-tauri/vendor/tauri-plugin-updater/PATCHES.md b/src-tauri/vendor/tauri-plugin-updater/PATCHES.md
index e6e81d09..f9ebfedb 100644
--- a/src-tauri/vendor/tauri-plugin-updater/PATCHES.md
+++ b/src-tauri/vendor/tauri-plugin-updater/PATCHES.md
@@ -24,14 +24,15 @@ reason (`.github/dependabot.yml`).
| Upstream git sha1 | `44293a5722efcaf27060504e63b17aeba721b40f` (`.cargo_vcs_info.json`, path `plugins/updater`) |
| Newest stable 2.x seen | `2.14.0` (checked 2026-10-17 via crates.io; `2.13.3` and `2.13.2` are older) |
-`Cargo.toml`, `Cargo.toml.orig`, `README.md`, `build.rs`, `permissions/`,
+`Cargo.toml.orig`, `README.md`, `build.rs`, `permissions/`,
`CHANGELOG.md`, `SECURITY.md`, `api-iife.js`, the `LICENSE*` files and
`.cargo_vcs_info.json` are byte-identical to upstream 2.14.0. Upstream 2.14.0
excludes `guest-js/`, `package.json`, `rollup.config.js`, `tsconfig.json` and
`banner.png` from the crate, so they are not vendored any more.
-All ROSI changes are under `src/`. `ROSI.patch` is the complete diff
-(upstream `src/` to vendored `src/`), excluding `target/`, `Cargo.lock`,
-`.cargo-ok`, `.cargo_vcs_info.json`, `PATCHES.md` and `ROSI.patch`.
+ROSI changes are under `src/`, plus one dependency in `Cargo.toml`.
+`ROSI.patch` is the complete diff (upstream crate to vendored crate),
+excluding `target/`, `Cargo.lock`, `.cargo-ok`, `.cargo_vcs_info.json`,
+`PATCHES.md` and `ROSI.patch`.
Apply the patch to a pristine copy with:
@@ -45,10 +46,11 @@ patch -p1 -d -i ROSI.patch
| --- | --- | --- |
| `src/install_safety.rs` | new | Shared install checks. macOS: bundle identity and completeness, a sibling backup path, a process-wide install lock, and a privileged replacement script whose arguments are shell-quoted. Windows: `ShellExecuteW` result check (values `<= 32` are failures). Archives: confined tar member, parent-directory and symlink-target checks, so an update cannot write outside the extract root. Linux: helper binaries (`pkexec`, `sudo`, `zenity`, `kdialog`, `sh`) are resolved only from fixed root-owned system directories and never through `PATH`; the privileged environment is an allowlist (session display, D-Bus, locale vars) and sets `PATH` to fixed system directories. Also cross-device move and copy fallback. Its `#[cfg(test)]` module runs with `cargo test`. |
| `src/appimage_install.rs` | new | Validates an AppImage before it replaces the live file: ELF class, machine and entrypoint checks, squashfs and ISO9660 structure for Type 2 images. Stages in a private work directory, moves the old image aside, then renames the stage into place, restoring the old image if that fails. Used on Linux and BSD only. |
-| `src/appimage_archive.rs` | new | Bounded `.tar.gz` extraction for AppImage updates: entry-count limit, total decompressed-byte limit, exactly one regular `.AppImage` member, no links, truncation detection. Used on Linux and BSD only. |
+| `src/appimage_archive.rs` | new | Bounded `.tar.gz` extraction for AppImage updates: entry-count limit, total decompressed-byte limit, exactly one regular `.AppImage` member, no links, truncation detection. Used on Linux and BSD. Its `BoundedArchiveReader` (decompressed-byte cap, tar end-block and trailing-data check) also bounds macOS app extraction. |
| `src/updater.rs` | modified | See details below. |
| `src/lib.rs` | modified | Adds `mod install_safety;`. Plumbs the fallible `on_before_exit` hook and a new `on_windows_installer_launched` hook into the updater state. Windows cleanup now runs from the launched hook, not before launch. |
| `src/error.rs` | modified | Adds `Error::BeforeExit(String)` so a failed app-state flush aborts installation and keeps the update retryable. |
+| `Cargo.toml` | modified | Adds the macOS-only `zstd` dependency (`default-features = false`) for per-arch `.app.tar.zst` updates. |
| `src/commands.rs` | modified | `allow_downgrades` is accepted but ignored (`let _ = allow_downgrades;`). ROSI decision: the flag cannot select an older release, so the default newer-only comparator always applies. Upstream honours the flag by replacing `version_comparator`. The config-level `allowDowngrades` (`Config::allow_downgrades`, parsed from `tauri.conf`) is not applied either: `lib.rs` does not install the downgrade comparator from it. |
### `src/updater.rs` details
@@ -68,6 +70,12 @@ patch -p1 -d -i ROSI.patch
after the identity check passes. `restore_macos_live_bundle` and
`recover_macos_live_bundle` roll back a partial swap. When the user-owned path is not
writable, the privileged AppleScript path runs with quoted arguments.
+- macOS archives: `extract_macos_app_archive` picks gzip (Tauri `.app.tar.gz`) or zstd (ROSI
+ per-arch `.app.tar.zst`, `scripts/pack-macos-updater-zst.js`) by magic bytes and rejects
+ anything else. zstd frames may not ask for a window above 2^27
+ (`MACOS_ZSTD_WINDOW_LOG_MAX`, matching the packer's `--long=27`). Both formats share the
+ member checks, a 2 GiB decompressed cap, and a full-stream trailer check. Failure modes:
+ `e2e/updater-zst.failure-modes.md`.
- Linux: privileged commands go through `linux_privileged_command` (env allowlist, fixed
`PATH`, `LC_ALL=C`). Child processes run in their own process group with timeouts
(`wait_child_output_timeout`, 600 s for package installs). Helper paths come from
@@ -128,7 +136,8 @@ compile on macOS so their tests keep running.
`src-tauri` as the seed. It is a standalone root package, so its unit tests run with
`cargo test --locked --manifest-path src-tauri/vendor/tauri-plugin-updater/Cargo.toml --lib`
(CI gate `vendorUpdater` in `scripts/test-all.js`). The root `cargo test --all-targets`
- gate does not run them. Last run: 34 pass.
+ gate does not run them. Last run (macOS, 2026-10-24): 50 pass, 1 ignored (the real-archive
+ test that `scripts/e2e-updater-zst.mjs` runs).
## Rebase procedure (new upstream version X)
diff --git a/src-tauri/vendor/tauri-plugin-updater/ROSI.patch b/src-tauri/vendor/tauri-plugin-updater/ROSI.patch
index eb9547fd..63d9d46e 100644
--- a/src-tauri/vendor/tauri-plugin-updater/ROSI.patch
+++ b/src-tauri/vendor/tauri-plugin-updater/ROSI.patch
@@ -1,7 +1,21 @@
+diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/Cargo.toml b/Cargo.toml
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -187,6 +187,10 @@
+ [target.'cfg(target_os = "macos")'.dependencies.tar]
+ version = "0.4"
+
++[target.'cfg(target_os = "macos")'.dependencies.zstd]
++version = "0.13.3"
++default-features = false
++
+ [target.'cfg(target_os = "windows")'.dependencies.windows-sys]
+ version = "0.61.0"
+ features = [
diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/appimage_archive.rs b/src/appimage_archive.rs
--- a/src/appimage_archive.rs
+++ b/src/appimage_archive.rs
-@@ -0,0 +1,391 @@
+@@ -0,0 +1,397 @@
+// The AppImage helpers are compiled for macOS only because the shared module
+// list includes it; their callers are Linux and BSD only. Keep dead_code quiet there.
+#![cfg_attr(target_os = "macos", allow(dead_code))]
@@ -82,19 +96,12 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/app
+ // `tar::Archive` accepts EOF without an end marker. Drain the complete gzip
+ // stream, then require both tar zero blocks and validate CRC/trailer errors,
+ // hidden trailing entries, and decompression caps.
-+ decompressed.begin_trailer_check();
-+ io::copy(&mut decompressed, &mut io::sink()).map_err(|_| Error::InvalidUpdaterFormat)?;
-+ if !decompressed.reached_eof
-+ || decompressed.consecutive_zero_blocks < 2
-+ || decompressed.trailing_nonzero
-+ {
-+ return Err(Error::InvalidUpdaterFormat);
-+ }
++ decompressed.drain_and_check_trailer()?;
+
+ appimage.ok_or(Error::BinaryNotFoundInArchive)
+}
+
-+struct BoundedArchiveReader {
++pub(crate) struct BoundedArchiveReader {
+ inner: R,
+ max_bytes: u64,
+ bytes_read: u64,
@@ -107,7 +114,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/app
+}
+
+impl BoundedArchiveReader {
-+ fn new(inner: R, max_bytes: u64) -> Self {
++ pub(crate) fn new(inner: R, max_bytes: u64) -> Self {
+ Self {
+ inner,
+ max_bytes,
@@ -126,6 +133,19 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/app
+ }
+}
+
++impl BoundedArchiveReader {
++ /// Call after `tar::Archive` stops reading. Drains the rest of the stream,
++ /// then requires both tar end blocks and no nonzero trailing data.
++ pub(crate) fn drain_and_check_trailer(&mut self) -> Result<()> {
++ self.begin_trailer_check();
++ io::copy(self, &mut io::sink()).map_err(|_| Error::InvalidUpdaterFormat)?;
++ if !self.reached_eof || self.consecutive_zero_blocks < 2 || self.trailing_nonzero {
++ return Err(Error::InvalidUpdaterFormat);
++ }
++ Ok(())
++ }
++}
++
+impl Read for BoundedArchiveReader {
+ fn read(&mut self, buffer: &mut [u8]) -> io::Result {
+ if buffer.is_empty() {
@@ -140,7 +160,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/app
+ }
+ _ => Err(io::Error::new(
+ io::ErrorKind::InvalidData,
-+ "AppImage archive exceeds the decompressed size limit",
++ "updater archive exceeds the decompressed size limit",
+ )),
+ };
+ }
@@ -2630,7 +2650,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
const UPDATER_USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),);
/// The kind of bundle the running application was installed from.
-@@ -143,9 +168,10 @@
+@@ -143,9 +168,11 @@
}
}
@@ -2640,11 +2660,12 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+/// Function executed right before the updater is launched. Returning an error aborts the installation,
+/// keeping the downloaded update retryable. See [`UpdaterBuilder::on_before_exit`].
+pub type OnBeforeExit = Arc std::result::Result<(), String> + Send + Sync + 'static>;
++#[cfg(windows)]
+type OnWindowsInstallerLaunched = Arc;
/// Function that customizes the `reqwest` client builder used for the updater requests.
/// See [`UpdaterBuilder::configure_client`].
pub type OnBeforeRequest = Arc ClientBuilder + Send + Sync + 'static>;
-@@ -154,6 +180,75 @@
+@@ -154,6 +181,75 @@
/// It receives the current application version and the remote release,
/// and returns `true` when the release should be treated as an update.
pub type VersionComparator = Arc bool + Send + Sync>;
@@ -2720,7 +2741,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
#[cfg(target_os = "macos")]
type MainThreadClosure = Box;
#[cfg(target_os = "macos")]
-@@ -170,13 +265,16 @@
+@@ -170,13 +266,16 @@
/// App name, used for creating named tempfiles
#[cfg(windows)]
app_name: String,
@@ -2738,7 +2759,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
restart_after_install: bool,
}
-@@ -218,11 +316,13 @@
+@@ -218,11 +317,13 @@
run_on_main_thread,
#[cfg(windows)]
app_name: app.package_info().name.clone(),
@@ -2753,7 +2774,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
restart_after_install: true,
},
current_version: app.package_info().version.clone(),
-@@ -400,22 +500,34 @@
+@@ -400,22 +501,34 @@
self
}
@@ -2794,7 +2815,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
self
}
-@@ -453,6 +565,10 @@
+@@ -453,6 +566,10 @@
let arch = updater_arch().ok_or(Error::UnsupportedArch)?;
let executable_path = self.executable_path.clone().unwrap_or(current_exe()?);
@@ -2805,7 +2826,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
// Get the extract_path from the provided executable_path
let extract_path = if cfg!(target_os = "linux") {
-@@ -462,6 +578,7 @@
+@@ -462,6 +579,7 @@
};
Ok(Updater {
@@ -2813,7 +2834,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
current_version: self.current_version,
version_comparator: self.version_comparator,
timeout: self.timeout,
-@@ -495,6 +612,7 @@
+@@ -495,6 +613,7 @@
///
/// Get one from [`crate::UpdaterExt::updater`] or by calling [`UpdaterBuilder::build`].
pub struct Updater {
@@ -2821,7 +2842,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
current_version: Version,
version_comparator: Option,
timeout: Option,
-@@ -537,6 +655,27 @@
+@@ -537,6 +656,27 @@
headers.insert(ACCEPT, HeaderValue::from_static("application/json"));
}
@@ -2849,7 +2870,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
let target = self.current_target()?;
let mut remote_release: Option = None;
-@@ -726,6 +865,7 @@
+@@ -726,6 +866,7 @@
current_version: self.current_version.to_string(),
target: target.to_owned(),
extract_path: self.extract_path.clone(),
@@ -2857,7 +2878,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
version: release.version.to_string(),
date: release.pub_date,
download_url: download_url.clone(),
-@@ -807,6 +947,8 @@
+@@ -807,6 +948,8 @@
/// Extract path
#[allow(unused)]
extract_path: PathBuf,
@@ -2866,7 +2887,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
context: UpdaterContext,
}
-@@ -877,14 +1019,20 @@
+@@ -877,14 +1020,20 @@
.get("Content-Length")
.and_then(|value| value.to_str().ok())
.and_then(|value| value.parse().ok());
@@ -2888,7 +2909,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
on_download_finish();
-@@ -921,7 +1069,7 @@
+@@ -921,7 +1070,7 @@
pub fn install(&self, bytes: impl AsRef<[u8]>) -> Result<()> {
let bytes = bytes.as_ref();
self.verify(bytes)?;
@@ -2897,7 +2918,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
/// Downloads and installs the updater package
-@@ -935,9 +1083,8 @@
+@@ -935,9 +1084,8 @@
on_chunk: C,
on_download_finish: D,
) -> Result<()> {
@@ -2908,7 +2929,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
/// Updates are not supported on mobile, where apps are updated through the app stores.
-@@ -1014,10 +1161,6 @@
+@@ -1014,10 +1162,6 @@
let updater_type = self.extract(bytes)?;
@@ -2919,7 +2940,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
let file = match &updater_type {
WindowsUpdaterType::Nsis { path, .. } => path.as_os_str().to_os_string(),
-@@ -1033,7 +1176,7 @@
+@@ -1033,7 +1177,7 @@
let file = encode_wide(file);
let parameters = encode_wide(parameters);
@@ -2928,7 +2949,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
ShellExecuteW(
std::ptr::null_mut(),
w!("open"),
-@@ -1042,12 +1185,16 @@
+@@ -1042,12 +1186,16 @@
std::ptr::null(),
SW_SHOW,
)
@@ -2951,7 +2972,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
fn updater_parameters(&self, updater_type: &WindowsUpdaterType) -> OsString {
-@@ -1219,111 +1366,34 @@
+@@ -1219,113 +1367,36 @@
}
fn install_appimage(&self, bytes: &[u8]) -> Result<()> {
@@ -2979,7 +3000,8 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- log::error!("the update is neither an AppImage nor a compressed AppImage");
- return Err(Error::InvalidUpdaterFormat);
- }
--
++ let payload = bytes.to_vec();
+
- for tmp_dir_location in self.tmp_dir_locations() {
- let Some(tmp_dir_location) = tmp_dir_location() else {
- continue;
@@ -3054,27 +3076,15 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- Ok(_) => Ok(()),
- };
- }
-- }
--
-- Err(Error::TempDirNotOnSameMountPoint)
-- }
-+ let payload = bytes.to_vec();
-
-- /// Directories to try, in order, for the temporary files of an install: the system temporary
-- /// directory, the user cache directory and the directory holding the app.
-- fn tmp_dir_locations(&self) -> Vec Option + '_>> {
-- vec![
-- Box::new(|| Some(std::env::temp_dir())),
-- Box::new(dirs::cache_dir),
-- Box::new(|| self.extract_path.parent().map(Path::to_path_buf)),
-- ]
+ // Keep the recovery copy beside the installed image when possible so
+ // it survives ordinary `/tmp` cleanup and remains on the install
+ // filesystem for an atomic replacement.
+ let mut temporary_roots = Vec::new();
+ if let Some(parent) = self.extract_path.parent() {
+ temporary_roots.push(parent.to_path_buf());
-+ }
+ }
+-
+- Err(Error::TempDirNotOnSameMountPoint)
+ if let Some(cache_directory) = dirs::cache_dir() {
+ temporary_roots.push(cache_directory);
+ }
@@ -3088,8 +3098,20 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ Ok(())
}
+- /// Directories to try, in order, for the temporary files of an install: the system temporary
+- /// directory, the user cache directory and the directory holding the app.
+- fn tmp_dir_locations(&self) -> Vec Option + '_>> {
+- vec![
+- Box::new(|| Some(std::env::temp_dir())),
+- Box::new(dirs::cache_dir),
+- Box::new(|| self.extract_path.parent().map(Path::to_path_buf)),
+- ]
+- }
+-
fn install_deb(&self, bytes: &[u8]) -> Result<()> {
-@@ -1333,7 +1403,7 @@
+ // First verify the bytes are actually a .deb package
+ if !infer::archive::is_deb(bytes) {
+@@ -1333,7 +1404,7 @@
return Err(Error::InvalidUpdaterFormat);
}
@@ -3098,7 +3120,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
fn install_rpm(&self, bytes: &[u8]) -> Result<()> {
-@@ -1341,29 +1411,43 @@
+@@ -1341,29 +1412,43 @@
if !infer::archive::is_rpm(bytes) {
return Err(Error::InvalidUpdaterFormat);
}
@@ -3132,17 +3154,16 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- let prefix = format!("tauri_{package_extension}_update");
- if let Ok(tmp_dir) = tempfile::Builder::new().prefix(&prefix).tempdir_in(path) {
- let pkg_path = tmp_dir.path().join(format!("package.{package_extension}"));
--
-- // Try writing the .deb / .rpm file
-- if std::fs::write(&pkg_path, bytes).is_ok() {
-- // If write succeeds, proceed with installation
-- return self.try_install_with_privileges(&pkg_path, install_cmd, install_arg);
+ for tmp_dir_location in tmp_dir_locations {
+ if let Some(path) = tmp_dir_location() {
+ let prefix = format!("tauri_{package_extension}_update");
+ if let Ok(tmp_dir) = tempfile::Builder::new().prefix(&prefix).tempdir_in(path) {
+ let pkg_path = tmp_dir.path().join(format!("package.{package_extension}"));
-+
+
+- // Try writing the .deb / .rpm file
+- if std::fs::write(&pkg_path, bytes).is_ok() {
+- // If write succeeds, proceed with installation
+- return self.try_install_with_privileges(&pkg_path, install_cmd, install_arg);
+ // Try writing the .deb / .rpm file
+ if std::fs::write(&pkg_path, bytes).is_ok() {
+ // If write succeeds, proceed with installation
@@ -3156,7 +3177,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
// If write fails, continue to next temp location
}
-@@ -1377,68 +1461,78 @@
+@@ -1377,68 +1462,78 @@
&self,
pkg_path: &Path,
install_cmd: &str,
@@ -3198,13 +3219,6 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- log::debug!("installed {pkg_path:?} with GUI sudo");
- return Ok(());
- }
--
-- // 3. Final fallback: terminal sudo
-- let status = std::process::Command::new("sudo")
-- .arg(install_cmd)
-- .arg(install_arg)
-- .arg(pkg_path)
-- .status()?;
+ if let Some(sudo) = sudo.as_ref() {
+ if let Ok(password) = self.get_password_graphically() {
+ if self.install_with_sudo(sudo, &installer, pkg_path, &password, install_args)? {
@@ -3213,17 +3227,23 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ }
+ }
-- if status.success() {
-- log::debug!("installed {pkg_path:?} with sudo");
-- Ok(())
-- } else {
-- Err(Error::PackageInstallFailed)
+- // 3. Final fallback: terminal sudo
+- let status = std::process::Command::new("sudo")
+- .arg(install_cmd)
+- .arg(install_arg)
+- .arg(pkg_path)
+- .status()?;
+ // 3. Final fallback: terminal sudo
+ let mut command = linux_privileged_command(sudo);
+ command.arg(&installer).args(install_args).arg(pkg_path);
+ let status =
+ linux_privileged_wait_status(command, std::time::Duration::from_secs(600))?;
-+
+
+- if status.success() {
+- log::debug!("installed {pkg_path:?} with sudo");
+- Ok(())
+- } else {
+- Err(Error::PackageInstallFailed)
+ if status.success() {
+ log::debug!("installed {pkg_path:?} with sudo");
+ return Ok(());
@@ -3242,11 +3262,6 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- "--text=Enter your password to install the update:",
- ])
- .output();
--
-- if let Ok(output) = zenity_result
-- && output.status.success()
-- {
-- return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string());
+ if let Ok(zenity) = crate::install_safety::resolve_trusted_system_helper("zenity") {
+ let zenity_result = linux_privileged_command(&zenity)
+ .args([
@@ -3255,7 +3270,11 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ "--text=Enter your password to install the update:",
+ ])
+ .output();
-+
+
+- if let Ok(output) = zenity_result
+- && output.status.success()
+- {
+- return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string());
+ if let Ok(output) = zenity_result {
+ if output.status.success() {
+ return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string());
@@ -3267,16 +3286,15 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- let kdialog_result = std::process::Command::new("kdialog")
- .args(["--password", "Enter your password to install the update:"])
- .output();
--
-- if let Ok(output) = kdialog_result
-- && output.status.success()
-- {
-- return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string());
+ if let Ok(kdialog) = crate::install_safety::resolve_trusted_system_helper("kdialog") {
+ let kdialog_result = linux_privileged_command(&kdialog)
+ .args(["--password", "Enter your password to install the update:"])
+ .output();
-+
+
+- if let Ok(output) = kdialog_result
+- && output.status.success()
+- {
+- return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string());
+ if let Ok(output) = kdialog_result {
+ if output.status.success() {
+ return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string());
@@ -3285,7 +3303,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
Err(Error::AuthenticationFailed)
-@@ -1446,34 +1540,105 @@
+@@ -1446,34 +1541,105 @@
fn install_with_sudo(
&self,
@@ -3319,10 +3337,10 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ .stderr(Stdio::piped());
+ // Isolate the sudo/dpkg group so a timeout can kill the whole tree.
+ command.process_group(0);
-+
+
+ let mut child = command.spawn()?;
+ let pid = child.id();
-
++
if let Some(mut stdin) = child.stdin.take() {
- // Write password to stdin
writeln!(stdin, "{password}")?;
@@ -3402,7 +3420,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
/// MacOS
#[cfg(target_os = "macos")]
impl Update {
-@@ -1484,143 +1649,192 @@
+@@ -1484,143 +1650,192 @@
/// │ └── ...
/// └── ...
fn install_inner(&self, bytes: &[u8]) -> Result<()> {
@@ -3434,11 +3452,34 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- .flatten()
- .find(|dir| dir.metadata().is_ok_and(|m| m.dev() == app_dev))
- .ok_or(Error::TempDirNotOnSameMountPoint)?;
--
++ let app_parent = self
++ .extract_path
++ .parent()
++ .ok_or(Error::FailedToDetermineExtractPath)?;
++ let backup_path = macos_update_backup_path(&self.extract_path)
++ .ok_or(Error::FailedToDetermineExtractPath)?;
+
- let tmp_backup_dir = tempfile::Builder::new()
- .prefix("tauri_current_app")
- .tempdir_in(&tmp_root)?;
--
++ let expected_identity = MacosBundleIdentity {
++ bundle_identifier: self.context.bundle_identifier.clone(),
++ executable: self.executable_name.clone().ok_or_else(|| {
++ Error::Io(std::io::Error::new(
++ std::io::ErrorKind::InvalidData,
++ "could not determine the installed app executable name",
++ ))
++ })?,
++ };
++ if !macos_bundle_matches(&self.extract_path, &expected_identity)
++ && !macos_bundle_matches(&backup_path, &expected_identity)
++ {
++ return Err(Error::Io(std::io::Error::new(
++ std::io::ErrorKind::InvalidData,
++ "neither the installed app nor its recovery backup matches the configured app identity",
++ )));
++ }
+
- let tmp_extract_dir = tempfile::Builder::new()
- .prefix("tauri_updated_app")
- .tempdir_in(&tmp_root)?;
@@ -3455,16 +3496,39 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- // Ensure parent directories exist
- if let Some(parent) = extraction_path.parent() {
- std::fs::create_dir_all(parent)?;
-- }
--
++ let tmp_extract_dir = match tempfile::Builder::new()
++ .prefix(".rosi-updated-app-")
++ .tempdir_in(app_parent)
++ {
++ Ok(dir) => dir,
++ Err(err) if err.kind() == std::io::ErrorKind::PermissionDenied => {
++ // `/Applications` is not user-writable. Extract in a user temp
++ // dir; the privileged swap copies onto the app volume. Restore
++ // must never nest `mv` into a partial `$SRC`.
++ tempfile::Builder::new()
++ .prefix("tauri_updated_app")
++ .tempdir()?
+ }
++ Err(err) => return Err(err.into()),
++ };
+
- if let Err(err) = entry.unpack(&extraction_path) {
- // Cleanup on error
- std::fs::remove_dir_all(tmp_extract_dir.path()).ok();
- return Err(err.into());
- }
- extracted_files.push(extraction_path);
-- }
--
++ extract_macos_app_archive(bytes, tmp_extract_dir.path())?;
++ let staged_identity = macos_app_bundle_identity(tmp_extract_dir.path());
++ if !macos_app_bundle_complete(tmp_extract_dir.path())
++ || staged_identity.as_ref() != Some(&expected_identity)
++ {
++ return Err(Error::Io(std::io::Error::new(
++ std::io::ErrorKind::InvalidData,
++ "staged updater bundle is incomplete or has a different app identity",
++ )));
+ }
+
- // The temp dir becomes the installed bundle's root, and tempfile creates it
- // with mode 0700, which stops every other user of the machine from launching
- // the updated app.
@@ -3472,30 +3536,11 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- tmp_extract_dir.path(),
- std::fs::Permissions::from_mode(0o755),
- )?;
-+ let app_parent = self
-+ .extract_path
-+ .parent()
-+ .ok_or(Error::FailedToDetermineExtractPath)?;
-+ let backup_path = macos_update_backup_path(&self.extract_path)
-+ .ok_or(Error::FailedToDetermineExtractPath)?;
-+
-+ let expected_identity = MacosBundleIdentity {
-+ bundle_identifier: self.context.bundle_identifier.clone(),
-+ executable: self.executable_name.clone().ok_or_else(|| {
-+ Error::Io(std::io::Error::new(
-+ std::io::ErrorKind::InvalidData,
-+ "could not determine the installed app executable name",
-+ ))
-+ })?,
-+ };
-+ if !macos_bundle_matches(&self.extract_path, &expected_identity)
-+ && !macos_bundle_matches(&backup_path, &expected_identity)
-+ {
-+ return Err(Error::Io(std::io::Error::new(
-+ std::io::ErrorKind::InvalidData,
-+ "neither the installed app nor its recovery backup matches the configured app identity",
-+ )));
-+ }
++ // Recovery can mutate a protected install tree. Delay it until the
++ // downloaded bundle has passed identity and completeness validation,
++ // then route only permission failures through the existing admin path.
++ let recovery =
++ recover_macos_live_bundle(&self.extract_path, &backup_path, &expected_identity)?;
- // Exchange the current app and the new one in a single step where the file
- // system supports it, so the install path is never empty; the previous app
@@ -3509,22 +3554,9 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- Err(err) if err.kind() != std::io::ErrorKind::PermissionDenied => {
- log::debug!("cannot swap the app bundles ({err}), moving them instead");
- replace_bundle(&self.extract_path, tmp_extract_dir.path(), &backup)
-+ let tmp_extract_dir = match tempfile::Builder::new()
-+ .prefix(".rosi-updated-app-")
-+ .tempdir_in(app_parent)
-+ {
-+ Ok(dir) => dir,
-+ Err(err) if err.kind() == std::io::ErrorKind::PermissionDenied => {
-+ // `/Applications` is not user-writable. Extract in a user temp
-+ // dir; the privileged swap copies onto the app volume. Restore
-+ // must never nest `mv` into a partial `$SRC`.
-+ tempfile::Builder::new()
-+ .prefix("tauri_updated_app")
-+ .tempdir()?
- }
+- }
- other => other,
-+ Err(err) => return Err(err.into()),
- };
+- };
- let need_authorization = match moved {
- Ok(()) => false,
- Err(err) if err.kind() == std::io::ErrorKind::PermissionDenied => true,
@@ -3537,24 +3569,6 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- ) {
- log::error!("failed to install the update: {err}");
- return Err(Error::PreviousAppNotRestored(kept));
-+
-+ extract_macos_app_archive(bytes, tmp_extract_dir.path())?;
-+ let staged_identity = macos_app_bundle_identity(tmp_extract_dir.path());
-+ if !macos_app_bundle_complete(tmp_extract_dir.path())
-+ || staged_identity.as_ref() != Some(&expected_identity)
-+ {
-+ return Err(Error::Io(std::io::Error::new(
-+ std::io::ErrorKind::InvalidData,
-+ "staged updater bundle is incomplete or has a different app identity",
-+ )));
-+ }
-+
-+ // Recovery can mutate a protected install tree. Delay it until the
-+ // downloaded bundle has passed identity and completeness validation,
-+ // then route only permission failures through the existing admin path.
-+ let recovery =
-+ recover_macos_live_bundle(&self.extract_path, &backup_path, &expected_identity)?;
-+
+ let unprivileged = if matches!(recovery, MacosRecoveryDisposition::RequiresPrivilegedSwap) {
+ // A validated recovery entry can live in a protected install
+ // directory. Keep it untouched until the staged bundle is fully
@@ -3721,7 +3735,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
let _ = std::process::Command::new("touch")
-@@ -1631,115 +1845,262 @@
+@@ -1631,115 +1846,299 @@
}
}
@@ -3732,14 +3746,6 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
-fn swap_bundle(target: &Path, staged: &Path) -> std::io::Result<()> {
- use std::ffi::CString;
- use std::os::unix::ffi::OsStrExt;
--
-- let from = CString::new(staged.as_os_str().as_bytes())?;
-- let to = CString::new(target.as_os_str().as_bytes())?;
-- // SAFETY: both pointers are valid NUL-terminated strings that outlive the call,
-- // and `renamex_np` only reads them.
-- let result = unsafe { libc::renamex_np(from.as_ptr(), to.as_ptr(), libc::RENAME_SWAP) };
-- if result == 0 {
-- Ok(())
+fn macos_bundle_matches(
+ path: &Path,
+ expected: &crate::install_safety::MacosBundleIdentity,
@@ -3747,7 +3753,14 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ crate::install_safety::macos_app_bundle_complete(path)
+ && crate::install_safety::macos_app_bundle_identity(path).as_ref() == Some(expected)
+}
-+
+
+- let from = CString::new(staged.as_os_str().as_bytes())?;
+- let to = CString::new(target.as_os_str().as_bytes())?;
+- // SAFETY: both pointers are valid NUL-terminated strings that outlive the call,
+- // and `renamex_np` only reads them.
+- let result = unsafe { libc::renamex_np(from.as_ptr(), to.as_ptr(), libc::RENAME_SWAP) };
+- if result == 0 {
+- Ok(())
+#[cfg(target_os = "macos")]
+fn remove_macos_bundle_entry(path: &Path) -> std::io::Result<()> {
+ let metadata = match std::fs::symlink_metadata(path) {
@@ -3783,7 +3796,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ std::io::ErrorKind::InvalidData,
+ "refusing to retire an incomplete or identity-mismatched updater backup",
+ ));
-+ }
+ }
+ let parent = backup.parent().ok_or_else(|| {
+ std::io::Error::new(
+ std::io::ErrorKind::InvalidInput,
@@ -3842,7 +3855,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ return Ok(());
+ }
+ return Err(error);
- }
++ }
+
Ok(())
}
@@ -3852,25 +3865,11 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
-/// Automation can call `renamex_np` (`2` is `RENAME_SWAP`), and ships with every macOS.
-/// It prints `swapped` or `failed`, so the caller can tell a swap that did not happen
-/// from an `osascript` failure that leaves unknown whether it did.
--#[cfg(target_os = "macos")]
+ #[cfg(target_os = "macos")]
-const SWAP_BUNDLE_JXA: &str = r#"function run(argv) {
- ObjC.import("stdio");
- return $.renamex_np(argv[0], argv[1], 2) === 0 ? "swapped" : "failed";
-}"#;
--
--/// The shell command the privileged install runs: the same swap as [`swap_bundle`], and
--/// where the file system cannot swap, the same moves as [`replace_bundle`], deleting the
--/// previous app only once the new one is in place. The moves only run once the swap is
--/// known not to have happened, since after a swap they would put the previous app back.
- #[cfg(target_os = "macos")]
--fn privileged_install_command(target: &Path, staged: &Path, backup: &Path) -> String {
-- let swap = sh_quote(Path::new(SWAP_BUNDLE_JXA));
-- let target = sh_quote(target);
-- let staged = sh_quote(staged);
-- let backup = sh_quote(backup);
-- format!(
-- "case \"$(/usr/bin/osascript -l JavaScript -e {swap} {staged} {target} 2>/dev/null)\" in swapped) rm -rf {staged};; failed) mv -f {target} {backup} && {{ mv -f {staged} {target} || {{ mv -f {backup} {target}; exit 1; }}; }} && rm -rf {backup};; *) exit 1;; esac"
-- )
+fn restore_macos_live_bundle(
+ live: &Path,
+ backup: &Path,
@@ -3891,22 +3890,31 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ ));
+ }
+ Ok(())
- }
++}
--/// Quotes `path` as a single `sh` word, whatever characters it holds.
+-/// The shell command the privileged install runs: the same swap as [`swap_bundle`], and
+-/// where the file system cannot swap, the same moves as [`replace_bundle`], deleting the
+-/// previous app only once the new one is in place. The moves only run once the swap is
+-/// known not to have happened, since after a swap they would put the previous app back.
#[cfg(target_os = "macos")]
--fn sh_quote(path: &Path) -> String {
-- format!("'{}'", path.to_string_lossy().replace('\'', r"'\''"))
+-fn privileged_install_command(target: &Path, staged: &Path, backup: &Path) -> String {
+- let swap = sh_quote(Path::new(SWAP_BUNDLE_JXA));
+- let target = sh_quote(target);
+- let staged = sh_quote(staged);
+- let backup = sh_quote(backup);
+- format!(
+- "case \"$(/usr/bin/osascript -l JavaScript -e {swap} {staged} {target} 2>/dev/null)\" in swapped) rm -rf {staged};; failed) mv -f {target} {backup} && {{ mv -f {staged} {target} || {{ mv -f {backup} {target}; exit 1; }}; }} && rm -rf {backup};; *) exit 1;; esac"
+- )
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+enum MacosRecoveryDisposition {
+ ReadyForUnprivilegedSwap,
+ RequiresPrivilegedSwap,
}
--/// Quotes `s` as an AppleScript string literal.
+-/// Quotes `path` as a single `sh` word, whatever characters it holds.
#[cfg(target_os = "macos")]
--fn applescript_string(s: &str) -> String {
-- format!("\"{}\"", s.replace('\\', r"\\").replace('"', "\\\""))
+-fn sh_quote(path: &Path) -> String {
+- format!("'{}'", path.to_string_lossy().replace('\'', r"'\''"))
+fn recover_macos_live_bundle(
+ live: &Path,
+ backup: &Path,
@@ -3952,6 +3960,14 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ )))
}
+-/// Quotes `s` as an AppleScript string literal.
+ #[cfg(target_os = "macos")]
+-fn applescript_string(s: &str) -> String {
+- format!("\"{}\"", s.replace('\\', r"\\").replace('"', "\\\""))
++fn extract_macos_app_archive(bytes: &[u8], dest_root: &Path) -> Result<()> {
++ extract_macos_app_archive_with_limit(bytes, dest_root, MACOS_MAX_DECOMPRESSED_BYTES)
+ }
+
-/// After a failed install, returns where the previous app is if it never made it back to
-/// `target`. `backup` is then the only copy left, and usually sits in the system temp dir,
-/// which macOS empties on its own, so it is moved next to `target`, or to `fallback_dir`
@@ -3967,13 +3983,30 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- if std::fs::symlink_metadata(target).is_ok() || std::fs::symlink_metadata(backup).is_err() {
- return None;
- }
--
++/// Upper bound for an extracted `.app` (a universal ROSI bundle is ~300 MB).
++#[cfg(target_os = "macos")]
++const MACOS_MAX_DECOMPRESSED_BYTES: u64 = 2 * 1024 * 1024 * 1024;
++/// Per-arch `.app.tar.zst` archives are packed with `zstd --long=27`. Refuse
++/// frames that ask for a larger window instead of allocating it.
++#[cfg(target_os = "macos")]
++const MACOS_ZSTD_WINDOW_LOG_MAX: u32 = 27;
+
- let mut name = target.file_stem().unwrap_or_default().to_os_string();
- name.push(" (previous version)");
- if let Some(extension) = target.extension() {
- name.push(".");
- name.push(extension);
-- }
++/// `.app.tar.gz` (Tauri) or `.app.tar.zst` (ROSI per-arch), chosen by magic bytes.
++#[cfg(target_os = "macos")]
++fn macos_archive_decoder<'a>(bytes: &'a [u8]) -> Result> {
++ const GZIP_MAGIC: [u8; 2] = [0x1f, 0x8b];
++ const ZSTD_MAGIC: [u8; 4] = [0x28, 0xb5, 0x2f, 0xfd];
++ let reader = std::io::Cursor::new(bytes);
++ if bytes.starts_with(&ZSTD_MAGIC) {
++ let mut decoder = zstd::stream::read::Decoder::new(reader)?;
++ decoder.window_log_max(MACOS_ZSTD_WINDOW_LOG_MAX)?;
++ return Ok(Box::new(decoder));
+ }
- let kept = [target.parent(), fallback_dir]
- .into_iter()
- .flatten()
@@ -3981,23 +4014,33 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- // `rename` replaces an empty directory, so never move onto anything already there
- .filter(|kept| std::fs::symlink_metadata(kept).is_err())
- .find(|kept| std::fs::rename(backup, kept).is_ok());
--
++ if bytes.starts_with(&GZIP_MAGIC) {
++ return Ok(Box::new(flate2::read::GzDecoder::new(reader)));
++ }
++ Err(Error::InvalidUpdaterFormat)
++}
+
- match kept {
- Some(kept) => Some(kept),
- None => {
- let _ = backup_dir.keep();
- Some(backup.to_path_buf())
+#[cfg(target_os = "macos")]
-+fn extract_macos_app_archive(bytes: &[u8], dest_root: &Path) -> Result<()> {
++fn extract_macos_app_archive_with_limit(
++ bytes: &[u8],
++ dest_root: &Path,
++ max_decompressed_bytes: u64,
++) -> Result<()> {
++ use self::appimage_archive::BoundedArchiveReader;
+ use crate::install_safety::{
+ confined_symlink_target, confined_tar_member_relative, create_confined_parent_dirs,
+ path_is_inside,
+ };
-+ use flate2::read::GzDecoder;
+ use tar::EntryType;
+
-+ let decoder = GzDecoder::new(Cursor::new(bytes));
-+ let mut archive = tar::Archive::new(decoder);
++ let mut decompressed =
++ BoundedArchiveReader::new(macos_archive_decoder(bytes)?, max_decompressed_bytes);
++ let mut archive = tar::Archive::new(&mut decompressed);
+ for entry in archive.entries()? {
+ let mut entry = entry?;
+ let entry_path = entry.path()?.into_owned();
@@ -4009,7 +4052,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ })?;
+ if relative.as_os_str().is_empty() {
+ continue;
-+ }
+ }
+ let dest = dest_root.join(&relative);
+ if !path_is_inside(dest_root, &dest) {
+ return Err(Error::Io(std::io::Error::new(
@@ -4058,7 +4101,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ Err(err) => return Err(err.into()),
+ }
+ continue;
- }
++ }
+ if kind.is_file() || matches!(kind, EntryType::GNUSparse) {
+ create_confined_parent_dirs(dest_root, &dest)?;
+ entry.unpack(&dest)?;
@@ -4069,11 +4112,13 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ format!("unsupported updater archive member type {kind:?}"),
+ )));
}
-+ Ok(())
++ // A truncated stream can end on a member boundary, which `tar::Archive`
++ // accepts. Require the full stream, both end blocks and nothing after them.
++ decompressed.drain_and_check_trailer()
}
/// Gets the base target string used by the updater. If bundle type is available it
-@@ -1985,48 +2346,6 @@
+@@ -1985,49 +2384,7 @@
.collect()
}
@@ -4081,7 +4126,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
-///
-/// `ShellExecuteW` reports failures through its return value, not reliably through
-/// `GetLastError`.
--#[cfg(windows)]
+ #[cfg(windows)]
-fn shell_execute_error(code: isize) -> std::io::Error {
- use std::io::{Error, ErrorKind};
- use windows_sys::Win32::{
@@ -4119,10 +4164,11 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- }
-}
-
- #[cfg(windows)]
+-#[cfg(windows)]
trait PathExt {
fn wrap_in_quotes(&self) -> Self;
-@@ -2116,13 +2435,13 @@
+ }
+@@ -2116,13 +2473,13 @@
// A throwaway key pair generated with `tauri signer generate`, and the signature of the
// payload `test` made with `tauri signer sign --app-version 2.0.0`.
@@ -4139,7 +4185,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
base64::engine::general_purpose::STANDARD.encode(value)
}
-@@ -2344,15 +2663,22 @@
+@@ -2344,15 +2701,22 @@
assert!(restored.context.config.require_signed_version);
}
@@ -4165,7 +4211,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
let update = builder()
.executable_path(&appimage)
.build()
-@@ -2363,12 +2689,9 @@
+@@ -2363,12 +2727,9 @@
(dir, appimage, update)
}
@@ -4179,7 +4225,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
#[cfg(all(target_os = "linux", feature = "zip"))]
-@@ -2389,11 +2712,12 @@
+@@ -2389,11 +2750,12 @@
#[cfg(target_os = "linux")]
fn appimage_install_rejects_a_payload_that_is_not_an_appimage() {
let (_dir, appimage, update) = appimage_update();
@@ -4194,7 +4240,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
#[test]
-@@ -2402,7 +2726,6 @@
+@@ -2402,7 +2764,6 @@
use std::os::unix::fs::PermissionsExt;
let (_dir, appimage, update) = appimage_update();
@@ -4202,7 +4248,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
update.install_appimage(&new_appimage()).unwrap();
assert_eq!(std::fs::read(&appimage).unwrap(), new_appimage());
assert_eq!(
-@@ -2429,7 +2752,7 @@
+@@ -2429,7 +2790,7 @@
update.install_appimage(&compressed_appimage("readme.txt", b"hello")),
Err(Error::BinaryNotFoundInArchive)
));
@@ -4211,7 +4257,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
#[test]
-@@ -2441,7 +2764,7 @@
+@@ -2441,7 +2802,7 @@
update.install_appimage(b"\x1f\x8b\x08\x00 compressed AppImage"),
Err(Error::InvalidUpdaterFormat)
));
@@ -4220,7 +4266,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
}
-@@ -2501,277 +2824,119 @@
+@@ -2501,280 +2862,122 @@
assert!(verify_signed_version(comment, "2024-01-02", true).is_err());
}
@@ -4234,7 +4280,13 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- std::fs::write(target.join("version"), "old").unwrap();
- std::fs::create_dir(&staged).unwrap();
- std::fs::write(staged.join("version"), "new").unwrap();
--
++ use super::{finish_windows_installer_launch, OnBeforeExit, Update, UpdaterContext};
++ use crate::Config;
++ use std::sync::{
++ atomic::{AtomicUsize, Ordering},
++ Arc,
++ };
+
- super::replace_bundle(&target, &staged, &backup).unwrap();
-
- assert_eq!(
@@ -4260,13 +4312,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- let name = unsafe { std::ffi::CStr::from_ptr(stat.f_fstypename.as_ptr()) };
- name.to_bytes() == b"apfs"
- }
-+ use super::{finish_windows_installer_launch, OnBeforeExit, Update, UpdaterContext};
-+ use crate::Config;
-+ use std::sync::{
-+ atomic::{AtomicUsize, Ordering},
-+ Arc,
-+ };
-
+-
- #[test]
- #[cfg(target_os = "macos")]
- fn swap_bundle_exchanges_the_two_bundles_in_place() {
@@ -4362,7 +4408,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
);
- assert!(!backup.exists());
- }
--
+
- /// A directory whose name `sh` and AppleScript would both misread unquoted.
- #[cfg(target_os = "macos")]
- fn hostile_dir() -> tempfile::TempDir {
@@ -4370,7 +4416,16 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- .prefix("it's \"a\" \\ $(touch pwned) `dir`\n")
- .tempdir()
- .unwrap()
-- }
++ let error = update
++ .install(b"test")
++ .expect_err("a failed pre-install hook must reject the actual install call");
++ assert!(matches!(
++ error,
++ Error::BeforeExit(message) if message == "round2 forced durable-state flush failure"
++ ));
++ assert_eq!(hook_calls.load(Ordering::SeqCst), 1);
++ assert_eq!(cleanup_calls.load(Ordering::SeqCst), 0);
+ }
- #[cfg(target_os = "macos")]
- fn assert_privileged_install_command_moved(dir: &std::path::Path) {
@@ -4395,7 +4450,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- super::privileged_install_command(&target, &staged, &dir.join("backup"))
- }
-
-- #[test]
+ #[test]
- #[cfg(target_os = "macos")]
- fn privileged_install_command_quotes_every_path() {
- let dir = hostile_dir();
@@ -4430,26 +4485,27 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- .output()
- .unwrap();
-
-- assert!(
++ fn round2_windows_cleanup_runs_only_after_a_successful_installer_launch() {
++ let events = std::cell::RefCell::new(Vec::new());
++ let failure = finish_windows_installer_launch(
++ 32,
++ || events.borrow_mut().push("cleanup"),
++ || events.borrow_mut().push("exit"),
++ );
++ assert!(failure.is_err());
+ assert!(
- output.status.success(),
- "{}",
- String::from_utf8_lossy(&output.stderr)
-- );
++ events.borrow().is_empty(),
++ "failed launch must preserve Tauri resources"
+ );
- assert_privileged_install_command_moved(dir.path());
-+ let error = update
-+ .install(b"test")
-+ .expect_err("a failed pre-install hook must reject the actual install call");
-+ assert!(matches!(
-+ error,
-+ Error::BeforeExit(message) if message == "round2 forced durable-state flush failure"
-+ ));
-+ assert_eq!(hook_calls.load(Ordering::SeqCst), 1);
-+ assert_eq!(cleanup_calls.load(Ordering::SeqCst), 0);
- }
+- }
- /// The privileged install swaps the bundles where the file system can, so on APFS it
- /// never touches the backup: one in a directory that does not exist must not matter.
- #[test]
+- #[test]
- #[cfg(target_os = "macos")]
- fn privileged_install_command_swaps_the_bundles() {
- let dir = tempfile::tempdir().unwrap();
@@ -4474,17 +4530,18 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- assert_eq!(
- std::fs::read_to_string(target.join("version")).unwrap(),
- "new"
-+ fn round2_windows_cleanup_runs_only_after_a_successful_installer_launch() {
-+ let events = std::cell::RefCell::new(Vec::new());
-+ let failure = finish_windows_installer_launch(
-+ 32,
+- );
+- assert!(!staged.exists());
++ finish_windows_installer_launch(
++ 33,
+ || events.borrow_mut().push("cleanup"),
+ || events.borrow_mut().push("exit"),
- );
-- assert!(!staged.exists());
-- }
--
-- #[test]
++ )
++ .expect("successful launch must finish cleanup and exit sequence");
++ assert_eq!(&*events.borrow(), &["cleanup", "exit"]);
+ }
+
+ #[test]
- fn keeps_the_backup_when_the_previous_app_was_not_restored() {
- let dir = tempfile::tempdir().unwrap();
- let target = dir.path().join("App.app");
@@ -4501,15 +4558,19 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- assert_eq!(
- std::fs::read_to_string(expected.join("version")).unwrap(),
- "old"
-+ assert!(failure.is_err());
-+ assert!(
-+ events.borrow().is_empty(),
-+ "failed launch must preserve Tauri resources"
- );
+- );
- assert!(!backup_dir_path.exists());
-- }
++ fn round2_download_cap_rejects_oversize_chunks_without_content_length() {
++ let mut received = Vec::new();
++ super::append_download_chunk(&mut received, b"123", None, 4)
++ .expect("under-limit chunk should be accepted without a length header");
++ let error = super::append_download_chunk(&mut received, b"45", None, 4)
++ .expect_err("actual streamed size must be capped without Content-Length");
++ assert!(error.to_string().contains("package exceeds"));
++ assert_eq!(received, b"123", "over-limit bytes must not be buffered");
+ }
-- #[test]
+ #[test]
- fn moves_the_backup_to_the_fallback_dir_when_it_cannot_go_next_to_the_app() {
- let dir = tempfile::tempdir().unwrap();
- let target = dir.path().join("App.app");
@@ -4529,13 +4590,11 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- std::fs::read_to_string(expected.join("version")).unwrap(),
- "old"
- );
-+ finish_windows_installer_launch(
-+ 33,
-+ || events.borrow_mut().push("cleanup"),
-+ || events.borrow_mut().push("exit"),
-+ )
-+ .expect("successful launch must finish cleanup and exit sequence");
-+ assert_eq!(&*events.borrow(), &["cleanup", "exit"]);
++ fn round2_download_cap_rejects_declared_oversize_and_actual_oversize() {
++ let mut received = Vec::new();
++ assert!(super::validate_download_content_length(Some(5), 4).is_err());
++ assert!(super::append_download_chunk(&mut received, b"12345", Some(1), 4).is_err());
++ assert!(received.is_empty(), "rejected bytes must not be buffered");
}
#[test]
@@ -4562,17 +4621,9 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- std::fs::read_to_string(dir.path().join("App (previous version).app")).unwrap(),
- "other"
- );
-+ fn round2_download_cap_rejects_oversize_chunks_without_content_length() {
-+ let mut received = Vec::new();
-+ super::append_download_chunk(&mut received, b"123", None, 4)
-+ .expect("under-limit chunk should be accepted without a length header");
-+ let error = super::append_download_chunk(&mut received, b"45", None, 4)
-+ .expect_err("actual streamed size must be capped without Content-Length");
-+ assert!(error.to_string().contains("package exceeds"));
-+ assert_eq!(received, b"123", "over-limit bytes must not be buffered");
- }
-
- #[test]
+- }
+-
+- #[test]
- fn drops_the_backup_when_the_previous_app_is_in_place() {
- let dir = tempfile::tempdir().unwrap();
- let target = dir.path().join("App.app");
@@ -4584,18 +4635,18 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
-
- assert!(super::keep_backup_if_not_restored(&target, backup_dir, &backup, None).is_none());
- assert!(!backup_dir_path.exists());
-+ fn round2_download_cap_rejects_declared_oversize_and_actual_oversize() {
-+ let mut received = Vec::new();
-+ assert!(super::validate_download_content_length(Some(5), 4).is_err());
-+ assert!(super::append_download_chunk(&mut received, b"12345", Some(1), 4).is_err());
-+ assert!(received.is_empty(), "rejected bytes must not be buffered");
- }
+- }
+-
+- #[test]
+ #[cfg(windows)]
+ fn it_wraps_correctly() {
+ use super::PathExt;
+@@ -2874,6 +3077,195 @@
- #[test]
-@@ -2876,4 +3041,45 @@
+ for (orig, escaped) in cases.iter().zip(cases_escaped) {
assert_eq!(escape_nsis_current_exe_arg(OsStr::new(orig)), escaped);
- }
- }
++ }
++ }
+
+ #[test]
+ fn macos_admin_install_script_quotes_paths_via_handler_args() {
@@ -4637,4 +4688,152 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ "malicious path must stay outside the constant script body"
+ );
+ }
++}
++
++// e2e/updater-zst.failure-modes.md, Z01.
++#[cfg(all(test, target_os = "macos"))]
++mod macos_archive_tests {
++ use super::{extract_macos_app_archive, extract_macos_app_archive_with_limit};
++ use crate::error::Error;
++ use std::io::Write;
++ use tar::{EntryType, Header};
++
++ const EXECUTABLE: &str = "ROSI.app/Contents/MacOS/ROSI";
++
++ fn app_tar(payload: &[u8]) -> Vec {
++ let mut builder = tar::Builder::new(Vec::new());
++ for dir in ["ROSI.app/", "ROSI.app/Contents/", "ROSI.app/Contents/MacOS/"] {
++ let mut header = Header::new_gnu();
++ header.set_entry_type(EntryType::Directory);
++ header.set_mode(0o755);
++ header.set_size(0);
++ header.set_cksum();
++ builder.append_data(&mut header, dir, &[][..]).unwrap();
++ }
++ let mut header = Header::new_gnu();
++ header.set_entry_type(EntryType::Regular);
++ header.set_mode(0o755);
++ header.set_size(payload.len() as u64);
++ header.set_cksum();
++ builder.append_data(&mut header, EXECUTABLE, payload).unwrap();
++ builder.into_inner().unwrap()
++ }
++
++ fn gzip(raw: &[u8]) -> Vec {
++ let mut encoder =
++ flate2::write::GzEncoder::new(Vec::new(), flate2::Compression::default());
++ encoder.write_all(raw).unwrap();
++ encoder.finish().unwrap()
++ }
++
++ fn zstd_with_window_log(raw: &[u8], window_log: u32) -> Vec {
++ let mut encoder = zstd::stream::write::Encoder::new(Vec::new(), 3).unwrap();
++ encoder.long_distance_matching(true).unwrap();
++ encoder.window_log(window_log).unwrap();
++ encoder.write_all(raw).unwrap();
++ encoder.finish().unwrap()
++ }
++
++ fn zstd(raw: &[u8]) -> Vec {
++ zstd_with_window_log(raw, 27)
++ }
++
++ fn extracted_executable(archive: &[u8]) -> crate::Result> {
++ let dir = tempfile::tempdir().unwrap();
++ extract_macos_app_archive(archive, dir.path())?;
++ Ok(std::fs::read(dir.path().join("Contents/MacOS/ROSI")).unwrap())
++ }
++
++ #[test]
++ fn gzip_and_zstd_archives_extract_the_same_bundle() {
++ let payload = b"\xcf\xfa\xed\xfe rosi executable".repeat(64);
++ let raw = app_tar(&payload);
++ assert_eq!(extracted_executable(&gzip(&raw)).unwrap(), payload);
++ assert_eq!(extracted_executable(&zstd(&raw)).unwrap(), payload);
++ }
++
++ #[test]
++ fn rejects_a_truncated_zstd_archive() {
++ let archive = zstd(&app_tar(&[7_u8; 64 * 1024]));
++ let truncated = &archive[..archive.len() / 2];
++ assert!(extracted_executable(truncated).is_err());
++ }
++
++ #[test]
++ fn rejects_a_zstd_window_larger_than_the_cap() {
++ // The frame header asks for a 256 MiB window; the content stays small.
++ let archive = zstd_with_window_log(&app_tar(b"payload"), 28);
++ assert!(extracted_executable(&archive).is_err());
++ }
++
++ #[test]
++ fn stops_a_decompression_bomb_at_the_cap() {
++ let archive = zstd(&app_tar(&vec![0_u8; 4 * 1024 * 1024]));
++ assert!(archive.len() < 64 * 1024, "fixture must compress well");
++ let dir = tempfile::tempdir().unwrap();
++ assert!(extract_macos_app_archive_with_limit(&archive, dir.path(), 1024 * 1024).is_err());
++ }
++
++ #[test]
++ fn rejects_trailing_data_after_the_zstd_frame() {
++ let mut archive = zstd(&app_tar(b"payload"));
++ archive.extend_from_slice(b"not a zstd frame");
++ assert!(extracted_executable(&archive).is_err());
++ }
++
++ #[test]
++ fn rejects_a_tar_stream_without_end_blocks() {
++ let mut raw = app_tar(b"payload");
++ raw.truncate(raw.len() - 1024);
++ assert!(extracted_executable(&zstd(&raw)).is_err());
++ assert!(extracted_executable(&gzip(&raw)).is_err());
++ }
++
++ #[test]
++ fn rejects_unknown_archive_magic() {
++ let raw = app_tar(b"payload");
++ assert!(matches!(
++ extracted_executable(&raw),
++ Err(Error::InvalidUpdaterFormat)
++ ));
++ }
++
++ #[test]
++ fn keeps_member_confinement_for_zstd_archives() {
++ let mut raw = Vec::new();
++ let mut header = Header::new_gnu();
++ header.set_entry_type(EntryType::Regular);
++ header.set_mode(0o644);
++ header.set_size(1);
++ // `set_path` refuses `..`; write the name bytes directly.
++ header.as_gnu_mut().unwrap().name[..17].copy_from_slice(b"ROSI.app/../../x\0");
++ header.set_cksum();
++ raw.extend_from_slice(header.as_bytes());
++ raw.extend_from_slice(&[b'x'; 512]);
++ raw.extend_from_slice(&[0_u8; 1024]);
++ assert!(extracted_executable(&zstd(&raw)).is_err());
++ }
++
++ /// Run by scripts/e2e-updater-zst.mjs against real release archives.
++ #[test]
++ #[ignore = "needs ROSI_UPDATER_ZST_E2E_ARCHIVES"]
++ fn extracts_real_release_archives() {
++ let paths = std::env::var("ROSI_UPDATER_ZST_E2E_ARCHIVES")
++ .expect("ROSI_UPDATER_ZST_E2E_ARCHIVES lists archives separated by ':'");
++ for path in paths.split(':').filter(|p| !p.is_empty()) {
++ let bytes = std::fs::read(path).unwrap();
++ let dir = tempfile::tempdir().unwrap();
++ let started = std::time::Instant::now();
++ extract_macos_app_archive(&bytes, dir.path())
++ .unwrap_or_else(|err| panic!("{path}: {err}"));
++ assert!(
++ crate::install_safety::macos_app_bundle_complete(dir.path()),
++ "{path}: extracted bundle is incomplete"
++ );
++ println!(
++ "ROSI_UPDATER_ZST_E2E {path} extract_ms={}",
++ started.elapsed().as_millis()
++ );
+ }
+ }
}
diff --git a/src-tauri/vendor/tauri-plugin-updater/src/appimage_archive.rs b/src-tauri/vendor/tauri-plugin-updater/src/appimage_archive.rs
index fb00205f..edac1b08 100644
--- a/src-tauri/vendor/tauri-plugin-updater/src/appimage_archive.rs
+++ b/src-tauri/vendor/tauri-plugin-updater/src/appimage_archive.rs
@@ -78,19 +78,12 @@ fn extract_appimage_from_archive_with_limits(
// `tar::Archive` accepts EOF without an end marker. Drain the complete gzip
// stream, then require both tar zero blocks and validate CRC/trailer errors,
// hidden trailing entries, and decompression caps.
- decompressed.begin_trailer_check();
- io::copy(&mut decompressed, &mut io::sink()).map_err(|_| Error::InvalidUpdaterFormat)?;
- if !decompressed.reached_eof
- || decompressed.consecutive_zero_blocks < 2
- || decompressed.trailing_nonzero
- {
- return Err(Error::InvalidUpdaterFormat);
- }
+ decompressed.drain_and_check_trailer()?;
appimage.ok_or(Error::BinaryNotFoundInArchive)
}
-struct BoundedArchiveReader {
+pub(crate) struct BoundedArchiveReader {
inner: R,
max_bytes: u64,
bytes_read: u64,
@@ -103,7 +96,7 @@ struct BoundedArchiveReader {
}
impl BoundedArchiveReader {
- fn new(inner: R, max_bytes: u64) -> Self {
+ pub(crate) fn new(inner: R, max_bytes: u64) -> Self {
Self {
inner,
max_bytes,
@@ -122,6 +115,19 @@ impl BoundedArchiveReader {
}
}
+impl BoundedArchiveReader {
+ /// Call after `tar::Archive` stops reading. Drains the rest of the stream,
+ /// then requires both tar end blocks and no nonzero trailing data.
+ pub(crate) fn drain_and_check_trailer(&mut self) -> Result<()> {
+ self.begin_trailer_check();
+ io::copy(self, &mut io::sink()).map_err(|_| Error::InvalidUpdaterFormat)?;
+ if !self.reached_eof || self.consecutive_zero_blocks < 2 || self.trailing_nonzero {
+ return Err(Error::InvalidUpdaterFormat);
+ }
+ Ok(())
+ }
+}
+
impl Read for BoundedArchiveReader {
fn read(&mut self, buffer: &mut [u8]) -> io::Result {
if buffer.is_empty() {
@@ -136,7 +142,7 @@ impl Read for BoundedArchiveReader {
}
_ => Err(io::Error::new(
io::ErrorKind::InvalidData,
- "AppImage archive exceeds the decompressed size limit",
+ "updater archive exceeds the decompressed size limit",
)),
};
}
diff --git a/src-tauri/vendor/tauri-plugin-updater/src/updater.rs b/src-tauri/vendor/tauri-plugin-updater/src/updater.rs
index 98967429..49777dea 100644
--- a/src-tauri/vendor/tauri-plugin-updater/src/updater.rs
+++ b/src-tauri/vendor/tauri-plugin-updater/src/updater.rs
@@ -2021,15 +2021,50 @@ fn recover_macos_live_bundle(
#[cfg(target_os = "macos")]
fn extract_macos_app_archive(bytes: &[u8], dest_root: &Path) -> Result<()> {
+ extract_macos_app_archive_with_limit(bytes, dest_root, MACOS_MAX_DECOMPRESSED_BYTES)
+}
+
+/// Upper bound for an extracted `.app` (a universal ROSI bundle is ~300 MB).
+#[cfg(target_os = "macos")]
+const MACOS_MAX_DECOMPRESSED_BYTES: u64 = 2 * 1024 * 1024 * 1024;
+/// Per-arch `.app.tar.zst` archives are packed with `zstd --long=27`. Refuse
+/// frames that ask for a larger window instead of allocating it.
+#[cfg(target_os = "macos")]
+const MACOS_ZSTD_WINDOW_LOG_MAX: u32 = 27;
+
+/// `.app.tar.gz` (Tauri) or `.app.tar.zst` (ROSI per-arch), chosen by magic bytes.
+#[cfg(target_os = "macos")]
+fn macos_archive_decoder<'a>(bytes: &'a [u8]) -> Result> {
+ const GZIP_MAGIC: [u8; 2] = [0x1f, 0x8b];
+ const ZSTD_MAGIC: [u8; 4] = [0x28, 0xb5, 0x2f, 0xfd];
+ let reader = std::io::Cursor::new(bytes);
+ if bytes.starts_with(&ZSTD_MAGIC) {
+ let mut decoder = zstd::stream::read::Decoder::new(reader)?;
+ decoder.window_log_max(MACOS_ZSTD_WINDOW_LOG_MAX)?;
+ return Ok(Box::new(decoder));
+ }
+ if bytes.starts_with(&GZIP_MAGIC) {
+ return Ok(Box::new(flate2::read::GzDecoder::new(reader)));
+ }
+ Err(Error::InvalidUpdaterFormat)
+}
+
+#[cfg(target_os = "macos")]
+fn extract_macos_app_archive_with_limit(
+ bytes: &[u8],
+ dest_root: &Path,
+ max_decompressed_bytes: u64,
+) -> Result<()> {
+ use self::appimage_archive::BoundedArchiveReader;
use crate::install_safety::{
confined_symlink_target, confined_tar_member_relative, create_confined_parent_dirs,
path_is_inside,
};
- use flate2::read::GzDecoder;
use tar::EntryType;
- let decoder = GzDecoder::new(std::io::Cursor::new(bytes));
- let mut archive = tar::Archive::new(decoder);
+ let mut decompressed =
+ BoundedArchiveReader::new(macos_archive_decoder(bytes)?, max_decompressed_bytes);
+ let mut archive = tar::Archive::new(&mut decompressed);
for entry in archive.entries()? {
let mut entry = entry?;
let entry_path = entry.path()?.into_owned();
@@ -2101,7 +2136,9 @@ fn extract_macos_app_archive(bytes: &[u8], dest_root: &Path) -> Result<()> {
format!("unsupported updater archive member type {kind:?}"),
)));
}
- Ok(())
+ // A truncated stream can end on a member boundary, which `tar::Archive`
+ // accepts. Require the full stream, both end blocks and nothing after them.
+ decompressed.drain_and_check_trailer()
}
/// Gets the base target string used by the updater. If bundle type is available it
@@ -3084,3 +3121,151 @@ mod tests {
);
}
}
+
+// e2e/updater-zst.failure-modes.md, Z01.
+#[cfg(all(test, target_os = "macos"))]
+mod macos_archive_tests {
+ use super::{extract_macos_app_archive, extract_macos_app_archive_with_limit};
+ use crate::error::Error;
+ use std::io::Write;
+ use tar::{EntryType, Header};
+
+ const EXECUTABLE: &str = "ROSI.app/Contents/MacOS/ROSI";
+
+ fn app_tar(payload: &[u8]) -> Vec {
+ let mut builder = tar::Builder::new(Vec::new());
+ for dir in ["ROSI.app/", "ROSI.app/Contents/", "ROSI.app/Contents/MacOS/"] {
+ let mut header = Header::new_gnu();
+ header.set_entry_type(EntryType::Directory);
+ header.set_mode(0o755);
+ header.set_size(0);
+ header.set_cksum();
+ builder.append_data(&mut header, dir, &[][..]).unwrap();
+ }
+ let mut header = Header::new_gnu();
+ header.set_entry_type(EntryType::Regular);
+ header.set_mode(0o755);
+ header.set_size(payload.len() as u64);
+ header.set_cksum();
+ builder.append_data(&mut header, EXECUTABLE, payload).unwrap();
+ builder.into_inner().unwrap()
+ }
+
+ fn gzip(raw: &[u8]) -> Vec {
+ let mut encoder =
+ flate2::write::GzEncoder::new(Vec::new(), flate2::Compression::default());
+ encoder.write_all(raw).unwrap();
+ encoder.finish().unwrap()
+ }
+
+ fn zstd_with_window_log(raw: &[u8], window_log: u32) -> Vec {
+ let mut encoder = zstd::stream::write::Encoder::new(Vec::new(), 3).unwrap();
+ encoder.long_distance_matching(true).unwrap();
+ encoder.window_log(window_log).unwrap();
+ encoder.write_all(raw).unwrap();
+ encoder.finish().unwrap()
+ }
+
+ fn zstd(raw: &[u8]) -> Vec {
+ zstd_with_window_log(raw, 27)
+ }
+
+ fn extracted_executable(archive: &[u8]) -> crate::Result> {
+ let dir = tempfile::tempdir().unwrap();
+ extract_macos_app_archive(archive, dir.path())?;
+ Ok(std::fs::read(dir.path().join("Contents/MacOS/ROSI")).unwrap())
+ }
+
+ #[test]
+ fn gzip_and_zstd_archives_extract_the_same_bundle() {
+ let payload = b"\xcf\xfa\xed\xfe rosi executable".repeat(64);
+ let raw = app_tar(&payload);
+ assert_eq!(extracted_executable(&gzip(&raw)).unwrap(), payload);
+ assert_eq!(extracted_executable(&zstd(&raw)).unwrap(), payload);
+ }
+
+ #[test]
+ fn rejects_a_truncated_zstd_archive() {
+ let archive = zstd(&app_tar(&[7_u8; 64 * 1024]));
+ let truncated = &archive[..archive.len() / 2];
+ assert!(extracted_executable(truncated).is_err());
+ }
+
+ #[test]
+ fn rejects_a_zstd_window_larger_than_the_cap() {
+ // The frame header asks for a 256 MiB window; the content stays small.
+ let archive = zstd_with_window_log(&app_tar(b"payload"), 28);
+ assert!(extracted_executable(&archive).is_err());
+ }
+
+ #[test]
+ fn stops_a_decompression_bomb_at_the_cap() {
+ let archive = zstd(&app_tar(&vec![0_u8; 4 * 1024 * 1024]));
+ assert!(archive.len() < 64 * 1024, "fixture must compress well");
+ let dir = tempfile::tempdir().unwrap();
+ assert!(extract_macos_app_archive_with_limit(&archive, dir.path(), 1024 * 1024).is_err());
+ }
+
+ #[test]
+ fn rejects_trailing_data_after_the_zstd_frame() {
+ let mut archive = zstd(&app_tar(b"payload"));
+ archive.extend_from_slice(b"not a zstd frame");
+ assert!(extracted_executable(&archive).is_err());
+ }
+
+ #[test]
+ fn rejects_a_tar_stream_without_end_blocks() {
+ let mut raw = app_tar(b"payload");
+ raw.truncate(raw.len() - 1024);
+ assert!(extracted_executable(&zstd(&raw)).is_err());
+ assert!(extracted_executable(&gzip(&raw)).is_err());
+ }
+
+ #[test]
+ fn rejects_unknown_archive_magic() {
+ let raw = app_tar(b"payload");
+ assert!(matches!(
+ extracted_executable(&raw),
+ Err(Error::InvalidUpdaterFormat)
+ ));
+ }
+
+ #[test]
+ fn keeps_member_confinement_for_zstd_archives() {
+ let mut raw = Vec::new();
+ let mut header = Header::new_gnu();
+ header.set_entry_type(EntryType::Regular);
+ header.set_mode(0o644);
+ header.set_size(1);
+ // `set_path` refuses `..`; write the name bytes directly.
+ header.as_gnu_mut().unwrap().name[..17].copy_from_slice(b"ROSI.app/../../x\0");
+ header.set_cksum();
+ raw.extend_from_slice(header.as_bytes());
+ raw.extend_from_slice(&[b'x'; 512]);
+ raw.extend_from_slice(&[0_u8; 1024]);
+ assert!(extracted_executable(&zstd(&raw)).is_err());
+ }
+
+ /// Run by scripts/e2e-updater-zst.mjs against real release archives.
+ #[test]
+ #[ignore = "needs ROSI_UPDATER_ZST_E2E_ARCHIVES"]
+ fn extracts_real_release_archives() {
+ let paths = std::env::var("ROSI_UPDATER_ZST_E2E_ARCHIVES")
+ .expect("ROSI_UPDATER_ZST_E2E_ARCHIVES lists archives separated by ':'");
+ for path in paths.split(':').filter(|p| !p.is_empty()) {
+ let bytes = std::fs::read(path).unwrap();
+ let dir = tempfile::tempdir().unwrap();
+ let started = std::time::Instant::now();
+ extract_macos_app_archive(&bytes, dir.path())
+ .unwrap_or_else(|err| panic!("{path}: {err}"));
+ assert!(
+ crate::install_safety::macos_app_bundle_complete(dir.path()),
+ "{path}: extracted bundle is incomplete"
+ );
+ println!(
+ "ROSI_UPDATER_ZST_E2E {path} extract_ms={}",
+ started.elapsed().as_millis()
+ );
+ }
+ }
+}
diff --git a/src/commands.ts b/src/commands.ts
index 35910c22..3b03b541 100644
--- a/src/commands.ts
+++ b/src/commands.ts
@@ -59,6 +59,7 @@ export interface Commands {
get_app_platform: { args: void; result: NodeJS.Platform };
get_distribution_channel: { args: void; result: string };
get_beta_updater_target: { args: void; result: string };
+ get_compact_updater_target: { args: { beta: boolean }; result: string | null };
restart_app: { args: void; result: void };
log_error: { args: { message: string }; result: void };
notify_settings_flushed: { args: { generation: number }; result: void };
diff --git a/src/updater.ts b/src/updater.ts
index 81566eee..342740a9 100644
--- a/src/updater.ts
+++ b/src/updater.ts
@@ -3,6 +3,8 @@
// latest-{target}-{arch}.json endpoints; beta checks pass a custom
// `{os}-beta-{arch}-{installer}` target so they read the beta manifests
// published (and synced onto the latest stable release) by scripts/gpg-sign.js.
+// Packaged macOS apps instead pass `darwin[-beta]-{arch}-app-zst`, which
+// points at per-arch zstd archives, and fall back to the targets above.
import { call, type CommandArgs, type CommandName, type Commands } from './commands';
import { getVersion } from '@tauri-apps/api/app';
import { check, type DownloadEvent, type Update } from '@tauri-apps/plugin-updater';
@@ -135,10 +137,19 @@ async function updateCheckTarget(): Promise {
}
const channel =
updateChannelOverride ?? (await updaterInvoke('get_settings')).updateChannel ?? 'auto';
- if (channel === 'stable') return undefined;
- if (channel === 'beta') return updaterInvoke('get_beta_updater_target');
// auto: follow the installed version.
- return isBetaVersion(await getVersion()) ? updaterInvoke('get_beta_updater_target') : undefined;
+ const beta = channel === 'beta' || (channel === 'auto' && isBetaVersion(await getVersion()));
+ const compact = await updaterInvoke('get_compact_updater_target', { beta });
+ if (compact) return compact;
+ return beta ? updaterInvoke('get_beta_updater_target') : undefined;
+}
+
+const COMPACT_TARGET_SUFFIX = '-app-zst';
+
+// The target a packaged macOS app used before per-arch zstd feeds existed.
+function legacyTarget(compactTarget: string): string | undefined {
+ // darwin-beta-aarch64-app-zst -> darwin-beta-aarch64-app; stable uses the default target.
+ return compactTarget.includes('-beta-') ? compactTarget.slice(0, -'-zst'.length) : undefined;
}
export function notifyUpdaterChannelChanged(
@@ -190,6 +201,21 @@ async function retiredLinuxPackageMessage(): Promise {
async function checkFeed(
target: string | undefined,
isCurrent: () => boolean
+): Promise {
+ if (!target?.endsWith(COMPACT_TARGET_SUFFIX)) return checkTargetFeed(target, isCurrent);
+ try {
+ return await checkTargetFeed(target, isCurrent);
+ } catch {
+ if (!isCurrent()) return null;
+ // A release published without per-arch zstd archives still updates
+ // through the universal .app.tar.gz feed.
+ return checkTargetFeed(legacyTarget(target), isCurrent);
+ }
+}
+
+async function checkTargetFeed(
+ target: string | undefined,
+ isCurrent: () => boolean
): Promise {
const testCheck = e2eUpdaterAdapter()?.check;
if (testCheck) {
From a07a5a81469eef21836e4095f67b05844705a133 Mon Sep 17 00:00:00 2001
From: BurntToasters <61037367+BurntToasters@users.noreply.github.com>
Date: Wed, 28 Oct 2026 13:33:31 -0700
Subject: [PATCH 02/58] changes and fixes
---
ARCHITECTURE.md | 12 +-
CHANGELOG.md | 6 +-
THIRD-PARTY-NOTICES.md | 39 +
build-setup.md | 1 +
e2e/updater-zst.failure-modes.md | 35 +-
package.json | 2 +-
run.rosie.rosi.metainfo.xml | 2 +-
scripts/check-stable-metadata-pr.mjs | 61 +-
scripts/e2e-updater-zst.mjs | 280 +++++-
scripts/pack-macos-updater-zst.js | 205 ++++-
scripts/release-preflight.js | 15 +
scripts/round2-release-updater.test.mjs | 22 +-
scripts/validate-updater-live.js | 8 +-
scripts/validate-updater-manifest.js | 35 +
scripts/verify-release-draft.js | 29 +-
src-tauri/gen/schemas/linux-schema.json | 100 +-
src-tauri/gen/schemas/windows-schema.json | 12 +
src-tauri/src/platform.rs | 47 +-
src-tauri/tauri.conf.json | 7 +-
.../vendor/tauri-plugin-updater/PATCHES.md | 27 +-
.../vendor/tauri-plugin-updater/ROSI.patch | 858 +++++++++++-------
.../src/appimage_archive.rs | 5 +-
.../src/install_safety.rs | 172 ++++
.../tauri-plugin-updater/src/updater.rs | 74 +-
src/updater.ts | 25 +-
.../latest-darwin-aarch64-app-zst.json | 11 +
testdata/updater/latest-darwin-aarch64.json | 2 +-
.../latest-darwin-beta-aarch64-app-zst.json | 11 +
.../updater/latest-darwin-beta-aarch64.json | 4 +-
testdata/updater/latest-darwin-x86_64.json | 2 +-
testdata/updater/latest-linux-x86_64.json | 4 +-
testdata/updater/latest-windows-aarch64.json | 4 +-
testdata/updater/latest-windows-x86_64.json | 4 +-
33 files changed, 1668 insertions(+), 453 deletions(-)
create mode 100644 testdata/updater/latest-darwin-aarch64-app-zst.json
create mode 100644 testdata/updater/latest-darwin-beta-aarch64-app-zst.json
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index 3806d87a..927325c0 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -69,7 +69,11 @@ normal loaders validate everything, and the result is recorded in
DOM tests and the E2E specs drive.
- `updater.ts` wraps `@tauri-apps/plugin-updater`. Stable checks use the default
`latest-{target}-{arch}.json` endpoints; beta checks pass the
- `{os}-beta-{arch}-{installer}` target from `get_beta_updater_target`.
+ `{os}-beta-{arch}-{installer}` target from `get_beta_updater_target`. Packaged
+ macOS apps call `get_compact_updater_target` to check per-arch zstd updates
+ (`darwin[-beta]-{arch}-app-zst`) and fall back to the universal target if unavailable.
+ Under Rosetta 2, `get_compact_updater_target` selects the native `aarch64` target to
+ migrate the app to native Apple Silicon execution.
- `main.ts` is the entry point. It imports the bridge first, then the renderer
modules, then `rosiEngine.ts`. After the renderer reports startup readiness it
calls `mark_main_window_ready`, which lets the backend close the splash.
@@ -126,7 +130,11 @@ per-arch `ROSI-{aarch64,x86_64}.app.tar.zst` instead of the universal
and never collects the per-arch builds' arch-less `.app.tar.gz`.
- Packaged macOS apps ask for that target (`get_compact_updater_target`). If the
compact feed is missing they fall back to the universal feed, which stays published
- for clients older than 5.1.0.
+ for clients older than 5.1.0. An x86_64 process running under Rosetta 2 requests
+ `darwin[-beta]-aarch64-app-zst` so it updates directly to native Apple Silicon execution.
+- Staged updates are verified prior to installation: the vendored updater validates that
+ the extracted executable and sidecars match the host architecture before live bundle
+ replacement or backup retirement.
- `rosi-yt-dlp` is upstream's universal2 binary and already compressed, so about
36 MB of every update is yt-dlp.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d45e6d60..f0ba4e6d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,7 +18,11 @@ ROSI! A cross platform yt-dlp GUI built on Tauri V2!
## Changes in `v5.1.0-beta.1:`
-- **Fix:** (add release notes)
+- **Updater:** macOS in-app updates now download compact per-architecture archives (`.app.tar.zst`), reducing update sizes from ~141 MB to ~60 MB using zstd compression.
+- **Updater:** Added seamless fallback to universal updates if per-architecture manifests are missing.
+- **Updater:** Architecture verification ensures downloaded macOS updates match the host machine before installation.
+- **Updater:** Rosetta-translated processes on Apple Silicon automatically request the native arm64 target to migrate away from emulation.
+- **Packaging:** Per-architecture updater archives are verified for codesigning and notarization stapling prior to packaging.
## Changes in `v5.0.2:`
diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md
index 04c23c0b..38dccdb1 100644
--- a/THIRD-PARTY-NOTICES.md
+++ b/THIRD-PARTY-NOTICES.md
@@ -1060,6 +1060,45 @@ The complete, version-specific license notices for every Rust crate compiled
into ROSI (including Tauri and its plugins) are generated at build time and shown
in the app under **Licenses > Rust Crate Dependencies**.
+## zstd (libzstd)
+
+License: BSD-3-Clause
+Link: https://github.com/facebook/zstd
+
+The macOS updater statically compiles the libzstd reference implementation
+via the `zstd-sys` crate for per-architecture archive extraction.
+
+BSD License
+
+For Zstandard software
+
+Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ * Neither the name Facebook, nor Meta, nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
---
# Bundled yt-dlp binary
diff --git a/build-setup.md b/build-setup.md
index 0f470669..b71dfa33 100644
--- a/build-setup.md
+++ b/build-setup.md
@@ -22,6 +22,7 @@
15.0 because the bundled FFmpeg is built for macOS 15; `build:mac:zip` rejects
any bundled Mach-O whose minimum OS is above that floor.
- Xcode Command Line Tools (`lipo`, `codesign`, `notarytool`)
+- zstd CLI (`brew install zstd`) for the updater archives; checked by `npm run prerelease:prepare`
- Node.js `^24.15.0 || >=26`
- Rust (rustup)
diff --git a/e2e/updater-zst.failure-modes.md b/e2e/updater-zst.failure-modes.md
index bdbc4fe2..0344f1ad 100644
--- a/e2e/updater-zst.failure-modes.md
+++ b/e2e/updater-zst.failure-modes.md
@@ -26,23 +26,35 @@ Enumerated before implementation. Each case names the layer that must catch it.
1. A zstd archive whose app lacks a sidecar, or whose identity differs, must
be refused by the existing completeness and identity checks.
2. A per-arch bundle for the wrong architecture must never be offered: the
- feed key carries the arch, and the client asks for its own compile-time
- arch (Rosetta processes ask for x86_64).
+ feed key carries the arch, and the client asks for its host target.
3. An arm64-only app later moved to an Intel Mac will not launch. This is
accepted and documented; recovery is the universal DMG.
+4. A bundle whose executable or sidecars do not support the host architecture
+ (for example, an arm64-only bundle on an Intel Mac, or an x86_64-only bundle
+ on native Apple Silicon) must be rejected before live app replacement or
+ backup retirement, while a translated x86_64 process under Rosetta 2 accepts
+ both `aarch64` and `x86_64` bundles.
## Z03: client target selection and fallback
1. A packaged macOS app asks for `darwin-{arch}-app-zst` (stable) or
`darwin-beta-{arch}-app-zst` (beta).
-2. If the compact feed is missing or lacks the key (a release published
+2. A translated process on Apple Silicon (Rosetta) requests the native `aarch64`
+ target so that updates automatically migrate to native arm64 execution.
+3. If the compact feed is missing or lacks the key (a release published
without zst artifacts), the check must fall back to the legacy target and
- still find the update.
-3. A compact feed that exists and reports no newer version must not trigger
+ still find the update. The endpoint configuration must not mask a missing
+ compact feed with an installed-version manifest.
+4. A compact feed that exists and reports no newer version must not trigger
the fallback.
-4. Clients on 5.0.x never request the compact key and keep receiving the
+5. Clients on 5.0.x never request the compact key and keep receiving the
universal `.app.tar.gz`.
-5. Windows, Linux, and Flatpak targets must not change.
+6. Windows, Linux, and Flatpak targets must not change.
+
+Scope: Z03.1 through Z03.6 mock `get_compact_updater_target`, so they test renderer
+routing given the command's answer. The Rust target selection itself (bundle-type
+gate, Rosetta sysctl, arch) is covered only by Z03.2's `sysctl.proc_translated`
+probe and must be confirmed on real macOS hardware.
## Z04: release pipeline
@@ -57,5 +69,10 @@ Enumerated before implementation. Each case names the layer that must catch it.
4. A missing or mismatched `.sig` must stop manifest generation.
5. Stable and beta compact manifests must be generated, validated, listed in
the required beta-manifest set, and pass the live validator.
-6. Compact entries must never become the generic `darwin-{arch}` fallback for
- old clients.
+6. Compact entries must never become the generic `darwin-{arch}` or
+ `darwin-beta-{arch}[-app]` fallback for old clients.
+7. Per-arch input bundles in release builds must have valid Developer ID code
+ signatures, stapled notarization tickets, and pass Gatekeeper assessment
+ (`spctl`) before being repacked.
+8. The E2E test harness supports a strict `--require-real-builds` mode to prevent
+ synthetic bundles from being accepted as final release proof.
diff --git a/package.json b/package.json
index bfbf745c..d1eb9b2e 100644
--- a/package.json
+++ b/package.json
@@ -141,7 +141,7 @@
"release:win:continue": "npm run release:session:verify && npm run release:licenses && npm run release:draft && npm run release:legacy-v4-feed && npm run rust:targets:win && npm run build:win:prepared && npm run prepare:sidecars && npm run release:sign:gpg && npm run release:finalize",
"release:win:resume": "npm run prerelease:prepare && npm run release:win:continue",
"release:win": "node scripts/run-release.js win",
- "release:mac:continue": "npm run release:session:verify && npm run release:licenses && npm run release:wait-draft && npm run rust:targets:mac && npm run build:mac:universal:prepared && npm run build:mac:zip && npm run build:mac:updater-arches:prepared && npm run build:mac:updater-zst && npm run release:sign:gpg && npm run release:finalize",
+ "release:mac:continue": "npm run release:session:verify && npm run release:licenses && npm run release:wait-draft && npm run rust:targets:mac && npm run build:mac:universal:prepared && npm run build:mac:zip && npm run build:mac:updater-arches:prepared && npm run build:mac:updater-zst && node scripts/e2e-updater-zst.mjs --require-real-builds && npm run release:sign:gpg && npm run release:finalize",
"release:mac:resume": "npm run prerelease:prepare && npm run release:mac:continue",
"release:mac": "node scripts/run-release.js mac",
"release:mac:ssh": "npm run mac:ssh:keychain && node scripts/run-release.js mac",
diff --git a/run.rosie.rosi.metainfo.xml b/run.rosie.rosi.metainfo.xml
index f5eb72d8..17b04966 100644
--- a/run.rosie.rosi.metainfo.xml
+++ b/run.rosie.rosi.metainfo.xml
@@ -41,7 +41,7 @@
-
+
diff --git a/scripts/check-stable-metadata-pr.mjs b/scripts/check-stable-metadata-pr.mjs
index 6a676875..fc93d1e5 100644
--- a/scripts/check-stable-metadata-pr.mjs
+++ b/scripts/check-stable-metadata-pr.mjs
@@ -3,7 +3,10 @@ import { resolve } from "node:path";
import { fileURLToPath, pathToFileURL } from "node:url";
import { isDeepStrictEqual } from "node:util";
import { stripSupersededPrereleases } from "./update-metainfo.js";
-import { syncChangelogForVersion } from "./sync-version-helpers.js";
+import {
+ macBundleVersionFromSemver,
+ syncChangelogForVersion,
+} from "./sync-version-helpers.js";
import { validateChangelogForVersion } from "./validate-changelog-version.js";
const STABLE_METADATA_PATHS = new Set([
@@ -42,17 +45,18 @@ function parseJson(file, text) {
}
}
-function assertJsonVersionOnly(
- file,
- baseText,
- headText,
- allowedFields,
- expectedBaseVersion,
- expectedHeadVersion,
-) {
+/**
+ * Each allowed field is [fieldPath, expectedBaseValue, expectedHeadValue], so
+ * derived values such as macOS bundleVersion get their own expectations.
+ */
+function assertJsonVersionOnly(file, baseText, headText, allowedFields) {
const base = parseJson(file, baseText);
const head = parseJson(file, headText);
- for (const fieldPath of allowedFields) {
+ for (const [
+ fieldPath,
+ expectedBaseValue,
+ expectedHeadValue,
+ ] of allowedFields) {
let baseParent = base;
let headParent = head;
for (const key of fieldPath.slice(0, -1)) {
@@ -67,10 +71,7 @@ function assertJsonVersionOnly(
`${file} is missing the allowed version field ${fieldPath.join(".")}.`,
);
}
- if (
- baseValue !== expectedBaseVersion ||
- headValue !== expectedHeadVersion
- ) {
+ if (baseValue !== expectedBaseValue || headValue !== expectedHeadValue) {
throw new Error(
`${file} has an unexpected value in ${fieldPath.join(".")}.`,
);
@@ -416,25 +417,25 @@ export function validateStableMetadataChange({
}
switch (file) {
case "package.json":
+ assertJsonVersionOnly(file, change.baseText, change.headText, [
+ [["version"], baseVersion, headVersion],
+ ]);
+ break;
case "src-tauri/tauri.conf.json":
- assertJsonVersionOnly(
- file,
- change.baseText,
- change.headText,
- [["version"]],
- baseVersion,
- headVersion,
- );
+ assertJsonVersionOnly(file, change.baseText, change.headText, [
+ [["version"], baseVersion, headVersion],
+ [
+ ["bundle", "macOS", "bundleVersion"],
+ macBundleVersionFromSemver(baseVersion),
+ macBundleVersionFromSemver(headVersion),
+ ],
+ ]);
break;
case "package-lock.json":
- assertJsonVersionOnly(
- file,
- change.baseText,
- change.headText,
- [["version"], ["packages", "", "version"]],
- baseVersion,
- headVersion,
- );
+ assertJsonVersionOnly(file, change.baseText, change.headText, [
+ [["version"], baseVersion, headVersion],
+ [["packages", "", "version"], baseVersion, headVersion],
+ ]);
break;
case "src-tauri/Cargo.toml":
case "src-tauri/Cargo.lock":
diff --git a/scripts/e2e-updater-zst.mjs b/scripts/e2e-updater-zst.mjs
index fba994c9..e3e92074 100644
--- a/scripts/e2e-updater-zst.mjs
+++ b/scripts/e2e-updater-zst.mjs
@@ -152,12 +152,42 @@ function tauriCli(args) {
});
}
-/** Runs src/updater.ts against a scripted feed; returns the targets it checked. */
-async function runRendererCheck({ channel, compactTarget, feed }) {
+/**
+ * Resolves an updater target against the generated manifests the way
+ * tauri-plugin-updater does with tauri.conf.json's endpoints: `{{target}}` is
+ * the custom target or `darwin`, `{{arch}}` is aarch64. A default target looks
+ * up `darwin-aarch64-app` then `darwin-aarch64`; a custom target only its key.
+ */
+function resolveFeed(manifests, target) {
+ const templateTarget = target ?? "darwin";
+ const keys = target ? [target] : ["darwin-aarch64-app", "darwin-aarch64"];
+ for (const name of [
+ `latest-${templateTarget}-aarch64.json`,
+ `latest-${templateTarget}.json`,
+ ]) {
+ const platforms = manifests[name]?.platforms ?? {};
+ const key = keys.find((candidate) => platforms[candidate]);
+ if (key) return { manifest: name, key, url: platforms[key].url };
+ }
+ return null;
+}
+
+/**
+ * Runs an updater.ts against a scripted feed; returns the targets it checked
+ * and the warnings it logged. `sourceText` defaults to src/updater.ts.
+ */
+async function runRendererCheck({
+ channel,
+ compactTarget,
+ betaTarget = "darwin-beta-aarch64-app",
+ feed,
+ installedVersion = "5.1.0",
+ sourceText,
+}) {
const ts = require(path.join(root, "node_modules/typescript"));
- const source = fs
- .readFileSync(path.join(root, "src/updater.ts"), "utf8")
- .replaceAll("import.meta.env.VITE_ROSI_E2E", "'1'");
+ const source = (
+ sourceText ?? fs.readFileSync(path.join(root, "src/updater.ts"), "utf8")
+ ).replaceAll("import.meta.env.VITE_ROSI_E2E", "'1'");
const js = ts.transpileModule(source, {
compilerOptions: {
target: ts.ScriptTarget.ES2020,
@@ -165,18 +195,26 @@ async function runRendererCheck({ channel, compactTarget, feed }) {
},
}).outputText;
const checks = [];
+ const compactArgs = [];
+ const warnings = [];
const statuses = [];
const window = {
__ROSI_E2E__: {
updaterAdapter: {
- invoke: async (command) =>
- ({
+ invoke: async (command, args) => {
+ if (command === "get_compact_updater_target") {
+ compactArgs.push(args ?? null);
+ return typeof compactTarget === "function"
+ ? compactTarget(args)
+ : compactTarget;
+ }
+ return {
is_packaged: true,
is_flatpak: false,
get_settings: { updateChannel: channel },
- get_beta_updater_target: "darwin-beta-aarch64-app",
- get_compact_updater_target: compactTarget,
- })[command],
+ get_beta_updater_target: betaTarget,
+ }[command];
+ },
check: async (target) => {
checks.push(target ?? null);
const result = feed(target ?? null);
@@ -199,10 +237,13 @@ async function runRendererCheck({ channel, compactTarget, feed }) {
exports,
require: (id) =>
id.includes("/app")
- ? { getVersion: async () => "5.1.0" }
+ ? { getVersion: async () => installedVersion }
: { invoke: () => {}, check: () => {} },
window,
- console,
+ console: {
+ error: console.error,
+ warn: (...args) => warnings.push(args.join(" ")),
+ },
Date,
Set,
Object,
@@ -215,6 +256,8 @@ async function runRendererCheck({ channel, compactTarget, feed }) {
const error = await exports.checkForUpdates();
return {
checks,
+ compactArgs,
+ warnings,
error,
available:
statuses.find((event) => event.status === "available")?.version ?? null,
@@ -236,18 +279,54 @@ async function main() {
fs.mkdirSync(releaseDir);
const packed = {};
const inputs = {};
+ const requireRealBuilds = process.argv.includes("--require-real-builds");
try {
for (const arch of Object.keys(ARCHES))
inputs[arch] = perArchInput(arch, scratch);
+ if (requireRealBuilds) {
+ await scenario(
+ "Z04.8",
+ "real per-arch builds are present (strict release proof)",
+ () => {
+ for (const arch of Object.keys(ARCHES)) {
+ assert.equal(
+ inputs[arch].source,
+ "tauri-per-arch-build",
+ `missing real per-arch build for ${arch}`,
+ );
+ }
+ },
+ );
+ for (const arch of Object.keys(ARCHES)) {
+ await scenario(
+ `Z04.7-${arch}`,
+ `real per-arch bundle for ${arch} passes codesign, stapler, and spctl`,
+ () => {
+ assertPerArchBundle(inputs[arch].path, arch, {
+ verifySignature: true,
+ });
+ },
+ );
+ }
+ }
+
await scenario(
"Z04.2",
- "packer refuses a universal bundle as a per-arch input",
+ "packer refuses universal or wrong-arch bundles as per-arch input",
() => {
assert.throws(
() => assertPerArchBundle(universalArchive, "aarch64"),
/expected "arm64"/,
);
+ assert.throws(
+ () => assertPerArchBundle(inputs.x86_64.path, "aarch64"),
+ /expected "arm64"/,
+ );
+ assert.throws(
+ () => assertPerArchBundle(inputs.aarch64.path, "x86_64"),
+ /expected "x86_64"/,
+ );
},
);
@@ -352,6 +431,17 @@ async function main() {
for (const key of [`darwin-${arch}`, `darwin-${arch}-app`]) {
assert.match(generic[key].url, /\/ROSI\.app\.tar\.gz$/, key);
}
+ for (const betaKey of [
+ `darwin-beta-${arch}`,
+ `darwin-beta-${arch}-app`,
+ ]) {
+ const betaPlatforms = manifests[`latest-${betaKey}.json`].platforms;
+ assert.match(
+ betaPlatforms[betaKey].url,
+ /\/ROSI\.app\.tar\.gz$/,
+ betaKey,
+ );
+ }
}
},
);
@@ -385,6 +475,7 @@ async function main() {
},
);
+ let archMatrix = {};
await scenario(
"Z01/Z02",
"vendored plugin extracts real archives into complete bundles",
@@ -397,6 +488,7 @@ async function main() {
"cargo",
[
"test",
+ "--locked",
"--manifest-path",
"src-tauri/vendor/tauri-plugin-updater/Cargo.toml",
"--lib",
@@ -413,15 +505,51 @@ async function main() {
},
},
);
+ const matches = [
+ ...output.matchAll(
+ /ROSI_UPDATER_ZST_E2E (\S+) extract_ms=(\d+) aarch64=(true|false) x86_64=(true|false) rosetta=(true|false)/g,
+ ),
+ ];
const extractMs = Object.fromEntries(
- [
- ...output.matchAll(/ROSI_UPDATER_ZST_E2E (\S+) extract_ms=(\d+)/g),
- ].map((m) => [path.basename(m[1]), Number(m[2])]),
+ matches.map((m) => [path.basename(m[1]), Number(m[2])]),
+ );
+ archMatrix = Object.fromEntries(
+ matches.map((m) => [
+ path.basename(m[1]),
+ {
+ aarch64: m[3] === "true",
+ x86_64: m[4] === "true",
+ rosetta: m[5] === "true",
+ },
+ ]),
);
assert.equal(Object.keys(extractMs).length, archives.length);
const passed = output.match(/test result: ok\. (\d+) passed/);
assert.ok(passed, "plugin archive tests did not pass");
- return { pluginTestsPassed: Number(passed[1]), extractMs };
+ return { pluginTestsPassed: Number(passed[1]), extractMs, archMatrix };
+ },
+ );
+
+ await scenario(
+ "Z02.4",
+ "vendored updater rejects staged wrong-arch bundles and accepts host/Rosetta bundles",
+ () => {
+ assert.deepEqual(archMatrix["ROSI.app.tar.gz"], {
+ aarch64: true,
+ x86_64: true,
+ rosetta: true,
+ });
+ assert.deepEqual(archMatrix["ROSI-aarch64.app.tar.zst"], {
+ aarch64: true,
+ x86_64: false,
+ rosetta: true,
+ });
+ assert.deepEqual(archMatrix["ROSI-x86_64.app.tar.zst"], {
+ aarch64: false,
+ x86_64: true,
+ rosetta: true,
+ });
+ return archMatrix;
},
);
@@ -435,6 +563,9 @@ async function main() {
feed: () => "9.0.0",
});
assert.deepEqual(result.checks, ["darwin-aarch64-app-zst"]);
+ // The channel is re-read before and after the feed request.
+ assert.ok(result.compactArgs.length > 0);
+ assert.ok(result.compactArgs.every((args) => args.beta === false));
assert.equal(result.available, "9.0.0");
return result;
},
@@ -442,6 +573,50 @@ async function main() {
await scenario(
"Z03.2",
+ "renderer routes the native aarch64 target the command returns under Rosetta (command mocked)",
+ async () => {
+ const rosettaTarget = (args) =>
+ args?.beta ? "darwin-beta-aarch64-app-zst" : "darwin-aarch64-app-zst";
+ const stable = await runRendererCheck({
+ channel: "stable",
+ compactTarget: rosettaTarget,
+ feed: () => "9.0.0",
+ });
+ assert.deepEqual(stable.checks, ["darwin-aarch64-app-zst"]);
+ assert.ok(stable.compactArgs.every((args) => args.beta === false));
+ assert.equal(stable.available, "9.0.0");
+ const beta = await runRendererCheck({
+ channel: "beta",
+ compactTarget: rosettaTarget,
+ feed: () => "9.0.0-beta.1",
+ });
+ assert.deepEqual(beta.checks, ["darwin-beta-aarch64-app-zst"]);
+ assert.ok(beta.compactArgs.every((args) => args.beta === true));
+ assert.equal(beta.available, "9.0.0-beta.1");
+ assert.equal(archMatrix["ROSI-aarch64.app.tar.zst"]?.rosetta, true);
+ let rosettaSysctl = "skipped";
+ if (os.arch() === "arm64") {
+ const probe = spawnSync(
+ "arch",
+ ["-x86_64", "/usr/sbin/sysctl", "-n", "sysctl.proc_translated"],
+ { encoding: "utf8" },
+ );
+ if (probe.status === 0) {
+ rosettaSysctl = probe.stdout.trim();
+ assert.equal(rosettaSysctl, "1");
+ }
+ }
+ return {
+ stable: stable.checks,
+ beta: beta.checks,
+ rosettaMachOAccepted: archMatrix["ROSI-aarch64.app.tar.zst"]?.rosetta,
+ rosettaSysctl,
+ };
+ },
+ );
+
+ await scenario(
+ "Z03.3",
"missing compact feed falls back to the legacy target",
async () => {
const missing = new Error(
@@ -452,22 +627,36 @@ async function main() {
compactTarget: "darwin-aarch64-app-zst",
feed: (target) => (target ? missing : "9.0.0"),
});
- assert.equal(stable.checks.at(-1), null);
+ // The compact check is not retried in place; the legacy target is the retry.
+ assert.deepEqual(stable.checks, ["darwin-aarch64-app-zst", null]);
assert.equal(stable.available, "9.0.0");
+ assert.equal(stable.warnings.length, 1);
+ assert.match(
+ stable.warnings[0],
+ /darwin-aarch64-app-zst check failed, falling back to the default target: Could not fetch/,
+ );
const beta = await runRendererCheck({
channel: "beta",
compactTarget: "darwin-beta-aarch64-app-zst",
feed: (target) =>
target.endsWith("-zst") ? missing : "9.0.0-beta.1",
});
- assert.equal(beta.checks.at(-1), "darwin-beta-aarch64-app");
+ assert.deepEqual(beta.checks, [
+ "darwin-beta-aarch64-app-zst",
+ "darwin-beta-aarch64-app",
+ ]);
assert.equal(beta.available, "9.0.0-beta.1");
+ assert.equal(beta.warnings.length, 1);
+ assert.match(
+ beta.warnings[0],
+ /darwin-beta-aarch64-app-zst check failed, falling back to darwin-beta-aarch64-app target/,
+ );
return { stable, beta };
},
);
await scenario(
- "Z03.3",
+ "Z03.4",
"compact feed reporting no update does not fall back",
async () => {
const result = await runRendererCheck({
@@ -479,13 +668,62 @@ async function main() {
result.checks.every((target) => target === "darwin-aarch64-app-zst"),
);
assert.equal(result.available, null);
+ assert.deepEqual(result.warnings, []);
return result;
},
);
await scenario(
"Z03.5",
- "non-macOS builds keep their existing targets",
+ "clients on 5.0.x never request the compact key",
+ async () => {
+ // The real 5.0.2 renderer. Its command would answer with a compact key,
+ // and the 5.0.2 renderer must still never ask for one.
+ const sourceText = run("git", ["show", "v5.0.2:src/updater.ts"], {
+ cwd: root,
+ });
+ const stable = await runRendererCheck({
+ channel: "auto",
+ compactTarget: "darwin-aarch64-app-zst",
+ installedVersion: "5.0.2",
+ sourceText,
+ feed: (target) => (resolveFeed(manifests, target) ? "9.0.0" : null),
+ });
+ assert.deepEqual(stable.compactArgs, []);
+ assert.ok(stable.checks.every((target) => target === null));
+ assert.equal(stable.available, "9.0.0");
+ const stableFeed = resolveFeed(manifests, null);
+ assert.equal(stableFeed?.manifest, "latest-darwin-aarch64.json");
+ assert.equal(stableFeed?.key, "darwin-aarch64-app");
+ assert.match(stableFeed?.url ?? "", /\/ROSI\.app\.tar\.gz$/);
+
+ const beta = await runRendererCheck({
+ channel: "auto",
+ compactTarget: "darwin-beta-aarch64-app-zst",
+ installedVersion: "5.0.2-beta.1",
+ sourceText,
+ feed: (target) =>
+ resolveFeed(manifests, target) ? "9.0.0-beta.1" : null,
+ });
+ assert.deepEqual(beta.compactArgs, []);
+ assert.ok(
+ beta.checks.every((target) => target === "darwin-beta-aarch64-app"),
+ );
+ assert.equal(beta.available, "9.0.0-beta.1");
+ const betaFeed = resolveFeed(manifests, "darwin-beta-aarch64-app");
+ assert.equal(betaFeed?.manifest, "latest-darwin-beta-aarch64-app.json");
+ assert.equal(betaFeed?.key, "darwin-beta-aarch64-app");
+ assert.match(betaFeed?.url ?? "", /\/ROSI\.app\.tar\.gz$/);
+ return {
+ stable: { checks: stable.checks, feed: stableFeed },
+ beta: { checks: beta.checks, feed: betaFeed },
+ };
+ },
+ );
+
+ await scenario(
+ "Z03.6",
+ "renderer keeps existing targets when the command returns no compact target (non-macOS)",
async () => {
const stable = await runRendererCheck({
channel: "stable",
diff --git a/scripts/pack-macos-updater-zst.js b/scripts/pack-macos-updater-zst.js
index 30c4a219..507a7851 100644
--- a/scripts/pack-macos-updater-zst.js
+++ b/scripts/pack-macos-updater-zst.js
@@ -15,6 +15,7 @@ import { spawn, spawnSync } from "child_process";
import { Transform, Writable } from "stream";
import { pipeline } from "stream/promises";
import { fileURLToPath } from "url";
+import { isDeepStrictEqual } from "util";
import zlib from "zlib";
import { isDirectExecutionOf } from "./direct-execution.mjs";
import { verifyReleaseSession } from "./release-session.js";
@@ -76,8 +77,104 @@ function compactArchiveName(arch) {
return `ROSI-${arch}.app.tar.zst`;
}
-/** Z04.2: one top-level ROSI.app, and executables built for `arch`. */
-function assertPerArchBundle(input, arch) {
+function compareVersions(left, right) {
+ const leftParts = left.split(".").map(Number);
+ const rightParts = right.split(".").map(Number);
+ const length = Math.max(leftParts.length, rightParts.length);
+ for (let index = 0; index < length; index += 1) {
+ const delta = (leftParts[index] ?? 0) - (rightParts[index] ?? 0);
+ if (delta !== 0) return Math.sign(delta);
+ }
+ return 0;
+}
+
+function parseMachOMinimumVersion(otoolOutput) {
+ const buildVersion = otoolOutput.match(
+ /cmd LC_BUILD_VERSION[\s\S]*?\bminos\s+(\d+(?:\.\d+)*)/,
+ );
+ if (buildVersion?.[1]) return buildVersion[1];
+ const legacy = otoolOutput.match(
+ /cmd LC_VERSION_MIN_MACOSX[\s\S]*?\bversion\s+(\d+(?:\.\d+)*)/,
+ );
+ return legacy?.[1] ?? null;
+}
+
+function readMachOMinimumVersion(binary, arch) {
+ const output = run("otool", ["-arch", arch, "-l", binary]);
+ const minimum = parseMachOMinimumVersion(output);
+ if (!minimum) {
+ throw new Error(
+ `Could not read the minimum macOS version for ${binary} (${arch})`,
+ );
+ }
+ return minimum;
+}
+
+function readEntitlementsTemplate(templatePath) {
+ return JSON.parse(
+ run("plutil", ["-convert", "json", "-o", "-", templatePath]),
+ );
+}
+
+function verifySignedEntitlements(targetPath, expected) {
+ const temporaryDirectory = fs.mkdtempSync(
+ path.join(os.tmpdir(), "rosi-entitlements-"),
+ );
+ const plistPath = path.join(temporaryDirectory, "entitlements.plist");
+ try {
+ const inspection = spawnSync(
+ "codesign",
+ ["--display", "--entitlements", plistPath, "--xml", targetPath],
+ { encoding: "utf8" },
+ );
+ if (inspection.error || inspection.status !== 0) {
+ throw (
+ inspection.error ??
+ new Error(
+ `Could not inspect entitlements for ${targetPath}: ${inspection.stderr}`,
+ )
+ );
+ }
+ const actual = fs.existsSync(plistPath)
+ ? JSON.parse(run("plutil", ["-convert", "json", "-o", "-", plistPath]))
+ : {};
+ if (!isDeepStrictEqual(actual, expected)) {
+ throw new Error(
+ `Unexpected signed entitlements for ${targetPath}: ${JSON.stringify(actual)}`,
+ );
+ }
+ } finally {
+ fs.rmSync(temporaryDirectory, { recursive: true, force: true });
+ }
+}
+
+function verifyDeveloperIdSignature(targetPath, label) {
+ const inspection = spawnSync(
+ "codesign",
+ ["--display", "--verbose=4", targetPath],
+ { encoding: "utf8" },
+ );
+ if (inspection.error || inspection.status !== 0) {
+ throw inspection.error ?? new Error(inspection.stderr);
+ }
+ const details = `${inspection.stdout}${inspection.stderr}`;
+ if (
+ /Signature=adhoc/i.test(details) ||
+ !/Authority=Developer ID Application:/i.test(details)
+ ) {
+ throw new Error(
+ `${label} is not signed with a Developer ID Application certificate.`,
+ );
+ }
+ const teamIdentifier = details.match(/^TeamIdentifier=(.+)$/m)?.[1]?.trim();
+ if (!teamIdentifier || teamIdentifier === "not set") {
+ throw new Error(`${label} signature has no TeamIdentifier.`);
+ }
+ return teamIdentifier;
+}
+
+/** Z04.2: one top-level ROSI.app, and executables built for `arch`. Z04.7: code sign & staple. */
+function assertPerArchBundle(input, arch, { verifySignature = false } = {}) {
const members = run("tar", ["-tzf", input], { maxBuffer: 64 * 1024 * 1024 })
.split("\n")
.filter(Boolean);
@@ -89,14 +186,7 @@ function assertPerArchBundle(input, arch) {
}
const scratch = fs.mkdtempSync(path.join(os.tmpdir(), "rosi-updater-zst-"));
try {
- run("tar", [
- "-xzf",
- input,
- "-C",
- scratch,
- ...THIN_MEMBERS,
- ...MULTI_ARCH_MEMBERS,
- ]);
+ run("tar", ["-xzf", input, "-C", scratch]);
const expected = ARCHES[arch].lipoArch;
for (const member of [...THIN_MEMBERS, ...MULTI_ARCH_MEMBERS]) {
const archs = run("lipo", ["-archs", path.join(scratch, member)]).trim();
@@ -107,6 +197,98 @@ function assertPerArchBundle(input, arch) {
);
}
}
+ if (verifySignature) {
+ const appPath = path.join(scratch, "ROSI.app");
+ const tauriConfig = JSON.parse(
+ fs.readFileSync(
+ path.join(root, "src-tauri", "tauri.conf.json"),
+ "utf8",
+ ),
+ );
+ const requiredMacOS = tauriConfig.bundle?.macOS?.minimumSystemVersion;
+ const expectedBundleVersion = tauriConfig.bundle?.macOS?.bundleVersion;
+ const marketingMatch = tauriConfig.version?.match(
+ /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-beta\.(?:0|[1-9]\d*))?$/,
+ );
+ const expectedMarketingVersion = marketingMatch
+ ? `${marketingMatch[1]}.${marketingMatch[2]}.${marketingMatch[3]}`
+ : undefined;
+ if (
+ !requiredMacOS ||
+ !expectedBundleVersion ||
+ !expectedMarketingVersion
+ ) {
+ throw new Error(
+ "tauri.conf.json must define a supported version, bundle.macOS.minimumSystemVersion, and bundleVersion",
+ );
+ }
+
+ const infoPlist = path.join(appPath, "Contents", "Info.plist");
+ const bundleVersion = run("/usr/libexec/PlistBuddy", [
+ "-c",
+ "Print:CFBundleVersion",
+ infoPlist,
+ ]).trim();
+ if (!/^\d+(?:\.\d+){0,2}$/.test(bundleVersion)) {
+ throw new Error(`CFBundleVersion must be numeric: ${bundleVersion}`);
+ }
+ if (bundleVersion !== expectedBundleVersion) {
+ throw new Error(
+ `CFBundleVersion ${bundleVersion} does not match configured ${expectedBundleVersion}`,
+ );
+ }
+ const marketingVersion = run("/usr/libexec/PlistBuddy", [
+ "-c",
+ "Print:CFBundleShortVersionString",
+ infoPlist,
+ ]).trim();
+ if (marketingVersion !== expectedMarketingVersion) {
+ throw new Error(
+ `CFBundleShortVersionString ${marketingVersion} does not match expected ${expectedMarketingVersion}`,
+ );
+ }
+
+ for (const member of [...THIN_MEMBERS, ...MULTI_ARCH_MEMBERS]) {
+ const fullMember = path.join(scratch, member);
+ const minos = readMachOMinimumVersion(fullMember, expected);
+ if (compareVersions(minos, requiredMacOS) > 0) {
+ throw new Error(
+ `${member} (${expected}) requires macOS ${minos}, above ROSI's declared ${requiredMacOS} floor`,
+ );
+ }
+ }
+
+ run("codesign", [
+ "--verify",
+ "--deep",
+ "--strict",
+ "--verbose=2",
+ appPath,
+ ]);
+ const hostTeam = verifyDeveloperIdSignature(appPath, "macOS app");
+ const hostEntitlements = readEntitlementsTemplate(
+ path.join(root, "src-tauri", "entitlements.plist"),
+ );
+ verifySignedEntitlements(appPath, hostEntitlements);
+ for (const member of [...THIN_MEMBERS, ...MULTI_ARCH_MEMBERS].filter(
+ (m) => !m.endsWith("/rosi"),
+ )) {
+ const fullMember = path.join(scratch, member);
+ verifySignedEntitlements(fullMember, hostEntitlements);
+ const sidecarTeam = verifyDeveloperIdSignature(
+ fullMember,
+ `${path.basename(member)} sidecar`,
+ );
+ if (sidecarTeam !== hostTeam) {
+ throw new Error(
+ `${member} TeamIdentifier ${sidecarTeam} does not match host ${hostTeam}`,
+ );
+ }
+ }
+
+ run("xcrun", ["stapler", "validate", appPath]);
+ run("spctl", ["--assess", "--type", "execute", "--verbose=2", appPath]);
+ }
} finally {
fs.rmSync(scratch, { recursive: true, force: true });
}
@@ -212,11 +394,12 @@ async function packMacosUpdaterArchive({
version,
outputDir,
sign = true,
+ verifySignature = sign,
}) {
if (!ARCHES[arch]) throw new Error(`unsupported macOS arch: ${arch}`);
if (!fs.existsSync(input))
throw new Error(`missing per-arch updater archive: ${input}`);
- assertPerArchBundle(input, arch);
+ assertPerArchBundle(input, arch, { verifySignature });
const output = path.join(
outputDir ?? path.dirname(input),
diff --git a/scripts/release-preflight.js b/scripts/release-preflight.js
index 52779269..4cc108b6 100644
--- a/scripts/release-preflight.js
+++ b/scripts/release-preflight.js
@@ -41,12 +41,27 @@ function git(args) {
}).trimEnd();
}
+function assertZstdRunnable() {
+ try {
+ execFileSync("zstd", ["--version"], { stdio: "ignore" });
+ } catch {
+ throw new Error(
+ "zstd was not found or cannot run. Install it with: brew install zstd",
+ );
+ }
+}
+
/**
* Release source checks: the right branch, a clean tree, and HEAD pushed to
* its upstream. Hosted CI is not required here; it runs on pushes but does
* not gate releases.
*/
function runPreflight() {
+ // macOS updater archives need the zstd CLI; fail before any mac build starts.
+ if (process.platform === "darwin") {
+ assertZstdRunnable();
+ }
+
const version = String(packageJson.version ?? "");
const expectedBranch = expectedReleaseBranch(version);
const branch = git(["branch", "--show-current"]);
diff --git a/scripts/round2-release-updater.test.mjs b/scripts/round2-release-updater.test.mjs
index 3240396c..436b9c67 100644
--- a/scripts/round2-release-updater.test.mjs
+++ b/scripts/round2-release-updater.test.mjs
@@ -9,7 +9,10 @@ import { fileURLToPath } from "node:url";
import { createRequire } from "node:module";
import { copyBundledNotices } from "./copy-bundled-licenses.js";
import { validateStableMetadataChange } from "./check-stable-metadata-pr.mjs";
-import { syncChangelogForVersion } from "./sync-version-helpers.js";
+import {
+ macBundleVersionFromSemver,
+ syncChangelogForVersion,
+} from "./sync-version-helpers.js";
import { run as updateMetainfo } from "./update-metainfo.js";
import { validateChangelogForVersion } from "./validate-changelog-version.js";
import {
@@ -55,7 +58,10 @@ function metadataFiles() {
"src-tauri/tauri.conf.json": json({
productName: "ROSI",
version: beta,
- bundle: { resources: {} },
+ bundle: {
+ resources: {},
+ macOS: { bundleVersion: macBundleVersionFromSemver(beta) },
+ },
}),
"CHANGELOG.md": `# ROSI\n\n## Changes in \`v${beta}:\`\n\n- Beta notes.\n`,
"run.rosie.rosi.metainfo.xml": `\n run.rosie.rosi.desktop \n https://example.invalid/rosi \n \n \n \n \n \n \n`,
@@ -88,6 +94,10 @@ function metadataFiles() {
head["src-tauri/tauri.conf.json"] = json({
...JSON.parse(base["src-tauri/tauri.conf.json"]),
version: stable,
+ bundle: {
+ resources: {},
+ macOS: { bundleVersion: macBundleVersionFromSemver(stable) },
+ },
});
head["CHANGELOG.md"] =
`# ROSI\n\n## Changes in \`v${stable}:\`\n\n- Stable notes.\n\n${base["CHANGELOG.md"]}`;
@@ -162,6 +172,14 @@ function realStablePromotionFixture() {
.replaceAll(stable, stableVersion);
}
}
+ for (const [files, version] of [
+ [base, betaVersion],
+ [head, stableVersion],
+ ]) {
+ const conf = JSON.parse(files["src-tauri/tauri.conf.json"]);
+ conf.bundle.macOS.bundleVersion = macBundleVersionFromSemver(version);
+ files["src-tauri/tauri.conf.json"] = json(conf);
+ }
const betaCallout =
/^> \[!NOTE\]\r?\n> 🅱️ This is a Beta build\.\r?\n(?:\r?\n)?/mu;
diff --git a/scripts/validate-updater-live.js b/scripts/validate-updater-live.js
index 385171dd..218c8e63 100644
--- a/scripts/validate-updater-live.js
+++ b/scripts/validate-updater-live.js
@@ -26,6 +26,7 @@ import path from "path";
import { fileURLToPath, pathToFileURL } from "url";
import { spawnSync } from "child_process";
import { verifyUpdaterSignatures } from "./updater-signature-verifier.js";
+import { resolveUpdaterTargets } from "./gpg-sign.js";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const root = path.join(__dirname, "..");
@@ -264,7 +265,12 @@ export function resolveLiveUpdaterTargets(name) {
) {
return [];
}
- if (/\.(exe|msi|dmg|flatpak|appimage|zip)$/i.test(name)) {
+ // Manifests also reference macOS .app.tar.gz / .app.tar.zst archives, which
+ // only gpg-sign's resolver knows about.
+ if (
+ /\.(exe|msi|dmg|flatpak|appimage|zip)$/i.test(name) ||
+ resolveUpdaterTargets(name).length > 0
+ ) {
return [{ os: "live", arch: "artifact" }];
}
return [];
diff --git a/scripts/validate-updater-manifest.js b/scripts/validate-updater-manifest.js
index 7050fd9f..2c145c92 100644
--- a/scripts/validate-updater-manifest.js
+++ b/scripts/validate-updater-manifest.js
@@ -65,6 +65,28 @@ function hasMinisignEnvelope(value) {
);
}
+// Only a line starting with the exact "trusted comment: " prefix counts; the
+// untrusted comment line also contains "trusted comment:" as a substring.
+function minisignTrustedComment(value) {
+ const outer = decodeStrictBase64(value);
+ if (!outer) return null;
+ const line = outer
+ .toString("utf8")
+ .trim()
+ .split(/\r?\n/)
+ .find((entry) => entry.startsWith("trusted comment: "));
+ return line === undefined ? null : line.slice("trusted comment: ".length);
+}
+
+// Tauri writes tab-separated key:value fields, e.g.
+// timestamp:1700000000\tfile:ROSI.app.tar.gz\tversion:5.0.2.
+function minisignSignedVersion(value) {
+ const comment = minisignTrustedComment(value);
+ if (comment === null) return null;
+ const field = comment.split("\t").find((part) => part.startsWith("version:"));
+ return field === undefined ? null : field.slice("version:".length);
+}
+
export function validateManifestData(data, filePath) {
const problems = [];
const fail = (message) => problems.push(message);
@@ -196,6 +218,19 @@ export function validateManifestData(data, filePath) {
fail(
`${filePath}: platforms.${key}.signature must be a base64-encoded minisign envelope`,
);
+ } else {
+ // tauri.conf.json sets requireSignedVersion, so the signed version must
+ // be present and must match the manifest it is served under.
+ const signedVersion = minisignSignedVersion(platform.signature);
+ if (signedVersion === null) {
+ fail(
+ `${filePath}: platforms.${key}.signature has no version: field in its trusted comment`,
+ );
+ } else if (signedVersion !== data.version) {
+ fail(
+ `${filePath}: platforms.${key}.signature is signed for version ${signedVersion}, manifest version is ${data.version}`,
+ );
+ }
}
}
return problems;
diff --git a/scripts/verify-release-draft.js b/scripts/verify-release-draft.js
index 412c9557..fb8e2cb9 100644
--- a/scripts/verify-release-draft.js
+++ b/scripts/verify-release-draft.js
@@ -77,10 +77,24 @@ export function requiredDraftInstallerNames({
return names;
}
+// macOS updater archives are not installers, but each one ships with the same
+// minisign `.sig` and GPG `.asc` sidecars and must be listed in a SHA256SUMS.
+export function requiredDraftUpdaterArchiveNames() {
+ return [
+ "ROSI.app.tar.gz",
+ "ROSI-aarch64.app.tar.zst",
+ "ROSI-x86_64.app.tar.zst",
+ ];
+}
+
export function requiredDraftSidecarNames(installers) {
return installers.flatMap((name) => {
const names = [`${name}.asc`];
- if (/\.exe$/i.test(name) || /\.AppImage$/i.test(name)) {
+ if (
+ /\.exe$/i.test(name) ||
+ /\.AppImage$/i.test(name) ||
+ /\.app\.tar\.(?:gz|zst)$/i.test(name)
+ ) {
names.unshift(`${name}.sig`);
}
return names;
@@ -366,10 +380,12 @@ export function verifyGpgDetachedSignature({
export function requiredDraftAssetNames(options = {}) {
const requireLinuxAarch64 = Boolean(options.requireLinuxAarch64);
const installers = requiredDraftInstallerNames({ requireLinuxAarch64 });
+ const updaterArchives = requiredDraftUpdaterArchiveNames();
return Array.from(
new Set([
...installers,
- ...requiredDraftSidecarNames(installers),
+ ...updaterArchives,
+ ...requiredDraftSidecarNames([...installers, ...updaterArchives]),
...requiredDraftChecksumNames({ requireLinuxAarch64 }),
...requiredDraftStableManifestNames({ requireLinuxAarch64 }),
...requiredDraftBetaManifestNames({ requireLinuxAarch64 }),
@@ -678,7 +694,10 @@ async function verifyDraftGpgAndChecksums({
}
assetsByName.set(asset.name, asset);
}
- const installers = requiredDraftInstallerNames({ requireLinuxAarch64 });
+ const signedNames = [
+ ...requiredDraftInstallerNames({ requireLinuxAarch64 }),
+ ...requiredDraftUpdaterArchiveNames(),
+ ];
const requiredChecksumNames = requiredDraftChecksumNames({
requireLinuxAarch64,
})
@@ -703,7 +722,7 @@ async function verifyDraftGpgAndChecksums({
);
}
const expectedSignatureNames = [
- ...requiredDraftSidecarNames(installers).filter((name) =>
+ ...requiredDraftSidecarNames(signedNames).filter((name) =>
name.endsWith(".asc"),
),
...checksumNames.map((name) => `${name}.asc`),
@@ -773,7 +792,7 @@ async function verifyDraftGpgAndChecksums({
for (const payloadName of listed) covered.add(payloadName);
}
const requiredPayloadNames = [
- ...installers,
+ ...signedNames,
...requiredDraftStableManifestNames({ requireLinuxAarch64 }),
...requiredDraftBetaManifestNames({ requireLinuxAarch64 }),
];
diff --git a/src-tauri/gen/schemas/linux-schema.json b/src-tauri/gen/schemas/linux-schema.json
index 4018a152..c8e4edfd 100644
--- a/src-tauri/gen/schemas/linux-schema.json
+++ b/src-tauri/gen/schemas/linux-schema.json
@@ -410,6 +410,30 @@
"const": "allow-download-video",
"markdownDescription": "Enables the download_video command without any pre-configured scope."
},
+ {
+ "description": "Enables the e2e_cancel_close_request command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-e2e-cancel-close-request",
+ "markdownDescription": "Enables the e2e_cancel_close_request command without any pre-configured scope."
+ },
+ {
+ "description": "Enables the e2e_emit_stale_download_events command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-e2e-emit-stale-download-events",
+ "markdownDescription": "Enables the e2e_emit_stale_download_events command without any pre-configured scope."
+ },
+ {
+ "description": "Enables the e2e_network_pipelining_probe command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-e2e-network-pipelining-probe",
+ "markdownDescription": "Enables the e2e_network_pipelining_probe command without any pre-configured scope."
+ },
+ {
+ "description": "Enables the e2e_updater_install_probe command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-e2e-updater-install-probe",
+ "markdownDescription": "Enables the e2e_updater_install_probe command without any pre-configured scope."
+ },
{
"description": "Enables the export_settings command without any pre-configured scope.",
"type": "string",
@@ -428,6 +452,12 @@
"const": "allow-get-beta-updater-target",
"markdownDescription": "Enables the get_beta_updater_target command without any pre-configured scope."
},
+ {
+ "description": "Enables the get_compact_updater_target command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-get-compact-updater-target",
+ "markdownDescription": "Enables the get_compact_updater_target command without any pre-configured scope."
+ },
{
"description": "Enables the get_default_settings command without any pre-configured scope.",
"type": "string",
@@ -656,6 +686,30 @@
"const": "deny-download-video",
"markdownDescription": "Denies the download_video command without any pre-configured scope."
},
+ {
+ "description": "Denies the e2e_cancel_close_request command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-e2e-cancel-close-request",
+ "markdownDescription": "Denies the e2e_cancel_close_request command without any pre-configured scope."
+ },
+ {
+ "description": "Denies the e2e_emit_stale_download_events command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-e2e-emit-stale-download-events",
+ "markdownDescription": "Denies the e2e_emit_stale_download_events command without any pre-configured scope."
+ },
+ {
+ "description": "Denies the e2e_network_pipelining_probe command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-e2e-network-pipelining-probe",
+ "markdownDescription": "Denies the e2e_network_pipelining_probe command without any pre-configured scope."
+ },
+ {
+ "description": "Denies the e2e_updater_install_probe command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-e2e-updater-install-probe",
+ "markdownDescription": "Denies the e2e_updater_install_probe command without any pre-configured scope."
+ },
{
"description": "Denies the export_settings command without any pre-configured scope.",
"type": "string",
@@ -674,6 +728,12 @@
"const": "deny-get-beta-updater-target",
"markdownDescription": "Denies the get_beta_updater_target command without any pre-configured scope."
},
+ {
+ "description": "Denies the get_compact_updater_target command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-get-compact-updater-target",
+ "markdownDescription": "Denies the get_compact_updater_target command without any pre-configured scope."
+ },
{
"description": "Denies the get_default_settings command without any pre-configured scope.",
"type": "string",
@@ -872,6 +932,12 @@
"const": "core:app:allow-default-window-icon",
"markdownDescription": "Enables the default_window_icon command without any pre-configured scope."
},
+ {
+ "description": "Enables the exit command without any pre-configured scope.",
+ "type": "string",
+ "const": "core:app:allow-exit",
+ "markdownDescription": "Enables the exit command without any pre-configured scope."
+ },
{
"description": "Enables the fetch_data_store_identifiers command without any pre-configured scope.",
"type": "string",
@@ -962,6 +1028,12 @@
"const": "core:app:deny-default-window-icon",
"markdownDescription": "Denies the default_window_icon command without any pre-configured scope."
},
+ {
+ "description": "Denies the exit command without any pre-configured scope.",
+ "type": "string",
+ "const": "core:app:deny-exit",
+ "markdownDescription": "Denies the exit command without any pre-configured scope."
+ },
{
"description": "Denies the fetch_data_store_identifiers command without any pre-configured scope.",
"type": "string",
@@ -2222,6 +2294,12 @@
"const": "core:window:allow-set-fullscreen",
"markdownDescription": "Enables the set_fullscreen command without any pre-configured scope."
},
+ {
+ "description": "Enables the set_fullscreen_on_monitor command without any pre-configured scope.",
+ "type": "string",
+ "const": "core:window:allow-set-fullscreen-on-monitor",
+ "markdownDescription": "Enables the set_fullscreen_on_monitor command without any pre-configured scope."
+ },
{
"description": "Enables the set_icon command without any pre-configured scope.",
"type": "string",
@@ -2690,6 +2768,12 @@
"const": "core:window:deny-set-fullscreen",
"markdownDescription": "Denies the set_fullscreen command without any pre-configured scope."
},
+ {
+ "description": "Denies the set_fullscreen_on_monitor command without any pre-configured scope.",
+ "type": "string",
+ "const": "core:window:deny-set-fullscreen-on-monitor",
+ "markdownDescription": "Denies the set_fullscreen_on_monitor command without any pre-configured scope."
+ },
{
"description": "Denies the set_icon command without any pre-configured scope.",
"type": "string",
@@ -2919,10 +3003,10 @@
"markdownDescription": "Denies the save command without any pre-configured scope."
},
{
- "description": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`",
+ "description": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`",
"type": "string",
"const": "notification:default",
- "markdownDescription": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`"
+ "markdownDescription": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`"
},
{
"description": "Enables the batch command without any pre-configured scope.",
@@ -3008,6 +3092,12 @@
"const": "notification:allow-remove-active",
"markdownDescription": "Enables the remove_active command without any pre-configured scope."
},
+ {
+ "description": "Enables the remove_listener command without any pre-configured scope.",
+ "type": "string",
+ "const": "notification:allow-remove-listener",
+ "markdownDescription": "Enables the remove_listener command without any pre-configured scope."
+ },
{
"description": "Enables the request_permission command without any pre-configured scope.",
"type": "string",
@@ -3104,6 +3194,12 @@
"const": "notification:deny-remove-active",
"markdownDescription": "Denies the remove_active command without any pre-configured scope."
},
+ {
+ "description": "Denies the remove_listener command without any pre-configured scope.",
+ "type": "string",
+ "const": "notification:deny-remove-listener",
+ "markdownDescription": "Denies the remove_listener command without any pre-configured scope."
+ },
{
"description": "Denies the request_permission command without any pre-configured scope.",
"type": "string",
diff --git a/src-tauri/gen/schemas/windows-schema.json b/src-tauri/gen/schemas/windows-schema.json
index 7a0a3b48..c8e4edfd 100644
--- a/src-tauri/gen/schemas/windows-schema.json
+++ b/src-tauri/gen/schemas/windows-schema.json
@@ -452,6 +452,12 @@
"const": "allow-get-beta-updater-target",
"markdownDescription": "Enables the get_beta_updater_target command without any pre-configured scope."
},
+ {
+ "description": "Enables the get_compact_updater_target command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-get-compact-updater-target",
+ "markdownDescription": "Enables the get_compact_updater_target command without any pre-configured scope."
+ },
{
"description": "Enables the get_default_settings command without any pre-configured scope.",
"type": "string",
@@ -722,6 +728,12 @@
"const": "deny-get-beta-updater-target",
"markdownDescription": "Denies the get_beta_updater_target command without any pre-configured scope."
},
+ {
+ "description": "Denies the get_compact_updater_target command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-get-compact-updater-target",
+ "markdownDescription": "Denies the get_compact_updater_target command without any pre-configured scope."
+ },
{
"description": "Denies the get_default_settings command without any pre-configured scope.",
"type": "string",
diff --git a/src-tauri/src/platform.rs b/src-tauri/src/platform.rs
index bc0bbfe8..17c6226d 100644
--- a/src-tauri/src/platform.rs
+++ b/src-tauri/src/platform.rs
@@ -32,6 +32,28 @@ pub fn get_distribution_channel() -> &'static str {
distribution_channel()
}
+#[cfg(target_os = "macos")]
+fn is_rosetta_translated() -> bool {
+ let mut ret: libc::c_int = 0;
+ let mut size: libc::size_t = std::mem::size_of_val(&ret);
+ let name = c"sysctl.proc_translated";
+ let res = unsafe {
+ libc::sysctlbyname(
+ name.as_ptr(),
+ &mut ret as *mut _ as *mut libc::c_void,
+ &mut size,
+ std::ptr::null_mut(),
+ 0,
+ )
+ };
+ res == 0 && ret == 1
+}
+
+#[cfg(not(target_os = "macos"))]
+fn is_rosetta_translated() -> bool {
+ false
+}
+
#[tauri::command]
pub fn get_beta_updater_target() -> String {
use tauri::utils::config::BundleType;
@@ -41,10 +63,14 @@ pub fn get_beta_updater_target() -> String {
"macos" => "darwin",
other => other,
};
- let arch = match std::env::consts::ARCH {
- "x86" => "i686",
- "arm64" => "aarch64",
- other => other,
+ let arch = if is_rosetta_translated() {
+ "aarch64"
+ } else {
+ match std::env::consts::ARCH {
+ "x86" => "i686",
+ "arm64" => "aarch64",
+ other => other,
+ }
};
let installer = match tauri::utils::platform::bundle_type() {
Some(BundleType::Deb) => Some("deb"),
@@ -76,10 +102,15 @@ pub fn get_compact_updater_target(beta: bool) -> Option {
{
return None;
}
- // Compile-time arch: a Rosetta process asks for the x86_64 bundle.
- let arch = match std::env::consts::ARCH {
- arch @ ("aarch64" | "x86_64") => arch,
- _ => return None,
+ // Target arch: an x86_64 process running under Rosetta translation requests
+ // the native aarch64 bundle so the update migrates to native execution.
+ let arch = if is_rosetta_translated() {
+ "aarch64"
+ } else {
+ match std::env::consts::ARCH {
+ arch @ ("aarch64" | "x86_64") => arch,
+ _ => return None,
+ }
};
let channel = if beta { "-beta" } else { "" };
Some(format!("darwin{channel}-{arch}-app-zst"))
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 75eb5f90..1d619b05 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -108,11 +108,10 @@
"updater": {
"endpoints": [
"https://github.com/BurntToasters/ROSI/releases/latest/download/latest-{{target}}-{{arch}}.json",
- "https://github.com/BurntToasters/ROSI/releases/latest/download/latest-{{target}}.json",
- "https://github.com/BurntToasters/ROSI/releases/download/v{{current_version}}/latest-{{target}}-{{arch}}.json",
- "https://github.com/BurntToasters/ROSI/releases/download/v{{current_version}}/latest-{{target}}.json"
+ "https://github.com/BurntToasters/ROSI/releases/latest/download/latest-{{target}}.json"
],
- "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDc0MzRDOTlCMDBEQjQ2REEKUldUYVJ0c0FtOGswZEpNTnNPZlBOZXhyNkJFT0F1L0hMWjlWcWxiZlA4R3hUTERPbTEvWXY0YWoK"
+ "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDc0MzRDOTlCMDBEQjQ2REEKUldUYVJ0c0FtOGswZEpNTnNPZlBOZXhyNkJFT0F1L0hMWjlWcWxiZlA4R3hUTERPbTEvWXY0YWoK",
+ "requireSignedVersion": true
}
}
}
diff --git a/src-tauri/vendor/tauri-plugin-updater/PATCHES.md b/src-tauri/vendor/tauri-plugin-updater/PATCHES.md
index f9ebfedb..286a3ba2 100644
--- a/src-tauri/vendor/tauri-plugin-updater/PATCHES.md
+++ b/src-tauri/vendor/tauri-plugin-updater/PATCHES.md
@@ -22,7 +22,7 @@ reason (`.github/dependabot.yml`).
| Source | `https://crates.io/api/v1/crates/tauri-plugin-updater/2.14.0/download` |
| crates.io sha256 | `7259989d4fe11b2bf51f7d671642249b1837c4ae2da1430dc713ae38f98ceeec` |
| Upstream git sha1 | `44293a5722efcaf27060504e63b17aeba721b40f` (`.cargo_vcs_info.json`, path `plugins/updater`) |
-| Newest stable 2.x seen | `2.14.0` (checked 2026-10-17 via crates.io; `2.13.3` and `2.13.2` are older) |
+| Newest stable 2.x seen | `2.14.1` (seen 2026-10-28 in the local crates.io cache). Dependency-only: `base64` 0.22 to 0.23 and `zip` 4 to 9 in `Cargo.toml`, `src/` byte-identical to 2.14.0. Not adopted; the base stays `2.14.0`. Before that, `2.14.0` was the newest (checked 2026-10-17; `2.13.3` and `2.13.2` are older) |
`Cargo.toml.orig`, `README.md`, `build.rs`, `permissions/`,
`CHANGELOG.md`, `SECURITY.md`, `api-iife.js`, the `LICENSE*` files and
@@ -44,9 +44,9 @@ patch -p1 -d -i ROSI.patch
| File | Status | Why the patch exists |
| --- | --- | --- |
-| `src/install_safety.rs` | new | Shared install checks. macOS: bundle identity and completeness, a sibling backup path, a process-wide install lock, and a privileged replacement script whose arguments are shell-quoted. Windows: `ShellExecuteW` result check (values `<= 32` are failures). Archives: confined tar member, parent-directory and symlink-target checks, so an update cannot write outside the extract root. Linux: helper binaries (`pkexec`, `sudo`, `zenity`, `kdialog`, `sh`) are resolved only from fixed root-owned system directories and never through `PATH`; the privileged environment is an allowlist (session display, D-Bus, locale vars) and sets `PATH` to fixed system directories. Also cross-device move and copy fallback. Its `#[cfg(test)]` module runs with `cargo test`. |
+| `src/install_safety.rs` | new | Shared install checks. macOS: bundle identity and completeness, Mach-O architecture validation (`macos_bundle_executable_supports_host_arch`, checking both native execution and Rosetta 2 translation), a sibling backup path, a process-wide install lock, and a privileged replacement script whose arguments are shell-quoted. Windows: `ShellExecuteW` result check (values `<= 32` are failures). Archives: confined tar member, parent-directory and symlink-target checks, so an update cannot write outside the extract root. Linux: helper binaries (`pkexec`, `sudo`, `zenity`, `kdialog`, `sh`) are resolved only from fixed root-owned system directories and never through `PATH`; the privileged environment is an allowlist (session display, D-Bus, locale vars) and sets `PATH` to fixed system directories. Also cross-device move and copy fallback. Its `#[cfg(test)]` module runs with `cargo test`. |
| `src/appimage_install.rs` | new | Validates an AppImage before it replaces the live file: ELF class, machine and entrypoint checks, squashfs and ISO9660 structure for Type 2 images. Stages in a private work directory, moves the old image aside, then renames the stage into place, restoring the old image if that fails. Used on Linux and BSD only. |
-| `src/appimage_archive.rs` | new | Bounded `.tar.gz` extraction for AppImage updates: entry-count limit, total decompressed-byte limit, exactly one regular `.AppImage` member, no links, truncation detection. Used on Linux and BSD. Its `BoundedArchiveReader` (decompressed-byte cap, tar end-block and trailing-data check) also bounds macOS app extraction. |
+| `src/appimage_archive.rs` | new | Bounded `.tar.gz` extraction for AppImage updates: entry-count limit, total decompressed-byte limit, exactly one regular `.AppImage` member, no links, truncation detection. Used on Linux and BSD. Its `BoundedArchiveReader` (decompressed-byte cap, tar end-block and trailing-data check) also bounds macOS app extraction. The module is compiled on macOS without the `zip` feature, because its `flate2` and `tar` dependencies are unconditional there. On Linux and BSD it still needs `zip`. |
| `src/updater.rs` | modified | See details below. |
| `src/lib.rs` | modified | Adds `mod install_safety;`. Plumbs the fallible `on_before_exit` hook and a new `on_windows_installer_launched` hook into the updater state. Windows cleanup now runs from the launched hook, not before launch. |
| `src/error.rs` | modified | Adds `Error::BeforeExit(String)` so a failed app-state flush aborts installation and keeps the update retryable. |
@@ -65,7 +65,9 @@ patch -p1 -d -i ROSI.patch
the running byte count (`append_download_chunk`). A body longer than its declared length
is an error.
- macOS: installs go through `install_inner_locked` inside the install lock. The new bundle
- is extracted with the confined extractor (`extract_macos_app_archive`), the live bundle is
+ is extracted with the confined extractor (`extract_macos_app_archive`), verified to support
+ the host CPU architecture (`macos_bundle_executable_supports_host_arch` for the main executable
+ and bundled sidecars, including Rosetta 2 migration to native Apple Silicon), the live bundle is
moved to the sibling backup, the new bundle is moved live, and the backup is removed only
after the identity check passes. `restore_macos_live_bundle` and
`recover_macos_live_bundle` roll back a partial swap. When the user-owned path is not
@@ -112,8 +114,14 @@ functions are not dead: their only caller is the Linux/BSD `install_appimage` pa
installs on Linux.
Fix: a `#![cfg_attr(target_os = "macos", allow(dead_code))]` at the top of both files.
-Linux and BSD still warn about real dead code. macOS stays clean. The modules still
-compile on macOS so their tests keep running.
+Linux and BSD still warn about real dead code. macOS has no dead-code warnings. The modules
+still compile on macOS so their tests keep running.
+
+Other default clippy lints still fire on pre-existing code. On 2026-10-28, a cross check
+(`cargo clippy --lib --tests --target aarch64-apple-darwin`, Rust 1.98.1, from Windows)
+reported 5 lib lints (`map_or`, `div_ceil`, range `contains`) in `appimage_install.rs`, and 10
+more in test code (`appimage_install.rs`, `appimage_archive.rs`, `install_safety.rs`,
+`updater.rs`). None is in the Mach-O, zstd or macOS archive extraction code.
## Known gaps
@@ -136,8 +144,11 @@ compile on macOS so their tests keep running.
`src-tauri` as the seed. It is a standalone root package, so its unit tests run with
`cargo test --locked --manifest-path src-tauri/vendor/tauri-plugin-updater/Cargo.toml --lib`
(CI gate `vendorUpdater` in `scripts/test-all.js`). The root `cargo test --all-targets`
- gate does not run them. Last run (macOS, 2026-10-24): 50 pass, 1 ignored (the real-archive
- test that `scripts/e2e-updater-zst.mjs` runs).
+ gate does not run them. Last run on Windows (2026-10-28, after the Mach-O and zstd changes):
+ 34 pass, 0 fail, 0 ignored. The macOS run is pending for this state. Its count and its one
+ ignored test (the real-archive test that `scripts/e2e-updater-zst.mjs` runs with
+ `ROSI_UPDATER_ZST_E2E_ARCHIVES`) must be confirmed on a Mac, through the macOS CI job or
+ `npm run test:e2e:updater-zst`.
## Rebase procedure (new upstream version X)
diff --git a/src-tauri/vendor/tauri-plugin-updater/ROSI.patch b/src-tauri/vendor/tauri-plugin-updater/ROSI.patch
index 63d9d46e..2f4347e8 100644
--- a/src-tauri/vendor/tauri-plugin-updater/ROSI.patch
+++ b/src-tauri/vendor/tauri-plugin-updater/ROSI.patch
@@ -1,6 +1,6 @@
-diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/Cargo.toml b/Cargo.toml
---- a/Cargo.toml
-+++ b/Cargo.toml
+diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json -x PATCHES.md -x ROSI.patch a/Cargo.toml b/Cargo.toml
+--- a/Cargo.toml 2006-07-23 18:21:28.000000000 -0700
++++ b/Cargo.toml 2026-10-27 23:33:49.000000000 -0700
@@ -187,6 +187,10 @@
[target.'cfg(target_os = "macos")'.dependencies.tar]
version = "0.4"
@@ -12,12 +12,13 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/Cargo.t
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.61.0"
features = [
-diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/appimage_archive.rs b/src/appimage_archive.rs
---- a/src/appimage_archive.rs
-+++ b/src/appimage_archive.rs
-@@ -0,0 +1,397 @@
-+// The AppImage helpers are compiled for macOS only because the shared module
-+// list includes it; their callers are Linux and BSD only. Keep dead_code quiet there.
+diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json -x PATCHES.md -x ROSI.patch a/src/appimage_archive.rs b/src/appimage_archive.rs
+--- a/src/appimage_archive.rs 1969-12-31 16:00:00.000000000 -0800
++++ b/src/appimage_archive.rs 2026-10-28 13:12:25.000000000 -0700
+@@ -0,0 +1,398 @@
++// Bounded tar.gz helpers. `extract_appimage_from_archive` is called by the Linux and BSD
++// AppImage install path. On macOS, `BoundedArchiveReader` bounds app extraction, and the
++// AppImage-only functions have no caller, so dead_code is allowed there.
+#![cfg_attr(target_os = "macos", allow(dead_code))]
+
+use super::{appimage_install, Error, Result};
@@ -413,9 +414,9 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/app
+ assert!(extract_with_limits(&too_many_entries, 1 << 20, 2 << 20, 2).is_err());
+ }
+}
-diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/appimage_install.rs b/src/appimage_install.rs
---- a/src/appimage_install.rs
-+++ b/src/appimage_install.rs
+diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json -x PATCHES.md -x ROSI.patch a/src/appimage_install.rs b/src/appimage_install.rs
+--- a/src/appimage_install.rs 1969-12-31 16:00:00.000000000 -0800
++++ b/src/appimage_install.rs 2026-10-18 13:21:50.000000000 -0700
@@ -0,0 +1,1115 @@
+// The AppImage helpers are compiled for macOS only because the shared module
+// list includes it; their callers are Linux and BSD only. Keep dead_code quiet there.
@@ -1532,9 +1533,9 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/app
+ super::tests::appimage(2, super::tests::host_machine(), suffix)
+ }
+}
-diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/commands.rs b/src/commands.rs
---- a/src/commands.rs
-+++ b/src/commands.rs
+diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json -x PATCHES.md -x ROSI.patch a/src/commands.rs b/src/commands.rs
+--- a/src/commands.rs 2006-07-23 18:21:28.000000000 -0700
++++ b/src/commands.rs 2026-10-17 20:04:36.000000000 -0700
@@ -46,6 +46,7 @@
timeout: Option,
proxy: Option,
@@ -1551,9 +1552,9 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/com
let updater = builder.build()?;
let update = updater.check().await?;
-diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/error.rs b/src/error.rs
---- a/src/error.rs
-+++ b/src/error.rs
+diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json -x PATCHES.md -x ROSI.patch a/src/error.rs b/src/error.rs
+--- a/src/error.rs 2006-07-23 18:21:28.000000000 -0700
++++ b/src/error.rs 2026-10-17 20:04:37.000000000 -0700
@@ -89,6 +89,9 @@
/// The package manager could not install the downloaded Linux package.
#[error("Failed to install package")]
@@ -1564,10 +1565,10 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/err
/// The downloaded update is not in a format the updater can install on the current platform.
#[error("invalid updater binary format")]
InvalidUpdaterFormat,
-diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/install_safety.rs b/src/install_safety.rs
---- a/src/install_safety.rs
-+++ b/src/install_safety.rs
-@@ -0,0 +1,936 @@
+diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json -x PATCHES.md -x ROSI.patch a/src/install_safety.rs b/src/install_safety.rs
+--- a/src/install_safety.rs 1969-12-31 16:00:00.000000000 -0800
++++ b/src/install_safety.rs 2026-10-28 13:11:58.000000000 -0700
+@@ -0,0 +1,1108 @@
+// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
@@ -1733,6 +1734,178 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/ins
+ }
+}
+
++#[cfg(target_os = "macos")]
++fn is_rosetta_translated() -> bool {
++ let mut ret: libc::c_int = 0;
++ let mut size: libc::size_t = std::mem::size_of_val(&ret);
++ let name = c"sysctl.proc_translated";
++ let res = unsafe {
++ libc::sysctlbyname(
++ name.as_ptr(),
++ &mut ret as *mut _ as *mut libc::c_void,
++ &mut size,
++ std::ptr::null_mut(),
++ 0,
++ )
++ };
++ res == 0 && ret == 1
++}
++
++#[cfg(not(target_os = "macos"))]
++fn is_rosetta_translated() -> bool {
++ false
++}
++
++/// Z02.4: verifies that a Mach-O executable supports the host architecture
++/// before swapping into place.
++pub fn macos_bundle_executable_supports_host_arch(path: &Path) -> bool {
++ macos_executable_supports_runtime_host(path, std::env::consts::ARCH, is_rosetta_translated())
++}
++
++pub fn macos_executable_supports_runtime_host(
++ path: &Path,
++ compile_arch: &str,
++ rosetta_translated: bool,
++) -> bool {
++ let Ok(mut file) = std::fs::File::open(path) else {
++ return false;
++ };
++ use std::io::Read;
++ let mut header = [0u8; 4096];
++ let Ok(n) = file.read(&mut header) else {
++ return false;
++ };
++ macho_bytes_support_runtime_host(&header[..n], compile_arch, rosetta_translated)
++}
++
++pub fn macos_bundle_supports_runtime_host(
++ bundle_path: &Path,
++ compile_arch: &str,
++ rosetta_translated: bool,
++) -> bool {
++ let Some(identity) = macos_app_bundle_identity(bundle_path) else {
++ return false;
++ };
++ let macos_dir = bundle_path.join("Contents/MacOS");
++ let executable = macos_dir.join(&identity.executable);
++ if !macos_executable_supports_runtime_host(&executable, compile_arch, rosetta_translated) {
++ return false;
++ }
++ ["rosi-yt-dlp", "rosi-ffmpeg", "rosi-ffprobe"]
++ .iter()
++ .all(|sidecar| {
++ macos_executable_supports_runtime_host(
++ &macos_dir.join(sidecar),
++ compile_arch,
++ rosetta_translated,
++ )
++ })
++}
++
++pub fn macho_bytes_support_host_arch(bytes: &[u8]) -> bool {
++ macho_bytes_support_runtime_host(bytes, std::env::consts::ARCH, is_rosetta_translated())
++}
++
++pub fn macho_bytes_support_runtime_host(
++ bytes: &[u8],
++ compile_arch: &str,
++ rosetta_translated: bool,
++) -> bool {
++ match compile_arch {
++ "aarch64" => macho_bytes_support_arch(bytes, "aarch64"),
++ "x86_64" if rosetta_translated => {
++ macho_bytes_support_arch(bytes, "aarch64") || macho_bytes_support_arch(bytes, "x86_64")
++ }
++ "x86_64" => macho_bytes_support_arch(bytes, "x86_64"),
++ _ => false,
++ }
++}
++
++pub fn macho_bytes_support_arch(bytes: &[u8], target_arch: &str) -> bool {
++ const MH_MAGIC_64: [u8; 4] = [0xcf, 0xfa, 0xed, 0xfe];
++ const MH_CIGAM_64: [u8; 4] = [0xfe, 0xed, 0xfa, 0xcf];
++ const FAT_MAGIC: [u8; 4] = [0xca, 0xfe, 0xba, 0xbe];
++ const FAT_CIGAM: [u8; 4] = [0xbe, 0xba, 0xfe, 0xca];
++ const FAT_MAGIC_64: [u8; 4] = [0xca, 0xfe, 0xba, 0xbf];
++ const FAT_CIGAM_64: [u8; 4] = [0xbf, 0xba, 0xfe, 0xca];
++
++ const CPU_TYPE_X86_64: u32 = 0x01000007;
++ const CPU_TYPE_ARM64: u32 = 0x0100000c;
++
++ let expected_cputype = match target_arch {
++ "aarch64" | "arm64" => CPU_TYPE_ARM64,
++ "x86_64" | "amd64" => CPU_TYPE_X86_64,
++ _ => return false,
++ };
++
++ if bytes.len() < 8 {
++ return false;
++ }
++
++ if bytes.starts_with(&MH_MAGIC_64) {
++ let cputype = u32::from_le_bytes([bytes[4], bytes[5], bytes[6], bytes[7]]);
++ return cputype == expected_cputype;
++ }
++ if bytes.starts_with(&MH_CIGAM_64) {
++ let cputype = u32::from_be_bytes([bytes[4], bytes[5], bytes[6], bytes[7]]);
++ return cputype == expected_cputype;
++ }
++ if bytes.starts_with(&FAT_MAGIC) || bytes.starts_with(&FAT_CIGAM) {
++ let is_be = bytes.starts_with(&FAT_MAGIC);
++ let nfat = if is_be {
++ u32::from_be_bytes([bytes[4], bytes[5], bytes[6], bytes[7]])
++ } else {
++ u32::from_le_bytes([bytes[4], bytes[5], bytes[6], bytes[7]])
++ };
++ let count = (nfat as usize).min(64);
++ for i in 0..count {
++ let Some(offset) = i.checked_mul(20).and_then(|o| o.checked_add(8)) else {
++ return false;
++ };
++ let Some(slice) = bytes.get(offset..offset + 4) else {
++ return false;
++ };
++ let cputype = if is_be {
++ u32::from_be_bytes([slice[0], slice[1], slice[2], slice[3]])
++ } else {
++ u32::from_le_bytes([slice[0], slice[1], slice[2], slice[3]])
++ };
++ if cputype == expected_cputype {
++ return true;
++ }
++ }
++ return false;
++ }
++ if bytes.starts_with(&FAT_MAGIC_64) || bytes.starts_with(&FAT_CIGAM_64) {
++ let is_be = bytes.starts_with(&FAT_MAGIC_64);
++ let nfat = if is_be {
++ u32::from_be_bytes([bytes[4], bytes[5], bytes[6], bytes[7]])
++ } else {
++ u32::from_le_bytes([bytes[4], bytes[5], bytes[6], bytes[7]])
++ };
++ let count = (nfat as usize).min(64);
++ for i in 0..count {
++ let Some(offset) = i.checked_mul(32).and_then(|o| o.checked_add(8)) else {
++ return false;
++ };
++ let Some(slice) = bytes.get(offset..offset + 4) else {
++ return false;
++ };
++ let cputype = if is_be {
++ u32::from_be_bytes([slice[0], slice[1], slice[2], slice[3]])
++ } else {
++ u32::from_le_bytes([slice[0], slice[1], slice[2], slice[3]])
++ };
++ if cputype == expected_cputype {
++ return true;
++ }
++ }
++ return false;
++ }
++
++ false
++}
++
+/// Session variables pkexec, zenity, and polkit agents need after `env_clear`.
+/// Never includes `PATH`.
+pub const LINUX_PRIVILEGED_ENV_ALLOWLIST: &[&str] = &[
@@ -2504,9 +2677,9 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/ins
+ assert!(resolve_trusted_system_helper("definitely-not-a-zinnia-helper").is_err());
+ }
+}
-diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/lib.rs b/src/lib.rs
---- a/src/lib.rs
-+++ b/src/lib.rs
+diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json -x PATCHES.md -x ROSI.patch a/src/lib.rs b/src/lib.rs
+--- a/src/lib.rs 2006-07-23 18:21:28.000000000 -0700
++++ b/src/lib.rs 2026-10-17 20:04:37.000000000 -0700
@@ -31,6 +31,7 @@
mod commands;
mod config;
@@ -2606,9 +2779,9 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/lib
});
Ok(())
})
-diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/updater.rs b/src/updater.rs
---- a/src/updater.rs
-+++ b/src/updater.rs
+diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json -x PATCHES.md -x ROSI.patch a/src/updater.rs b/src/updater.rs
+--- a/src/updater.rs 2006-07-23 18:21:28.000000000 -0700
++++ b/src/updater.rs 2026-10-28 13:12:24.000000000 -0700
@@ -22,7 +22,7 @@
};
use semver::Version;
@@ -2618,7 +2791,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
use std::ffi::OsStr;
use tauri::{
AppHandle, Resource, Runtime,
-@@ -39,6 +39,31 @@
+@@ -39,6 +39,35 @@
error::{Error, Result},
};
@@ -2633,15 +2806,19 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+#[path = "appimage_install.rs"]
+mod appimage_install;
+
-+#[cfg(all(
-+ feature = "zip",
-+ any(
-+ target_os = "linux",
-+ target_os = "dragonfly",
-+ target_os = "freebsd",
-+ target_os = "netbsd",
-+ target_os = "openbsd",
-+ target_os = "macos"
++// macOS app extraction uses `BoundedArchiveReader` from this module. Its flate2
++// and tar dependencies are unconditional on macOS, so macOS does not need `zip`.
++#[cfg(any(
++ target_os = "macos",
++ all(
++ feature = "zip",
++ any(
++ target_os = "linux",
++ target_os = "dragonfly",
++ target_os = "freebsd",
++ target_os = "netbsd",
++ target_os = "openbsd"
++ )
+ )
+))]
+#[path = "appimage_archive.rs"]
@@ -2650,7 +2827,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
const UPDATER_USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),);
/// The kind of bundle the running application was installed from.
-@@ -143,9 +168,11 @@
+@@ -143,9 +172,11 @@
}
}
@@ -2665,7 +2842,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
/// Function that customizes the `reqwest` client builder used for the updater requests.
/// See [`UpdaterBuilder::configure_client`].
pub type OnBeforeRequest = Arc ClientBuilder + Send + Sync + 'static>;
-@@ -154,6 +181,75 @@
+@@ -154,6 +185,75 @@
/// It receives the current application version and the remote release,
/// and returns `true` when the release should be treated as an update.
pub type VersionComparator = Arc bool + Send + Sync>;
@@ -2741,7 +2918,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
#[cfg(target_os = "macos")]
type MainThreadClosure = Box;
#[cfg(target_os = "macos")]
-@@ -170,13 +266,16 @@
+@@ -170,13 +270,16 @@
/// App name, used for creating named tempfiles
#[cfg(windows)]
app_name: String,
@@ -2759,7 +2936,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
restart_after_install: bool,
}
-@@ -218,11 +317,13 @@
+@@ -218,11 +321,13 @@
run_on_main_thread,
#[cfg(windows)]
app_name: app.package_info().name.clone(),
@@ -2774,7 +2951,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
restart_after_install: true,
},
current_version: app.package_info().version.clone(),
-@@ -400,22 +501,34 @@
+@@ -400,22 +505,34 @@
self
}
@@ -2815,7 +2992,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
self
}
-@@ -453,6 +566,10 @@
+@@ -453,6 +570,10 @@
let arch = updater_arch().ok_or(Error::UnsupportedArch)?;
let executable_path = self.executable_path.clone().unwrap_or(current_exe()?);
@@ -2826,7 +3003,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
// Get the extract_path from the provided executable_path
let extract_path = if cfg!(target_os = "linux") {
-@@ -462,6 +579,7 @@
+@@ -462,6 +583,7 @@
};
Ok(Updater {
@@ -2834,7 +3011,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
current_version: self.current_version,
version_comparator: self.version_comparator,
timeout: self.timeout,
-@@ -495,6 +613,7 @@
+@@ -495,6 +617,7 @@
///
/// Get one from [`crate::UpdaterExt::updater`] or by calling [`UpdaterBuilder::build`].
pub struct Updater {
@@ -2842,7 +3019,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
current_version: Version,
version_comparator: Option,
timeout: Option,
-@@ -537,6 +656,27 @@
+@@ -537,6 +660,27 @@
headers.insert(ACCEPT, HeaderValue::from_static("application/json"));
}
@@ -2870,7 +3047,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
let target = self.current_target()?;
let mut remote_release: Option = None;
-@@ -726,6 +866,7 @@
+@@ -726,6 +870,7 @@
current_version: self.current_version.to_string(),
target: target.to_owned(),
extract_path: self.extract_path.clone(),
@@ -2878,7 +3055,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
version: release.version.to_string(),
date: release.pub_date,
download_url: download_url.clone(),
-@@ -807,6 +948,8 @@
+@@ -807,6 +952,8 @@
/// Extract path
#[allow(unused)]
extract_path: PathBuf,
@@ -2887,7 +3064,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
context: UpdaterContext,
}
-@@ -877,14 +1020,20 @@
+@@ -877,14 +1024,20 @@
.get("Content-Length")
.and_then(|value| value.to_str().ok())
.and_then(|value| value.parse().ok());
@@ -2909,7 +3086,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
on_download_finish();
-@@ -921,7 +1070,7 @@
+@@ -921,7 +1074,7 @@
pub fn install(&self, bytes: impl AsRef<[u8]>) -> Result<()> {
let bytes = bytes.as_ref();
self.verify(bytes)?;
@@ -2918,7 +3095,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
/// Downloads and installs the updater package
-@@ -935,9 +1084,8 @@
+@@ -935,9 +1088,8 @@
on_chunk: C,
on_download_finish: D,
) -> Result<()> {
@@ -2929,7 +3106,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
/// Updates are not supported on mobile, where apps are updated through the app stores.
-@@ -1014,10 +1162,6 @@
+@@ -1014,10 +1166,6 @@
let updater_type = self.extract(bytes)?;
@@ -2940,7 +3117,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
let file = match &updater_type {
WindowsUpdaterType::Nsis { path, .. } => path.as_os_str().to_os_string(),
-@@ -1033,7 +1177,7 @@
+@@ -1033,7 +1181,7 @@
let file = encode_wide(file);
let parameters = encode_wide(parameters);
@@ -2949,7 +3126,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
ShellExecuteW(
std::ptr::null_mut(),
w!("open"),
-@@ -1042,12 +1186,16 @@
+@@ -1042,12 +1190,16 @@
std::ptr::null(),
SW_SHOW,
)
@@ -2972,7 +3149,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
fn updater_parameters(&self, updater_type: &WindowsUpdaterType) -> OsString {
-@@ -1219,113 +1367,36 @@
+@@ -1219,111 +1371,34 @@
}
fn install_appimage(&self, bytes: &[u8]) -> Result<()> {
@@ -3000,8 +3177,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- log::error!("the update is neither an AppImage nor a compressed AppImage");
- return Err(Error::InvalidUpdaterFormat);
- }
-+ let payload = bytes.to_vec();
-
+-
- for tmp_dir_location in self.tmp_dir_locations() {
- let Some(tmp_dir_location) = tmp_dir_location() else {
- continue;
@@ -3076,15 +3252,27 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- Ok(_) => Ok(()),
- };
- }
+- }
++ let payload = bytes.to_vec();
+
+- Err(Error::TempDirNotOnSameMountPoint)
+- }
+-
+- /// Directories to try, in order, for the temporary files of an install: the system temporary
+- /// directory, the user cache directory and the directory holding the app.
+- fn tmp_dir_locations(&self) -> Vec Option + '_>> {
+- vec![
+- Box::new(|| Some(std::env::temp_dir())),
+- Box::new(dirs::cache_dir),
+- Box::new(|| self.extract_path.parent().map(Path::to_path_buf)),
+- ]
+ // Keep the recovery copy beside the installed image when possible so
+ // it survives ordinary `/tmp` cleanup and remains on the install
+ // filesystem for an atomic replacement.
+ let mut temporary_roots = Vec::new();
+ if let Some(parent) = self.extract_path.parent() {
+ temporary_roots.push(parent.to_path_buf());
- }
--
-- Err(Error::TempDirNotOnSameMountPoint)
++ }
+ if let Some(cache_directory) = dirs::cache_dir() {
+ temporary_roots.push(cache_directory);
+ }
@@ -3098,20 +3286,8 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ Ok(())
}
-- /// Directories to try, in order, for the temporary files of an install: the system temporary
-- /// directory, the user cache directory and the directory holding the app.
-- fn tmp_dir_locations(&self) -> Vec Option + '_>> {
-- vec![
-- Box::new(|| Some(std::env::temp_dir())),
-- Box::new(dirs::cache_dir),
-- Box::new(|| self.extract_path.parent().map(Path::to_path_buf)),
-- ]
-- }
--
fn install_deb(&self, bytes: &[u8]) -> Result<()> {
- // First verify the bytes are actually a .deb package
- if !infer::archive::is_deb(bytes) {
-@@ -1333,7 +1404,7 @@
+@@ -1333,7 +1408,7 @@
return Err(Error::InvalidUpdaterFormat);
}
@@ -3120,7 +3296,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
fn install_rpm(&self, bytes: &[u8]) -> Result<()> {
-@@ -1341,29 +1412,43 @@
+@@ -1341,29 +1416,43 @@
if !infer::archive::is_rpm(bytes) {
return Err(Error::InvalidUpdaterFormat);
}
@@ -3154,16 +3330,17 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- let prefix = format!("tauri_{package_extension}_update");
- if let Ok(tmp_dir) = tempfile::Builder::new().prefix(&prefix).tempdir_in(path) {
- let pkg_path = tmp_dir.path().join(format!("package.{package_extension}"));
+-
+- // Try writing the .deb / .rpm file
+- if std::fs::write(&pkg_path, bytes).is_ok() {
+- // If write succeeds, proceed with installation
+- return self.try_install_with_privileges(&pkg_path, install_cmd, install_arg);
+ for tmp_dir_location in tmp_dir_locations {
+ if let Some(path) = tmp_dir_location() {
+ let prefix = format!("tauri_{package_extension}_update");
+ if let Ok(tmp_dir) = tempfile::Builder::new().prefix(&prefix).tempdir_in(path) {
+ let pkg_path = tmp_dir.path().join(format!("package.{package_extension}"));
-
-- // Try writing the .deb / .rpm file
-- if std::fs::write(&pkg_path, bytes).is_ok() {
-- // If write succeeds, proceed with installation
-- return self.try_install_with_privileges(&pkg_path, install_cmd, install_arg);
++
+ // Try writing the .deb / .rpm file
+ if std::fs::write(&pkg_path, bytes).is_ok() {
+ // If write succeeds, proceed with installation
@@ -3177,7 +3354,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
// If write fails, continue to next temp location
}
-@@ -1377,68 +1462,78 @@
+@@ -1377,68 +1466,78 @@
&self,
pkg_path: &Path,
install_cmd: &str,
@@ -3219,6 +3396,13 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- log::debug!("installed {pkg_path:?} with GUI sudo");
- return Ok(());
- }
+-
+- // 3. Final fallback: terminal sudo
+- let status = std::process::Command::new("sudo")
+- .arg(install_cmd)
+- .arg(install_arg)
+- .arg(pkg_path)
+- .status()?;
+ if let Some(sudo) = sudo.as_ref() {
+ if let Ok(password) = self.get_password_graphically() {
+ if self.install_with_sudo(sudo, &installer, pkg_path, &password, install_args)? {
@@ -3227,23 +3411,17 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ }
+ }
-- // 3. Final fallback: terminal sudo
-- let status = std::process::Command::new("sudo")
-- .arg(install_cmd)
-- .arg(install_arg)
-- .arg(pkg_path)
-- .status()?;
-+ // 3. Final fallback: terminal sudo
-+ let mut command = linux_privileged_command(sudo);
-+ command.arg(&installer).args(install_args).arg(pkg_path);
-+ let status =
-+ linux_privileged_wait_status(command, std::time::Duration::from_secs(600))?;
-
- if status.success() {
- log::debug!("installed {pkg_path:?} with sudo");
- Ok(())
- } else {
- Err(Error::PackageInstallFailed)
++ // 3. Final fallback: terminal sudo
++ let mut command = linux_privileged_command(sudo);
++ command.arg(&installer).args(install_args).arg(pkg_path);
++ let status =
++ linux_privileged_wait_status(command, std::time::Duration::from_secs(600))?;
++
+ if status.success() {
+ log::debug!("installed {pkg_path:?} with sudo");
+ return Ok(());
@@ -3262,6 +3440,11 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- "--text=Enter your password to install the update:",
- ])
- .output();
+-
+- if let Ok(output) = zenity_result
+- && output.status.success()
+- {
+- return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string());
+ if let Ok(zenity) = crate::install_safety::resolve_trusted_system_helper("zenity") {
+ let zenity_result = linux_privileged_command(&zenity)
+ .args([
@@ -3270,11 +3453,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ "--text=Enter your password to install the update:",
+ ])
+ .output();
-
-- if let Ok(output) = zenity_result
-- && output.status.success()
-- {
-- return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string());
++
+ if let Ok(output) = zenity_result {
+ if output.status.success() {
+ return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string());
@@ -3286,15 +3465,16 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- let kdialog_result = std::process::Command::new("kdialog")
- .args(["--password", "Enter your password to install the update:"])
- .output();
-+ if let Ok(kdialog) = crate::install_safety::resolve_trusted_system_helper("kdialog") {
-+ let kdialog_result = linux_privileged_command(&kdialog)
-+ .args(["--password", "Enter your password to install the update:"])
-+ .output();
-
+-
- if let Ok(output) = kdialog_result
- && output.status.success()
- {
- return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string());
++ if let Ok(kdialog) = crate::install_safety::resolve_trusted_system_helper("kdialog") {
++ let kdialog_result = linux_privileged_command(&kdialog)
++ .args(["--password", "Enter your password to install the update:"])
++ .output();
++
+ if let Ok(output) = kdialog_result {
+ if output.status.success() {
+ return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string());
@@ -3303,7 +3483,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
Err(Error::AuthenticationFailed)
-@@ -1446,34 +1541,105 @@
+@@ -1446,34 +1545,105 @@
fn install_with_sudo(
&self,
@@ -3337,10 +3517,10 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ .stderr(Stdio::piped());
+ // Isolate the sudo/dpkg group so a timeout can kill the whole tree.
+ command.process_group(0);
-
++
+ let mut child = command.spawn()?;
+ let pid = child.id();
-+
+
if let Some(mut stdin) = child.stdin.take() {
- // Write password to stdin
writeln!(stdin, "{password}")?;
@@ -3420,7 +3600,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
/// MacOS
#[cfg(target_os = "macos")]
impl Update {
-@@ -1484,143 +1650,192 @@
+@@ -1484,143 +1654,214 @@
/// │ └── ...
/// └── ...
fn install_inner(&self, bytes: &[u8]) -> Result<()> {
@@ -3452,34 +3632,11 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- .flatten()
- .find(|dir| dir.metadata().is_ok_and(|m| m.dev() == app_dev))
- .ok_or(Error::TempDirNotOnSameMountPoint)?;
-+ let app_parent = self
-+ .extract_path
-+ .parent()
-+ .ok_or(Error::FailedToDetermineExtractPath)?;
-+ let backup_path = macos_update_backup_path(&self.extract_path)
-+ .ok_or(Error::FailedToDetermineExtractPath)?;
-
+-
- let tmp_backup_dir = tempfile::Builder::new()
- .prefix("tauri_current_app")
- .tempdir_in(&tmp_root)?;
-+ let expected_identity = MacosBundleIdentity {
-+ bundle_identifier: self.context.bundle_identifier.clone(),
-+ executable: self.executable_name.clone().ok_or_else(|| {
-+ Error::Io(std::io::Error::new(
-+ std::io::ErrorKind::InvalidData,
-+ "could not determine the installed app executable name",
-+ ))
-+ })?,
-+ };
-+ if !macos_bundle_matches(&self.extract_path, &expected_identity)
-+ && !macos_bundle_matches(&backup_path, &expected_identity)
-+ {
-+ return Err(Error::Io(std::io::Error::new(
-+ std::io::ErrorKind::InvalidData,
-+ "neither the installed app nor its recovery backup matches the configured app identity",
-+ )));
-+ }
-
+-
- let tmp_extract_dir = tempfile::Builder::new()
- .prefix("tauri_updated_app")
- .tempdir_in(&tmp_root)?;
@@ -3496,39 +3653,16 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- // Ensure parent directories exist
- if let Some(parent) = extraction_path.parent() {
- std::fs::create_dir_all(parent)?;
-+ let tmp_extract_dir = match tempfile::Builder::new()
-+ .prefix(".rosi-updated-app-")
-+ .tempdir_in(app_parent)
-+ {
-+ Ok(dir) => dir,
-+ Err(err) if err.kind() == std::io::ErrorKind::PermissionDenied => {
-+ // `/Applications` is not user-writable. Extract in a user temp
-+ // dir; the privileged swap copies onto the app volume. Restore
-+ // must never nest `mv` into a partial `$SRC`.
-+ tempfile::Builder::new()
-+ .prefix("tauri_updated_app")
-+ .tempdir()?
- }
-+ Err(err) => return Err(err.into()),
-+ };
-
+- }
+-
- if let Err(err) = entry.unpack(&extraction_path) {
- // Cleanup on error
- std::fs::remove_dir_all(tmp_extract_dir.path()).ok();
- return Err(err.into());
- }
- extracted_files.push(extraction_path);
-+ extract_macos_app_archive(bytes, tmp_extract_dir.path())?;
-+ let staged_identity = macos_app_bundle_identity(tmp_extract_dir.path());
-+ if !macos_app_bundle_complete(tmp_extract_dir.path())
-+ || staged_identity.as_ref() != Some(&expected_identity)
-+ {
-+ return Err(Error::Io(std::io::Error::new(
-+ std::io::ErrorKind::InvalidData,
-+ "staged updater bundle is incomplete or has a different app identity",
-+ )));
- }
-
+- }
+-
- // The temp dir becomes the installed bundle's root, and tempfile creates it
- // with mode 0700, which stops every other user of the machine from launching
- // the updated app.
@@ -3536,11 +3670,30 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- tmp_extract_dir.path(),
- std::fs::Permissions::from_mode(0o755),
- )?;
-+ // Recovery can mutate a protected install tree. Delay it until the
-+ // downloaded bundle has passed identity and completeness validation,
-+ // then route only permission failures through the existing admin path.
-+ let recovery =
-+ recover_macos_live_bundle(&self.extract_path, &backup_path, &expected_identity)?;
++ let app_parent = self
++ .extract_path
++ .parent()
++ .ok_or(Error::FailedToDetermineExtractPath)?;
++ let backup_path = macos_update_backup_path(&self.extract_path)
++ .ok_or(Error::FailedToDetermineExtractPath)?;
++
++ let expected_identity = MacosBundleIdentity {
++ bundle_identifier: self.context.bundle_identifier.clone(),
++ executable: self.executable_name.clone().ok_or_else(|| {
++ Error::Io(std::io::Error::new(
++ std::io::ErrorKind::InvalidData,
++ "could not determine the installed app executable name",
++ ))
++ })?,
++ };
++ if !macos_bundle_matches(&self.extract_path, &expected_identity)
++ && !macos_bundle_matches(&backup_path, &expected_identity)
++ {
++ return Err(Error::Io(std::io::Error::new(
++ std::io::ErrorKind::InvalidData,
++ "neither the installed app nor its recovery backup matches the configured app identity",
++ )));
++ }
- // Exchange the current app and the new one in a single step where the file
- // system supports it, so the install path is never empty; the previous app
@@ -3554,9 +3707,22 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- Err(err) if err.kind() != std::io::ErrorKind::PermissionDenied => {
- log::debug!("cannot swap the app bundles ({err}), moving them instead");
- replace_bundle(&self.extract_path, tmp_extract_dir.path(), &backup)
-- }
-- other => other,
-- };
++ let tmp_extract_dir = match tempfile::Builder::new()
++ .prefix(".rosi-updated-app-")
++ .tempdir_in(app_parent)
++ {
++ Ok(dir) => dir,
++ Err(err) if err.kind() == std::io::ErrorKind::PermissionDenied => {
++ // `/Applications` is not user-writable. Extract in a user temp
++ // dir; the privileged swap copies onto the app volume. Restore
++ // must never nest `mv` into a partial `$SRC`.
++ tempfile::Builder::new()
++ .prefix("tauri_updated_app")
++ .tempdir()?
+ }
+- other => other,
++ Err(err) => return Err(err.into()),
+ };
- let need_authorization = match moved {
- Ok(()) => false,
- Err(err) if err.kind() == std::io::ErrorKind::PermissionDenied => true,
@@ -3569,6 +3735,49 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- ) {
- log::error!("failed to install the update: {err}");
- return Err(Error::PreviousAppNotRestored(kept));
+- }
+- std::fs::remove_dir_all(tmp_extract_dir.path()).ok();
+- return Err(err.into());
++
++ extract_macos_app_archive(bytes, tmp_extract_dir.path())?;
++ let staged_identity = macos_app_bundle_identity(tmp_extract_dir.path());
++ if !macos_app_bundle_complete(tmp_extract_dir.path())
++ || staged_identity.as_ref() != Some(&expected_identity)
++ {
++ return Err(Error::Io(std::io::Error::new(
++ std::io::ErrorKind::InvalidData,
++ "staged updater bundle is incomplete or has a different app identity",
++ )));
++ }
++
++ let staged_executable = tmp_extract_dir
++ .path()
++ .join("Contents/MacOS")
++ .join(&expected_identity.executable);
++ if !crate::install_safety::macos_bundle_executable_supports_host_arch(&staged_executable) {
++ return Err(Error::Io(std::io::Error::new(
++ std::io::ErrorKind::InvalidData,
++ "staged updater executable does not support the host architecture",
++ )));
++ }
++ for sidecar in ["rosi-yt-dlp", "rosi-ffmpeg", "rosi-ffprobe"] {
++ let sidecar_path = tmp_extract_dir.path().join("Contents/MacOS").join(sidecar);
++ if !crate::install_safety::macos_bundle_executable_supports_host_arch(&sidecar_path) {
++ return Err(Error::Io(std::io::Error::new(
++ std::io::ErrorKind::InvalidData,
++ format!(
++ "staged updater sidecar {sidecar} does not support the host architecture"
++ ),
++ )));
+ }
++ }
++
++ // Recovery can mutate a protected install tree. Delay it until the
++ // downloaded bundle has passed identity and completeness validation,
++ // then route only permission failures through the existing admin path.
++ let recovery =
++ recover_macos_live_bundle(&self.extract_path, &backup_path, &expected_identity)?;
++
+ let unprivileged = if matches!(recovery, MacosRecoveryDisposition::RequiresPrivilegedSwap) {
+ // A validated recovery entry can live in a protected install
+ // directory. Keep it untouched until the staged bundle is fully
@@ -3615,10 +3824,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ )?;
+ Err(err)
+ }
- }
-- std::fs::remove_dir_all(tmp_extract_dir.path()).ok();
-- return Err(err.into());
-- }
++ }
+ })()
};
@@ -3735,7 +3941,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
let _ = std::process::Command::new("touch")
-@@ -1631,115 +1846,299 @@
+@@ -1631,115 +1872,299 @@
}
}
@@ -3746,14 +3952,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
-fn swap_bundle(target: &Path, staged: &Path) -> std::io::Result<()> {
- use std::ffi::CString;
- use std::os::unix::ffi::OsStrExt;
-+fn macos_bundle_matches(
-+ path: &Path,
-+ expected: &crate::install_safety::MacosBundleIdentity,
-+) -> bool {
-+ crate::install_safety::macos_app_bundle_complete(path)
-+ && crate::install_safety::macos_app_bundle_identity(path).as_ref() == Some(expected)
-+}
-
+-
- let from = CString::new(staged.as_os_str().as_bytes())?;
- let to = CString::new(target.as_os_str().as_bytes())?;
- // SAFETY: both pointers are valid NUL-terminated strings that outlive the call,
@@ -3761,6 +3960,14 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- let result = unsafe { libc::renamex_np(from.as_ptr(), to.as_ptr(), libc::RENAME_SWAP) };
- if result == 0 {
- Ok(())
++fn macos_bundle_matches(
++ path: &Path,
++ expected: &crate::install_safety::MacosBundleIdentity,
++) -> bool {
++ crate::install_safety::macos_app_bundle_complete(path)
++ && crate::install_safety::macos_app_bundle_identity(path).as_ref() == Some(expected)
++}
++
+#[cfg(target_os = "macos")]
+fn remove_macos_bundle_entry(path: &Path) -> std::io::Result<()> {
+ let metadata = match std::fs::symlink_metadata(path) {
@@ -3796,7 +4003,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ std::io::ErrorKind::InvalidData,
+ "refusing to retire an incomplete or identity-mismatched updater backup",
+ ));
- }
++ }
+ let parent = backup.parent().ok_or_else(|| {
+ std::io::Error::new(
+ std::io::ErrorKind::InvalidInput,
@@ -3855,7 +4062,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ return Ok(());
+ }
+ return Err(error);
-+ }
+ }
+
Ok(())
}
@@ -3870,6 +4077,11 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- ObjC.import("stdio");
- return $.renamex_np(argv[0], argv[1], 2) === 0 ? "swapped" : "failed";
-}"#;
+-
+-/// The shell command the privileged install runs: the same swap as [`swap_bundle`], and
+-/// where the file system cannot swap, the same moves as [`replace_bundle`], deleting the
+-/// previous app only once the new one is in place. The moves only run once the swap is
+-/// known not to have happened, since after a swap they would put the previous app back.
+fn restore_macos_live_bundle(
+ live: &Path,
+ backup: &Path,
@@ -3891,11 +4103,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ }
+ Ok(())
+}
-
--/// The shell command the privileged install runs: the same swap as [`swap_bundle`], and
--/// where the file system cannot swap, the same moves as [`replace_bundle`], deleting the
--/// previous app only once the new one is in place. The moves only run once the swap is
--/// known not to have happened, since after a swap they would put the previous app back.
++
#[cfg(target_os = "macos")]
-fn privileged_install_command(target: &Path, staged: &Path, backup: &Path) -> String {
- let swap = sh_quote(Path::new(SWAP_BUNDLE_JXA));
@@ -3983,6 +4191,27 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- if std::fs::symlink_metadata(target).is_ok() || std::fs::symlink_metadata(backup).is_err() {
- return None;
- }
+-
+- let mut name = target.file_stem().unwrap_or_default().to_os_string();
+- name.push(" (previous version)");
+- if let Some(extension) = target.extension() {
+- name.push(".");
+- name.push(extension);
+- }
+- let kept = [target.parent(), fallback_dir]
+- .into_iter()
+- .flatten()
+- .map(|dir| dir.join(&name))
+- // `rename` replaces an empty directory, so never move onto anything already there
+- .filter(|kept| std::fs::symlink_metadata(kept).is_err())
+- .find(|kept| std::fs::rename(backup, kept).is_ok());
+-
+- match kept {
+- Some(kept) => Some(kept),
+- None => {
+- let _ = backup_dir.keep();
+- Some(backup.to_path_buf())
+- }
+/// Upper bound for an extracted `.app` (a universal ROSI bundle is ~300 MB).
+#[cfg(target_os = "macos")]
+const MACOS_MAX_DECOMPRESSED_BYTES: u64 = 2 * 1024 * 1024 * 1024;
@@ -3990,12 +4219,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+/// frames that ask for a larger window instead of allocating it.
+#[cfg(target_os = "macos")]
+const MACOS_ZSTD_WINDOW_LOG_MAX: u32 = 27;
-
-- let mut name = target.file_stem().unwrap_or_default().to_os_string();
-- name.push(" (previous version)");
-- if let Some(extension) = target.extension() {
-- name.push(".");
-- name.push(extension);
++
+/// `.app.tar.gz` (Tauri) or `.app.tar.zst` (ROSI per-arch), chosen by magic bytes.
+#[cfg(target_os = "macos")]
+fn macos_archive_decoder<'a>(bytes: &'a [u8]) -> Result> {
@@ -4007,24 +4231,12 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ decoder.window_log_max(MACOS_ZSTD_WINDOW_LOG_MAX)?;
+ return Ok(Box::new(decoder));
}
-- let kept = [target.parent(), fallback_dir]
-- .into_iter()
-- .flatten()
-- .map(|dir| dir.join(&name))
-- // `rename` replaces an empty directory, so never move onto anything already there
-- .filter(|kept| std::fs::symlink_metadata(kept).is_err())
-- .find(|kept| std::fs::rename(backup, kept).is_ok());
+ if bytes.starts_with(&GZIP_MAGIC) {
+ return Ok(Box::new(flate2::read::GzDecoder::new(reader)));
+ }
+ Err(Error::InvalidUpdaterFormat)
+}
-
-- match kept {
-- Some(kept) => Some(kept),
-- None => {
-- let _ = backup_dir.keep();
-- Some(backup.to_path_buf())
++
+#[cfg(target_os = "macos")]
+fn extract_macos_app_archive_with_limit(
+ bytes: &[u8],
@@ -4052,7 +4264,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ })?;
+ if relative.as_os_str().is_empty() {
+ continue;
- }
++ }
+ let dest = dest_root.join(&relative);
+ if !path_is_inside(dest_root, &dest) {
+ return Err(Error::Io(std::io::Error::new(
@@ -4111,14 +4323,14 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ std::io::ErrorKind::InvalidData,
+ format!("unsupported updater archive member type {kind:?}"),
+ )));
- }
++ }
+ // A truncated stream can end on a member boundary, which `tar::Archive`
+ // accepts. Require the full stream, both end blocks and nothing after them.
+ decompressed.drain_and_check_trailer()
}
/// Gets the base target string used by the updater. If bundle type is available it
-@@ -1985,49 +2384,7 @@
+@@ -1985,48 +2410,6 @@
.collect()
}
@@ -4126,7 +4338,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
-///
-/// `ShellExecuteW` reports failures through its return value, not reliably through
-/// `GetLastError`.
- #[cfg(windows)]
+-#[cfg(windows)]
-fn shell_execute_error(code: isize) -> std::io::Error {
- use std::io::{Error, ErrorKind};
- use windows_sys::Win32::{
@@ -4164,11 +4376,10 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- }
-}
-
--#[cfg(windows)]
+ #[cfg(windows)]
trait PathExt {
fn wrap_in_quotes(&self) -> Self;
- }
-@@ -2116,13 +2473,13 @@
+@@ -2116,13 +2499,13 @@
// A throwaway key pair generated with `tauri signer generate`, and the signature of the
// payload `test` made with `tauri signer sign --app-version 2.0.0`.
@@ -4185,7 +4396,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
base64::engine::general_purpose::STANDARD.encode(value)
}
-@@ -2344,15 +2701,22 @@
+@@ -2344,15 +2727,22 @@
assert!(restored.context.config.require_signed_version);
}
@@ -4211,7 +4422,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
let update = builder()
.executable_path(&appimage)
.build()
-@@ -2363,12 +2727,9 @@
+@@ -2363,12 +2753,9 @@
(dir, appimage, update)
}
@@ -4225,7 +4436,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
#[cfg(all(target_os = "linux", feature = "zip"))]
-@@ -2389,11 +2750,12 @@
+@@ -2389,11 +2776,12 @@
#[cfg(target_os = "linux")]
fn appimage_install_rejects_a_payload_that_is_not_an_appimage() {
let (_dir, appimage, update) = appimage_update();
@@ -4240,7 +4451,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
#[test]
-@@ -2402,7 +2764,6 @@
+@@ -2402,7 +2790,6 @@
use std::os::unix::fs::PermissionsExt;
let (_dir, appimage, update) = appimage_update();
@@ -4248,7 +4459,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
update.install_appimage(&new_appimage()).unwrap();
assert_eq!(std::fs::read(&appimage).unwrap(), new_appimage());
assert_eq!(
-@@ -2429,7 +2790,7 @@
+@@ -2429,7 +2816,7 @@
update.install_appimage(&compressed_appimage("readme.txt", b"hello")),
Err(Error::BinaryNotFoundInArchive)
));
@@ -4257,7 +4468,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
#[test]
-@@ -2441,7 +2802,7 @@
+@@ -2441,7 +2828,7 @@
update.install_appimage(b"\x1f\x8b\x08\x00 compressed AppImage"),
Err(Error::InvalidUpdaterFormat)
));
@@ -4266,7 +4477,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
}
}
-@@ -2501,280 +2862,122 @@
+@@ -2501,277 +2888,119 @@
assert!(verify_signed_version(comment, "2024-01-02", true).is_err());
}
@@ -4280,13 +4491,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- std::fs::write(target.join("version"), "old").unwrap();
- std::fs::create_dir(&staged).unwrap();
- std::fs::write(staged.join("version"), "new").unwrap();
-+ use super::{finish_windows_installer_launch, OnBeforeExit, Update, UpdaterContext};
-+ use crate::Config;
-+ use std::sync::{
-+ atomic::{AtomicUsize, Ordering},
-+ Arc,
-+ };
-
+-
- super::replace_bundle(&target, &staged, &backup).unwrap();
-
- assert_eq!(
@@ -4312,7 +4517,13 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- let name = unsafe { std::ffi::CStr::from_ptr(stat.f_fstypename.as_ptr()) };
- name.to_bytes() == b"apfs"
- }
--
++ use super::{finish_windows_installer_launch, OnBeforeExit, Update, UpdaterContext};
++ use crate::Config;
++ use std::sync::{
++ atomic::{AtomicUsize, Ordering},
++ Arc,
++ };
+
- #[test]
- #[cfg(target_os = "macos")]
- fn swap_bundle_exchanges_the_two_bundles_in_place() {
@@ -4395,20 +4606,10 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- assert_eq!(
- std::fs::read_to_string(target.join("version")).unwrap(),
- "old"
-+ fn round2_actual_update_install_hook_failure_keeps_update_and_skips_cleanup() {
-+ let hook_calls = Arc::new(AtomicUsize::new(0));
-+ let hook_calls_in = Arc::clone(&hook_calls);
-+ let cleanup_calls = Arc::new(AtomicUsize::new(0));
-+ let update = round2_update_with_hook(
-+ Arc::new(move || {
-+ hook_calls_in.fetch_add(1, Ordering::SeqCst);
-+ Err("round2 forced durable-state flush failure".to_string())
-+ }),
-+ Arc::clone(&cleanup_calls),
- );
+- );
- assert!(!backup.exists());
- }
-
+-
- /// A directory whose name `sh` and AppleScript would both misread unquoted.
- #[cfg(target_os = "macos")]
- fn hostile_dir() -> tempfile::TempDir {
@@ -4416,24 +4617,25 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- .prefix("it's \"a\" \\ $(touch pwned) `dir`\n")
- .tempdir()
- .unwrap()
-+ let error = update
-+ .install(b"test")
-+ .expect_err("a failed pre-install hook must reject the actual install call");
-+ assert!(matches!(
-+ error,
-+ Error::BeforeExit(message) if message == "round2 forced durable-state flush failure"
-+ ));
-+ assert_eq!(hook_calls.load(Ordering::SeqCst), 1);
-+ assert_eq!(cleanup_calls.load(Ordering::SeqCst), 0);
- }
-
+- }
+-
- #[cfg(target_os = "macos")]
- fn assert_privileged_install_command_moved(dir: &std::path::Path) {
- let target = dir.join("Bob's \"App\".app");
- assert_eq!(
- std::fs::read_to_string(target.join("version")).unwrap(),
- "new"
-- );
++ fn round2_actual_update_install_hook_failure_keeps_update_and_skips_cleanup() {
++ let hook_calls = Arc::new(AtomicUsize::new(0));
++ let hook_calls_in = Arc::clone(&hook_calls);
++ let cleanup_calls = Arc::new(AtomicUsize::new(0));
++ let update = round2_update_with_hook(
++ Arc::new(move || {
++ hook_calls_in.fetch_add(1, Ordering::SeqCst);
++ Err("round2 forced durable-state flush failure".to_string())
++ }),
++ Arc::clone(&cleanup_calls),
+ );
- assert!(!dir.join("staged").exists());
- assert!(!dir.join("backup").exists());
- assert!(!dir.join("pwned").exists());
@@ -4450,7 +4652,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- super::privileged_install_command(&target, &staged, &dir.join("backup"))
- }
-
- #[test]
+- #[test]
- #[cfg(target_os = "macos")]
- fn privileged_install_command_quotes_every_path() {
- let dir = hostile_dir();
@@ -4466,7 +4668,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- assert!(status.success());
- assert_privileged_install_command_moved(dir.path());
- }
--
+
- /// The command the install runs, wrapped the way it is handed to AppleScript, only without
- /// `with administrator privileges` so it runs without a prompt.
- #[test]
@@ -4485,27 +4687,26 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- .output()
- .unwrap();
-
-+ fn round2_windows_cleanup_runs_only_after_a_successful_installer_launch() {
-+ let events = std::cell::RefCell::new(Vec::new());
-+ let failure = finish_windows_installer_launch(
-+ 32,
-+ || events.borrow_mut().push("cleanup"),
-+ || events.borrow_mut().push("exit"),
-+ );
-+ assert!(failure.is_err());
- assert!(
+- assert!(
- output.status.success(),
- "{}",
- String::from_utf8_lossy(&output.stderr)
-+ events.borrow().is_empty(),
-+ "failed launch must preserve Tauri resources"
- );
+- );
- assert_privileged_install_command_moved(dir.path());
-- }
++ let error = update
++ .install(b"test")
++ .expect_err("a failed pre-install hook must reject the actual install call");
++ assert!(matches!(
++ error,
++ Error::BeforeExit(message) if message == "round2 forced durable-state flush failure"
++ ));
++ assert_eq!(hook_calls.load(Ordering::SeqCst), 1);
++ assert_eq!(cleanup_calls.load(Ordering::SeqCst), 0);
+ }
- /// The privileged install swaps the bundles where the file system can, so on APFS it
- /// never touches the backup: one in a directory that does not exist must not matter.
-- #[test]
+ #[test]
- #[cfg(target_os = "macos")]
- fn privileged_install_command_swaps_the_bundles() {
- let dir = tempfile::tempdir().unwrap();
@@ -4530,18 +4731,17 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- assert_eq!(
- std::fs::read_to_string(target.join("version")).unwrap(),
- "new"
-- );
-- assert!(!staged.exists());
-+ finish_windows_installer_launch(
-+ 33,
++ fn round2_windows_cleanup_runs_only_after_a_successful_installer_launch() {
++ let events = std::cell::RefCell::new(Vec::new());
++ let failure = finish_windows_installer_launch(
++ 32,
+ || events.borrow_mut().push("cleanup"),
+ || events.borrow_mut().push("exit"),
-+ )
-+ .expect("successful launch must finish cleanup and exit sequence");
-+ assert_eq!(&*events.borrow(), &["cleanup", "exit"]);
- }
-
- #[test]
+ );
+- assert!(!staged.exists());
+- }
+-
+- #[test]
- fn keeps_the_backup_when_the_previous_app_was_not_restored() {
- let dir = tempfile::tempdir().unwrap();
- let target = dir.path().join("App.app");
@@ -4558,19 +4758,15 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- assert_eq!(
- std::fs::read_to_string(expected.join("version")).unwrap(),
- "old"
-- );
++ assert!(failure.is_err());
++ assert!(
++ events.borrow().is_empty(),
++ "failed launch must preserve Tauri resources"
+ );
- assert!(!backup_dir_path.exists());
-+ fn round2_download_cap_rejects_oversize_chunks_without_content_length() {
-+ let mut received = Vec::new();
-+ super::append_download_chunk(&mut received, b"123", None, 4)
-+ .expect("under-limit chunk should be accepted without a length header");
-+ let error = super::append_download_chunk(&mut received, b"45", None, 4)
-+ .expect_err("actual streamed size must be capped without Content-Length");
-+ assert!(error.to_string().contains("package exceeds"));
-+ assert_eq!(received, b"123", "over-limit bytes must not be buffered");
- }
-
- #[test]
+- }
+-
+- #[test]
- fn moves_the_backup_to_the_fallback_dir_when_it_cannot_go_next_to_the_app() {
- let dir = tempfile::tempdir().unwrap();
- let target = dir.path().join("App.app");
@@ -4580,7 +4776,7 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- std::fs::create_dir(&backup).unwrap();
- std::fs::write(backup.join("version"), "old").unwrap();
- let fallback = tempfile::tempdir_in(dir.path()).unwrap();
--
+
- let kept =
- super::keep_backup_if_not_restored(&target, backup_dir, &backup, Some(fallback.path()));
-
@@ -4590,11 +4786,13 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- std::fs::read_to_string(expected.join("version")).unwrap(),
- "old"
- );
-+ fn round2_download_cap_rejects_declared_oversize_and_actual_oversize() {
-+ let mut received = Vec::new();
-+ assert!(super::validate_download_content_length(Some(5), 4).is_err());
-+ assert!(super::append_download_chunk(&mut received, b"12345", Some(1), 4).is_err());
-+ assert!(received.is_empty(), "rejected bytes must not be buffered");
++ finish_windows_installer_launch(
++ 33,
++ || events.borrow_mut().push("cleanup"),
++ || events.borrow_mut().push("exit"),
++ )
++ .expect("successful launch must finish cleanup and exit sequence");
++ assert_eq!(&*events.borrow(), &["cleanup", "exit"]);
}
#[test]
@@ -4621,9 +4819,17 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
- std::fs::read_to_string(dir.path().join("App (previous version).app")).unwrap(),
- "other"
- );
-- }
--
-- #[test]
++ fn round2_download_cap_rejects_oversize_chunks_without_content_length() {
++ let mut received = Vec::new();
++ super::append_download_chunk(&mut received, b"123", None, 4)
++ .expect("under-limit chunk should be accepted without a length header");
++ let error = super::append_download_chunk(&mut received, b"45", None, 4)
++ .expect_err("actual streamed size must be capped without Content-Length");
++ assert!(error.to_string().contains("package exceeds"));
++ assert_eq!(received, b"123", "over-limit bytes must not be buffered");
+ }
+
+ #[test]
- fn drops_the_backup_when_the_previous_app_is_in_place() {
- let dir = tempfile::tempdir().unwrap();
- let target = dir.path().join("App.app");
@@ -4635,18 +4841,18 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
-
- assert!(super::keep_backup_if_not_restored(&target, backup_dir, &backup, None).is_none());
- assert!(!backup_dir_path.exists());
-- }
--
-- #[test]
- #[cfg(windows)]
- fn it_wraps_correctly() {
- use super::PathExt;
-@@ -2874,6 +3077,195 @@
++ fn round2_download_cap_rejects_declared_oversize_and_actual_oversize() {
++ let mut received = Vec::new();
++ assert!(super::validate_download_content_length(Some(5), 4).is_err());
++ assert!(super::append_download_chunk(&mut received, b"12345", Some(1), 4).is_err());
++ assert!(received.is_empty(), "rejected bytes must not be buffered");
+ }
- for (orig, escaped) in cases.iter().zip(cases_escaped) {
+ #[test]
+@@ -2876,4 +3105,213 @@
assert_eq!(escape_nsis_current_exe_arg(OsStr::new(orig)), escaped);
-+ }
-+ }
+ }
+ }
+
+ #[test]
+ fn macos_admin_install_script_quotes_paths_via_handler_args() {
@@ -4702,7 +4908,11 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+
+ fn app_tar(payload: &[u8]) -> Vec {
+ let mut builder = tar::Builder::new(Vec::new());
-+ for dir in ["ROSI.app/", "ROSI.app/Contents/", "ROSI.app/Contents/MacOS/"] {
++ for dir in [
++ "ROSI.app/",
++ "ROSI.app/Contents/",
++ "ROSI.app/Contents/MacOS/",
++ ] {
+ let mut header = Header::new_gnu();
+ header.set_entry_type(EntryType::Directory);
+ header.set_mode(0o755);
@@ -4715,13 +4925,14 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ header.set_mode(0o755);
+ header.set_size(payload.len() as u64);
+ header.set_cksum();
-+ builder.append_data(&mut header, EXECUTABLE, payload).unwrap();
++ builder
++ .append_data(&mut header, EXECUTABLE, payload)
++ .unwrap();
+ builder.into_inner().unwrap()
+ }
+
+ fn gzip(raw: &[u8]) -> Vec {
-+ let mut encoder =
-+ flate2::write::GzEncoder::new(Vec::new(), flate2::Compression::default());
++ let mut encoder = flate2::write::GzEncoder::new(Vec::new(), flate2::Compression::default());
+ encoder.write_all(raw).unwrap();
+ encoder.finish().unwrap()
+ }
@@ -4830,10 +5041,25 @@ diff -ruN -x target -x Cargo.lock -x .cargo-ok -x .cargo_vcs_info.json a/src/upd
+ crate::install_safety::macos_app_bundle_complete(dir.path()),
+ "{path}: extracted bundle is incomplete"
+ );
++ let aarch64_ok = crate::install_safety::macos_bundle_supports_runtime_host(
++ dir.path(),
++ "aarch64",
++ false,
++ );
++ let x86_64_ok = crate::install_safety::macos_bundle_supports_runtime_host(
++ dir.path(),
++ "x86_64",
++ false,
++ );
++ let rosetta_ok = crate::install_safety::macos_bundle_supports_runtime_host(
++ dir.path(),
++ "x86_64",
++ true,
++ );
+ println!(
-+ "ROSI_UPDATER_ZST_E2E {path} extract_ms={}",
++ "ROSI_UPDATER_ZST_E2E {path} extract_ms={} aarch64={aarch64_ok} x86_64={x86_64_ok} rosetta={rosetta_ok}",
+ started.elapsed().as_millis()
+ );
- }
- }
++ }
++ }
}
diff --git a/src-tauri/vendor/tauri-plugin-updater/src/appimage_archive.rs b/src-tauri/vendor/tauri-plugin-updater/src/appimage_archive.rs
index edac1b08..54bf4869 100644
--- a/src-tauri/vendor/tauri-plugin-updater/src/appimage_archive.rs
+++ b/src-tauri/vendor/tauri-plugin-updater/src/appimage_archive.rs
@@ -1,5 +1,6 @@
-// The AppImage helpers are compiled for macOS only because the shared module
-// list includes it; their callers are Linux and BSD only. Keep dead_code quiet there.
+// Bounded tar.gz helpers. `extract_appimage_from_archive` is called by the Linux and BSD
+// AppImage install path. On macOS, `BoundedArchiveReader` bounds app extraction, and the
+// AppImage-only functions have no caller, so dead_code is allowed there.
#![cfg_attr(target_os = "macos", allow(dead_code))]
use super::{appimage_install, Error, Result};
diff --git a/src-tauri/vendor/tauri-plugin-updater/src/install_safety.rs b/src-tauri/vendor/tauri-plugin-updater/src/install_safety.rs
index 4f5607df..56a42a8b 100644
--- a/src-tauri/vendor/tauri-plugin-updater/src/install_safety.rs
+++ b/src-tauri/vendor/tauri-plugin-updater/src/install_safety.rs
@@ -163,6 +163,178 @@ fn macos_bundle_executable_complete(path: &Path) -> bool {
}
}
+#[cfg(target_os = "macos")]
+fn is_rosetta_translated() -> bool {
+ let mut ret: libc::c_int = 0;
+ let mut size: libc::size_t = std::mem::size_of_val(&ret);
+ let name = c"sysctl.proc_translated";
+ let res = unsafe {
+ libc::sysctlbyname(
+ name.as_ptr(),
+ &mut ret as *mut _ as *mut libc::c_void,
+ &mut size,
+ std::ptr::null_mut(),
+ 0,
+ )
+ };
+ res == 0 && ret == 1
+}
+
+#[cfg(not(target_os = "macos"))]
+fn is_rosetta_translated() -> bool {
+ false
+}
+
+/// Z02.4: verifies that a Mach-O executable supports the host architecture
+/// before swapping into place.
+pub fn macos_bundle_executable_supports_host_arch(path: &Path) -> bool {
+ macos_executable_supports_runtime_host(path, std::env::consts::ARCH, is_rosetta_translated())
+}
+
+pub fn macos_executable_supports_runtime_host(
+ path: &Path,
+ compile_arch: &str,
+ rosetta_translated: bool,
+) -> bool {
+ let Ok(mut file) = std::fs::File::open(path) else {
+ return false;
+ };
+ use std::io::Read;
+ let mut header = [0u8; 4096];
+ let Ok(n) = file.read(&mut header) else {
+ return false;
+ };
+ macho_bytes_support_runtime_host(&header[..n], compile_arch, rosetta_translated)
+}
+
+pub fn macos_bundle_supports_runtime_host(
+ bundle_path: &Path,
+ compile_arch: &str,
+ rosetta_translated: bool,
+) -> bool {
+ let Some(identity) = macos_app_bundle_identity(bundle_path) else {
+ return false;
+ };
+ let macos_dir = bundle_path.join("Contents/MacOS");
+ let executable = macos_dir.join(&identity.executable);
+ if !macos_executable_supports_runtime_host(&executable, compile_arch, rosetta_translated) {
+ return false;
+ }
+ ["rosi-yt-dlp", "rosi-ffmpeg", "rosi-ffprobe"]
+ .iter()
+ .all(|sidecar| {
+ macos_executable_supports_runtime_host(
+ &macos_dir.join(sidecar),
+ compile_arch,
+ rosetta_translated,
+ )
+ })
+}
+
+pub fn macho_bytes_support_host_arch(bytes: &[u8]) -> bool {
+ macho_bytes_support_runtime_host(bytes, std::env::consts::ARCH, is_rosetta_translated())
+}
+
+pub fn macho_bytes_support_runtime_host(
+ bytes: &[u8],
+ compile_arch: &str,
+ rosetta_translated: bool,
+) -> bool {
+ match compile_arch {
+ "aarch64" => macho_bytes_support_arch(bytes, "aarch64"),
+ "x86_64" if rosetta_translated => {
+ macho_bytes_support_arch(bytes, "aarch64") || macho_bytes_support_arch(bytes, "x86_64")
+ }
+ "x86_64" => macho_bytes_support_arch(bytes, "x86_64"),
+ _ => false,
+ }
+}
+
+pub fn macho_bytes_support_arch(bytes: &[u8], target_arch: &str) -> bool {
+ const MH_MAGIC_64: [u8; 4] = [0xcf, 0xfa, 0xed, 0xfe];
+ const MH_CIGAM_64: [u8; 4] = [0xfe, 0xed, 0xfa, 0xcf];
+ const FAT_MAGIC: [u8; 4] = [0xca, 0xfe, 0xba, 0xbe];
+ const FAT_CIGAM: [u8; 4] = [0xbe, 0xba, 0xfe, 0xca];
+ const FAT_MAGIC_64: [u8; 4] = [0xca, 0xfe, 0xba, 0xbf];
+ const FAT_CIGAM_64: [u8; 4] = [0xbf, 0xba, 0xfe, 0xca];
+
+ const CPU_TYPE_X86_64: u32 = 0x01000007;
+ const CPU_TYPE_ARM64: u32 = 0x0100000c;
+
+ let expected_cputype = match target_arch {
+ "aarch64" | "arm64" => CPU_TYPE_ARM64,
+ "x86_64" | "amd64" => CPU_TYPE_X86_64,
+ _ => return false,
+ };
+
+ if bytes.len() < 8 {
+ return false;
+ }
+
+ if bytes.starts_with(&MH_MAGIC_64) {
+ let cputype = u32::from_le_bytes([bytes[4], bytes[5], bytes[6], bytes[7]]);
+ return cputype == expected_cputype;
+ }
+ if bytes.starts_with(&MH_CIGAM_64) {
+ let cputype = u32::from_be_bytes([bytes[4], bytes[5], bytes[6], bytes[7]]);
+ return cputype == expected_cputype;
+ }
+ if bytes.starts_with(&FAT_MAGIC) || bytes.starts_with(&FAT_CIGAM) {
+ let is_be = bytes.starts_with(&FAT_MAGIC);
+ let nfat = if is_be {
+ u32::from_be_bytes([bytes[4], bytes[5], bytes[6], bytes[7]])
+ } else {
+ u32::from_le_bytes([bytes[4], bytes[5], bytes[6], bytes[7]])
+ };
+ let count = (nfat as usize).min(64);
+ for i in 0..count {
+ let Some(offset) = i.checked_mul(20).and_then(|o| o.checked_add(8)) else {
+ return false;
+ };
+ let Some(slice) = bytes.get(offset..offset + 4) else {
+ return false;
+ };
+ let cputype = if is_be {
+ u32::from_be_bytes([slice[0], slice[1], slice[2], slice[3]])
+ } else {
+ u32::from_le_bytes([slice[0], slice[1], slice[2], slice[3]])
+ };
+ if cputype == expected_cputype {
+ return true;
+ }
+ }
+ return false;
+ }
+ if bytes.starts_with(&FAT_MAGIC_64) || bytes.starts_with(&FAT_CIGAM_64) {
+ let is_be = bytes.starts_with(&FAT_MAGIC_64);
+ let nfat = if is_be {
+ u32::from_be_bytes([bytes[4], bytes[5], bytes[6], bytes[7]])
+ } else {
+ u32::from_le_bytes([bytes[4], bytes[5], bytes[6], bytes[7]])
+ };
+ let count = (nfat as usize).min(64);
+ for i in 0..count {
+ let Some(offset) = i.checked_mul(32).and_then(|o| o.checked_add(8)) else {
+ return false;
+ };
+ let Some(slice) = bytes.get(offset..offset + 4) else {
+ return false;
+ };
+ let cputype = if is_be {
+ u32::from_be_bytes([slice[0], slice[1], slice[2], slice[3]])
+ } else {
+ u32::from_le_bytes([slice[0], slice[1], slice[2], slice[3]])
+ };
+ if cputype == expected_cputype {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ false
+}
+
/// Session variables pkexec, zenity, and polkit agents need after `env_clear`.
/// Never includes `PATH`.
pub const LINUX_PRIVILEGED_ENV_ALLOWLIST: &[&str] = &[
diff --git a/src-tauri/vendor/tauri-plugin-updater/src/updater.rs b/src-tauri/vendor/tauri-plugin-updater/src/updater.rs
index 49777dea..927d900a 100644
--- a/src-tauri/vendor/tauri-plugin-updater/src/updater.rs
+++ b/src-tauri/vendor/tauri-plugin-updater/src/updater.rs
@@ -50,15 +50,19 @@ use crate::{
#[path = "appimage_install.rs"]
mod appimage_install;
-#[cfg(all(
- feature = "zip",
- any(
- target_os = "linux",
- target_os = "dragonfly",
- target_os = "freebsd",
- target_os = "netbsd",
- target_os = "openbsd",
- target_os = "macos"
+// macOS app extraction uses `BoundedArchiveReader` from this module. Its flate2
+// and tar dependencies are unconditional on macOS, so macOS does not need `zip`.
+#[cfg(any(
+ target_os = "macos",
+ all(
+ feature = "zip",
+ any(
+ target_os = "linux",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "openbsd"
+ )
)
))]
#[path = "appimage_archive.rs"]
@@ -1712,6 +1716,28 @@ impl Update {
)));
}
+ let staged_executable = tmp_extract_dir
+ .path()
+ .join("Contents/MacOS")
+ .join(&expected_identity.executable);
+ if !crate::install_safety::macos_bundle_executable_supports_host_arch(&staged_executable) {
+ return Err(Error::Io(std::io::Error::new(
+ std::io::ErrorKind::InvalidData,
+ "staged updater executable does not support the host architecture",
+ )));
+ }
+ for sidecar in ["rosi-yt-dlp", "rosi-ffmpeg", "rosi-ffprobe"] {
+ let sidecar_path = tmp_extract_dir.path().join("Contents/MacOS").join(sidecar);
+ if !crate::install_safety::macos_bundle_executable_supports_host_arch(&sidecar_path) {
+ return Err(Error::Io(std::io::Error::new(
+ std::io::ErrorKind::InvalidData,
+ format!(
+ "staged updater sidecar {sidecar} does not support the host architecture"
+ ),
+ )));
+ }
+ }
+
// Recovery can mutate a protected install tree. Delay it until the
// downloaded bundle has passed identity and completeness validation,
// then route only permission failures through the existing admin path.
@@ -3134,7 +3160,11 @@ mod macos_archive_tests {
fn app_tar(payload: &[u8]) -> Vec {
let mut builder = tar::Builder::new(Vec::new());
- for dir in ["ROSI.app/", "ROSI.app/Contents/", "ROSI.app/Contents/MacOS/"] {
+ for dir in [
+ "ROSI.app/",
+ "ROSI.app/Contents/",
+ "ROSI.app/Contents/MacOS/",
+ ] {
let mut header = Header::new_gnu();
header.set_entry_type(EntryType::Directory);
header.set_mode(0o755);
@@ -3147,13 +3177,14 @@ mod macos_archive_tests {
header.set_mode(0o755);
header.set_size(payload.len() as u64);
header.set_cksum();
- builder.append_data(&mut header, EXECUTABLE, payload).unwrap();
+ builder
+ .append_data(&mut header, EXECUTABLE, payload)
+ .unwrap();
builder.into_inner().unwrap()
}
fn gzip(raw: &[u8]) -> Vec {
- let mut encoder =
- flate2::write::GzEncoder::new(Vec::new(), flate2::Compression::default());
+ let mut encoder = flate2::write::GzEncoder::new(Vec::new(), flate2::Compression::default());
encoder.write_all(raw).unwrap();
encoder.finish().unwrap()
}
@@ -3262,8 +3293,23 @@ mod macos_archive_tests {
crate::install_safety::macos_app_bundle_complete(dir.path()),
"{path}: extracted bundle is incomplete"
);
+ let aarch64_ok = crate::install_safety::macos_bundle_supports_runtime_host(
+ dir.path(),
+ "aarch64",
+ false,
+ );
+ let x86_64_ok = crate::install_safety::macos_bundle_supports_runtime_host(
+ dir.path(),
+ "x86_64",
+ false,
+ );
+ let rosetta_ok = crate::install_safety::macos_bundle_supports_runtime_host(
+ dir.path(),
+ "x86_64",
+ true,
+ );
println!(
- "ROSI_UPDATER_ZST_E2E {path} extract_ms={}",
+ "ROSI_UPDATER_ZST_E2E {path} extract_ms={} aarch64={aarch64_ok} x86_64={x86_64_ok} rosetta={rosetta_ok}",
started.elapsed().as_millis()
);
}
diff --git a/src/updater.ts b/src/updater.ts
index 342740a9..1a212be0 100644
--- a/src/updater.ts
+++ b/src/updater.ts
@@ -204,18 +204,33 @@ async function checkFeed(
): Promise {
if (!target?.endsWith(COMPACT_TARGET_SUFFIX)) return checkTargetFeed(target, isCurrent);
try {
- return await checkTargetFeed(target, isCurrent);
- } catch {
+ // No in-place retry: the legacy target below is the retry.
+ return await checkTargetFeed(target, isCurrent, false);
+ } catch (error) {
if (!isCurrent()) return null;
// A release published without per-arch zstd archives still updates
// through the universal .app.tar.gz feed.
- return checkTargetFeed(legacyTarget(target), isCurrent);
+ const fallback = legacyTarget(target);
+ reportCompactFallback(target, fallback, error);
+ return checkTargetFeed(fallback, isCurrent);
+ }
+}
+
+// Logs why a compact check fell back. Logging must never change the check.
+function reportCompactFallback(target: string, fallback: string | undefined, error: unknown): void {
+ try {
+ console.warn(
+ `[rosi] updater: ${target} check failed, falling back to ${fallback ?? 'the default'} target: ${errorMessage(error)}`
+ );
+ } catch {
+ // Ignore logging failures.
}
}
async function checkTargetFeed(
target: string | undefined,
- isCurrent: () => boolean
+ isCurrent: () => boolean,
+ retryOnError = true
): Promise {
const testCheck = e2eUpdaterAdapter()?.check;
if (testCheck) {
@@ -232,7 +247,7 @@ async function checkTargetFeed(
update = await check(options);
} catch (error) {
if (!isCurrent()) return null;
- if (!target) throw error;
+ if (!target || !retryOnError) throw error;
return check(options);
}
if (!isCurrent()) {
diff --git a/testdata/updater/latest-darwin-aarch64-app-zst.json b/testdata/updater/latest-darwin-aarch64-app-zst.json
new file mode 100644
index 00000000..593b9d4b
--- /dev/null
+++ b/testdata/updater/latest-darwin-aarch64-app-zst.json
@@ -0,0 +1,11 @@
+{
+ "version": "0.0.0-fixture",
+ "pub_date": "2026-07-18T00:00:00Z",
+ "notes": "Fixture for per-arch macOS app-zst updater manifest keys (not a release pin).",
+ "platforms": {
+ "darwin-aarch64-app-zst": {
+ "url": "https://github.com/BurntToasters/ROSI/releases/download/v0.0.0-fixture/ROSI-aarch64.app.tar.zst",
+ "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCXZlcnNpb246MC4wLjAtZml4dHVyZQpBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQT09"
+ }
+ }
+}
diff --git a/testdata/updater/latest-darwin-aarch64.json b/testdata/updater/latest-darwin-aarch64.json
index 628417bd..68cc2cbb 100644
--- a/testdata/updater/latest-darwin-aarch64.json
+++ b/testdata/updater/latest-darwin-aarch64.json
@@ -5,7 +5,7 @@
"platforms": {
"darwin-aarch64": {
"url": "https://github.com/BurntToasters/ROSI/releases/download/v0.0.0-fixture/ROSI_aarch64.app.tar.gz",
- "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPT0="
+ "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCXZlcnNpb246MC4wLjAtZml4dHVyZQpBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQT09"
}
}
}
diff --git a/testdata/updater/latest-darwin-beta-aarch64-app-zst.json b/testdata/updater/latest-darwin-beta-aarch64-app-zst.json
new file mode 100644
index 00000000..de25ef9a
--- /dev/null
+++ b/testdata/updater/latest-darwin-beta-aarch64-app-zst.json
@@ -0,0 +1,11 @@
+{
+ "version": "0.0.0-fixture",
+ "pub_date": "2026-07-18T00:00:00Z",
+ "notes": "Fixture for beta-shaped per-arch macOS app-zst updater manifest keys (not a release pin).",
+ "platforms": {
+ "darwin-beta-aarch64-app-zst": {
+ "url": "https://github.com/BurntToasters/ROSI/releases/download/v0.0.0-fixture/ROSI-aarch64.app.tar.zst",
+ "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCXZlcnNpb246MC4wLjAtZml4dHVyZQpBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQT09"
+ }
+ }
+}
diff --git a/testdata/updater/latest-darwin-beta-aarch64.json b/testdata/updater/latest-darwin-beta-aarch64.json
index 97b2f728..6c7c7d07 100644
--- a/testdata/updater/latest-darwin-beta-aarch64.json
+++ b/testdata/updater/latest-darwin-beta-aarch64.json
@@ -5,11 +5,11 @@
"platforms": {
"darwin-beta-aarch64": {
"url": "https://github.com/BurntToasters/ROSI/releases/download/v0.0.0-fixture/ROSI_aarch64.app.tar.gz",
- "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPT0="
+ "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCXZlcnNpb246MC4wLjAtZml4dHVyZQpBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQT09"
},
"darwin-beta": {
"url": "https://github.com/BurntToasters/ROSI/releases/download/v0.0.0-fixture/ROSI_aarch64.app.tar.gz",
- "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPT0="
+ "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCXZlcnNpb246MC4wLjAtZml4dHVyZQpBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQT09"
}
}
}
diff --git a/testdata/updater/latest-darwin-x86_64.json b/testdata/updater/latest-darwin-x86_64.json
index 74d81a2b..560b06e1 100644
--- a/testdata/updater/latest-darwin-x86_64.json
+++ b/testdata/updater/latest-darwin-x86_64.json
@@ -5,7 +5,7 @@
"platforms": {
"darwin-x86_64": {
"url": "https://github.com/BurntToasters/ROSI/releases/download/v0.0.0-fixture/ROSI_x64.app.tar.gz",
- "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPT0="
+ "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCXZlcnNpb246MC4wLjAtZml4dHVyZQpBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQT09"
}
}
}
diff --git a/testdata/updater/latest-linux-x86_64.json b/testdata/updater/latest-linux-x86_64.json
index 3b70e86e..879f9463 100644
--- a/testdata/updater/latest-linux-x86_64.json
+++ b/testdata/updater/latest-linux-x86_64.json
@@ -5,11 +5,11 @@
"platforms": {
"linux-x86_64": {
"url": "https://github.com/BurntToasters/ROSI/releases/download/v0.0.0-fixture/ROSI_0.0.0-fixture_amd64.AppImage",
- "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPT0="
+ "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCXZlcnNpb246MC4wLjAtZml4dHVyZQpBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQT09"
},
"linux-x86_64-appimage": {
"url": "https://github.com/BurntToasters/ROSI/releases/download/v0.0.0-fixture/ROSI_0.0.0-fixture_amd64.AppImage",
- "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPT0="
+ "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCXZlcnNpb246MC4wLjAtZml4dHVyZQpBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQT09"
}
}
}
diff --git a/testdata/updater/latest-windows-aarch64.json b/testdata/updater/latest-windows-aarch64.json
index 347fb36f..42665570 100644
--- a/testdata/updater/latest-windows-aarch64.json
+++ b/testdata/updater/latest-windows-aarch64.json
@@ -5,11 +5,11 @@
"platforms": {
"windows-aarch64-nsis": {
"url": "https://github.com/BurntToasters/ROSI/releases/download/v0.0.0-fixture/ROSI_0.0.0-fixture_arm64-setup.exe",
- "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPT0="
+ "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCXZlcnNpb246MC4wLjAtZml4dHVyZQpBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQT09"
},
"windows-aarch64": {
"url": "https://github.com/BurntToasters/ROSI/releases/download/v0.0.0-fixture/ROSI_0.0.0-fixture_arm64-setup.exe",
- "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPT0="
+ "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCXZlcnNpb246MC4wLjAtZml4dHVyZQpBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQT09"
}
}
}
diff --git a/testdata/updater/latest-windows-x86_64.json b/testdata/updater/latest-windows-x86_64.json
index e747fbd8..99388b24 100644
--- a/testdata/updater/latest-windows-x86_64.json
+++ b/testdata/updater/latest-windows-x86_64.json
@@ -5,11 +5,11 @@
"platforms": {
"windows-x86_64-nsis": {
"url": "https://github.com/BurntToasters/ROSI/releases/download/v0.0.0-fixture/ROSI_0.0.0-fixture_x64-setup.exe",
- "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPT0="
+ "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCXZlcnNpb246MC4wLjAtZml4dHVyZQpBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQT09"
},
"windows-x86_64": {
"url": "https://github.com/BurntToasters/ROSI/releases/download/v0.0.0-fixture/ROSI_0.0.0-fixture_x64-setup.exe",
- "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPT0="
+ "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIG1pbmlzaWduIHNlY3JldCBrZXkKUldRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDowCXZlcnNpb246MC4wLjAtZml4dHVyZQpBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQT09"
}
}
}
From 31f75ec07159e8af2a7f1f243a98451a31a1fb58 Mon Sep 17 00:00:00 2001
From: BurntToasters <61037367+BurntToasters@users.noreply.github.com>
Date: Fri, 30 Oct 2026 14:41:02 -0700
Subject: [PATCH 03/58] Codebase: Migrate toolchain to Node.js 26.13.0 LTS.
---
.github/workflows/ci.yml | 4 ++--
.github/workflows/ytdlp-watch.yml | 3 ++-
build-setup.md | 6 +++---
package-lock.json | 4 ++--
package.json | 6 +++---
scripts/cargo-safe-update.test.mjs | 17 +++++++++--------
scripts/npm-safe-update.mjs | 9 +++++----
vitest.config.ts | 1 +
8 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 84b35715..bf4f88a7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -29,8 +29,8 @@ permissions:
contents: read
env:
- NODE_VERSION: "24.16.0"
- NPM_VERSION: "12.0.2"
+ NODE_VERSION: "26.13.0"
+ NPM_VERSION: "12.2.1"
RUST_VERSION: "1.98.1"
CARGO_AUDIT_VERSION: "0.22.2"
diff --git a/.github/workflows/ytdlp-watch.yml b/.github/workflows/ytdlp-watch.yml
index 8935e607..8fdc5ca4 100644
--- a/.github/workflows/ytdlp-watch.yml
+++ b/.github/workflows/ytdlp-watch.yml
@@ -23,7 +23,8 @@ permissions:
contents: read
env:
- NODE_VERSION: "24.16.0"
+ NODE_VERSION: "26.13.0"
+ NPM_VERSION: "12.2.1"
jobs:
watch:
diff --git a/build-setup.md b/build-setup.md
index b71dfa33..5a3ba4da 100644
--- a/build-setup.md
+++ b/build-setup.md
@@ -11,7 +11,7 @@
Build from a VS developer shell (`npm run win-compiler:arm64` or
`win-compiler:x64`), which puts that clang on `PATH`; a plain PowerShell
window does not.
-- Node.js `^24.15.0 || >=26` (`engines.node` in package.json)
+- Node.js `^24.22.1 || >=26.13.0` (`engines.node` in package.json)
- Rust (rustup)
- Azure Artifact Signing: once per release VM, as Administrator, run
`npm run setup:win:artifact-signing`
@@ -23,7 +23,7 @@
any bundled Mach-O whose minimum OS is above that floor.
- Xcode Command Line Tools (`lipo`, `codesign`, `notarytool`)
- zstd CLI (`brew install zstd`) for the updater archives; checked by `npm run prerelease:prepare`
-- Node.js `^24.15.0 || >=26`
+- Node.js `^24.22.1 || >=26.13.0`
- Rust (rustup)
## Linux
@@ -32,7 +32,7 @@
baseline.
- `npm run setup:deb` installs the Ubuntu build, E2E (xvfb), 7-Zip (for
`get:ffmpeg`), and Flatpak prerequisites.
-- Node.js `^24.15.0 || >=26`
+- Node.js `^24.22.1 || >=26.13.0`
- Rust (rustup)
- Linux v5 releases ship x64 only (`npm run release:linux:x64`). ARM64 wiring
(`release:linux:arm64`, `build:linux:arm64`) remains for future development
diff --git a/package-lock.json b/package-lock.json
index 83d56735..dcd25dd0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -38,8 +38,8 @@
"vitest": "4.1.11"
},
"engines": {
- "node": "^24.15.0 || >=26.0.0",
- "npm": ">=12.0.2"
+ "node": "^24.22.1 || >=26.13.0",
+ "npm": ">=12.2.1"
}
},
"node_modules/@asamuzakjp/css-color": {
diff --git a/package.json b/package.json
index d1eb9b2e..2093c584 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"version": "5.1.0-beta.1",
"license": "MPL-2.0",
"private": true,
- "packageManager": "npm@12.0.2",
+ "packageManager": "npm@12.2.1",
"description": "Cross-platform yt-dlp GUI built with Tauri.",
"type": "module",
"keywords": [
@@ -13,8 +13,8 @@
"cross-platform"
],
"engines": {
- "node": "^24.15.0 || >=26.0.0",
- "npm": ">=12.0.2"
+ "node": "^24.22.1 || >=26.13.0",
+ "npm": ">=12.2.1"
},
"repository": {
"type": "git",
diff --git a/scripts/cargo-safe-update.test.mjs b/scripts/cargo-safe-update.test.mjs
index 5ea8a7ea..9a6c8e6b 100644
--- a/scripts/cargo-safe-update.test.mjs
+++ b/scripts/cargo-safe-update.test.mjs
@@ -1568,18 +1568,19 @@ test("44. deceptive registry baseline cannot preserve a too-young release", () =
});
test("45. update environment versions fail closed at exact boundaries", () => {
- assert.deepEqual(parseVersion("12.0.1"), [12, 0, 1]);
- assert.equal(isVersionAtLeast("12.0.1", MINIMUM_NPM_VERSION), true);
- assert.equal(isVersionAtLeast("12.1.0", MINIMUM_NPM_VERSION), true);
- assert.equal(isVersionAtLeast("12.0.0", MINIMUM_NPM_VERSION), false);
+ assert.deepEqual(parseVersion("12.2.1"), [12, 2, 1]);
+ assert.equal(isVersionAtLeast("12.2.1", MINIMUM_NPM_VERSION), true);
+ assert.equal(isVersionAtLeast("12.3.0", MINIMUM_NPM_VERSION), true);
+ assert.equal(isVersionAtLeast("12.2.0", MINIMUM_NPM_VERSION), false);
assert.equal(isVersionAtLeast("11.99.99", MINIMUM_NPM_VERSION), false);
assert.equal(isSupportedNodeVersion("22.22.2"), false);
- assert.equal(isSupportedNodeVersion("22.99.99"), false);
assert.equal(isSupportedNodeVersion("23.99.99"), false);
- assert.equal(isSupportedNodeVersion("24.15.0"), true);
- assert.equal(isSupportedNodeVersion("24.14.9"), false);
+ assert.equal(isSupportedNodeVersion("24.22.0"), false);
+ assert.equal(isSupportedNodeVersion("24.22.1"), true);
assert.equal(isSupportedNodeVersion("25.99.99"), false);
- assert.equal(isSupportedNodeVersion("26.0.0"), true);
+ assert.equal(isSupportedNodeVersion("26.12.9"), false);
+ assert.equal(isSupportedNodeVersion("26.13.0"), true);
+ assert.equal(isSupportedNodeVersion("27.0.0"), true);
assert.throws(() => parseVersion("latest"), /Invalid semantic version/);
});
diff --git a/scripts/npm-safe-update.mjs b/scripts/npm-safe-update.mjs
index c642c002..f51fd4ee 100644
--- a/scripts/npm-safe-update.mjs
+++ b/scripts/npm-safe-update.mjs
@@ -25,8 +25,8 @@ const npmDevAuditScript = fileURLToPath(
new URL("./npm-dev-audit.cjs", import.meta.url),
);
-export const MINIMUM_NPM_VERSION = "12.0.1";
-export const SUPPORTED_NODE_VERSIONS = "^24.15.0 || >=26.0.0";
+export const MINIMUM_NPM_VERSION = "12.2.1";
+export const SUPPORTED_NODE_VERSIONS = "^24.22.1 || >=26.13.0";
export function readPinnedRustToolchain(root) {
const filePath = path.join(root, "rust-toolchain.toml");
@@ -71,8 +71,9 @@ export function isVersionAtLeast(value, minimum) {
export function isSupportedNodeVersion(value) {
const [major] = parseVersion(value);
- if (major === 24) return isVersionAtLeast(value, "24.15.0");
- return major >= 26;
+ if (major === 24) return isVersionAtLeast(value, "24.22.1");
+ if (major === 26) return isVersionAtLeast(value, "26.13.0");
+ return major > 26;
}
export function hasRustToolchain(output, toolchain) {
diff --git a/vitest.config.ts b/vitest.config.ts
index aaca9932..c374be2f 100644
--- a/vitest.config.ts
+++ b/vitest.config.ts
@@ -3,6 +3,7 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'jsdom',
+ execArgv: Number(process.versions.node.split('.')[0]) >= 25 ? ['--no-webstorage'] : [],
include: ['src/tests/**/*.test.ts'],
restoreMocks: true,
testTimeout: 10_000,
From f6e8d5a0b7588e0f59841fc033db97c5baf2c0cd Mon Sep 17 00:00:00 2001
From: BurntToasters <61037367+BurntToasters@users.noreply.github.com>
Date: Wed, 4 Nov 2026 15:53:39 -0800
Subject: [PATCH 04/58] bumped pinned rust version to 1.99.1
---
.github/workflows/ci.yml | 2 +-
build-setup.md | 2 +-
package.json | 12 ++++++------
run.rosie.rosi.yml | 2 +-
rust-toolchain.toml | 2 +-
scripts/cargo-safe-update.test.mjs | 10 +++++-----
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bf4f88a7..c2087ed5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -31,7 +31,7 @@ permissions:
env:
NODE_VERSION: "26.13.0"
NPM_VERSION: "12.2.1"
- RUST_VERSION: "1.98.1"
+ RUST_VERSION: "1.99.1"
CARGO_AUDIT_VERSION: "0.22.2"
jobs:
diff --git a/build-setup.md b/build-setup.md
index 5a3ba4da..e09da029 100644
--- a/build-setup.md
+++ b/build-setup.md
@@ -40,7 +40,7 @@
## Rust toolchain policy
-ROSI builds with Rust `1.98.1`, pinned in `rust-toolchain.toml` and used by CI,
+ROSI builds with Rust `1.99.1`, pinned in `rust-toolchain.toml` and used by CI,
Flatpak, and release builds. Install that exact toolchain before building:
```sh
diff --git a/package.json b/package.json
index 2093c584..d084937e 100644
--- a/package.json
+++ b/package.json
@@ -119,12 +119,12 @@
"flatpak:bundle": "node scripts/prepare-flatpak-source.js && flatpak-builder --repo=flatpak-repo --force-clean flatpak-build run.rosie.rosi.yml && flatpak build-bundle flatpak-repo dist/ROSI-Linux-x64.flatpak run.rosie.rosi",
"flatpak:clean": "node -e \"for (const d of ['flatpak-build','flatpak-repo']) require('fs').rmSync(d,{recursive:true,force:true})\"",
"flatpak:run": "flatpak run run.rosie.rosi",
- "rust:update": "rustup toolchain install 1.98.1 --profile minimal --component cargo,clippy,rustfmt",
- "rust:targets:win": "rustup target add --toolchain 1.98.1 x86_64-pc-windows-msvc aarch64-pc-windows-msvc",
- "rust:targets:mac": "rustup target add --toolchain 1.98.1 x86_64-apple-darwin aarch64-apple-darwin",
- "rust:targets:linux": "rustup target add --toolchain 1.98.1 x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu",
- "rust:target:linux:x64": "rustup target add --toolchain 1.98.1 x86_64-unknown-linux-gnu",
- "rust:target:linux:arm64": "rustup target add --toolchain 1.98.1 aarch64-unknown-linux-gnu",
+ "rust:update": "rustup toolchain install 1.99.1 --profile minimal --component cargo,clippy,rustfmt",
+ "rust:targets:win": "rustup target add --toolchain 1.99.1 x86_64-pc-windows-msvc aarch64-pc-windows-msvc",
+ "rust:targets:mac": "rustup target add --toolchain 1.99.1 x86_64-apple-darwin aarch64-apple-darwin",
+ "rust:targets:linux": "rustup target add --toolchain 1.99.1 x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu",
+ "rust:target:linux:x64": "rustup target add --toolchain 1.99.1 x86_64-unknown-linux-gnu",
+ "rust:target:linux:arm64": "rustup target add --toolchain 1.99.1 aarch64-unknown-linux-gnu",
"workspace:bootstrap": "npm run rust:update && npm ci --ignore-scripts && npm run sync-version && npm run ytdlp:fetch && npm run ytdlp:check && npm run ffmpeg:ensure && npm run prepare:sidecars",
"workspace:prepare": "npm run workspace:bootstrap && npm run test:all -- --require-clean-proof",
"release:prepare": "npm run workspace:bootstrap && npm run test:all -- --require-clean-proof --skip-e2e && npm run dist:clean-release-artifacts",
diff --git a/run.rosie.rosi.yml b/run.rosie.rosi.yml
index 8c4d80e4..3cd07b0f 100644
--- a/run.rosie.rosi.yml
+++ b/run.rosie.rosi.yml
@@ -46,7 +46,7 @@ modules:
build-commands:
# The Flatpak rust-stable SDK extension installs rustc/cargo directly,
# not through rustup. Fail closed if that extension drifts from our pin.
- - test "$(rustc --version | cut -d' ' -f2)" = 1.98.1
+ - test "$(rustc --version | cut -d' ' -f2)" = 1.99.1
# The node24 SDK ships npm 11, older than the npm 12 that engines requires.
# npm@12 plus --before 3 days ago takes the newest 12.x that is old enough.
- npm install --global npm@12 --ignore-scripts --engine-strict=false --before="$(date -u -d '3 days ago' +%Y-%m-%dT%H:%M:%SZ)" --prefix /run/build/rosi/npm-global
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index 96b62512..1f49eff4 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -1,4 +1,4 @@
[toolchain]
-channel = "1.98.1"
+channel = "1.99.1"
profile = "minimal"
components = ["cargo", "clippy", "rustfmt"]
diff --git a/scripts/cargo-safe-update.test.mjs b/scripts/cargo-safe-update.test.mjs
index 9a6c8e6b..c7e710ad 100644
--- a/scripts/cargo-safe-update.test.mjs
+++ b/scripts/cargo-safe-update.test.mjs
@@ -1585,15 +1585,15 @@ test("45. update environment versions fail closed at exact boundaries", () => {
});
// Failure modes covered: a floating `stable` toolchain passes without the
-// repository pin; a prefix match accepts 1.98.10 for 1.98.1; rustup's
+// repository pin; a prefix match accepts 1.99.10 for 1.99.1; rustup's
// host-qualified exact version is rejected; or a malformed pin passes.
test("45a. npm updater requires exact repository-pinned Rust toolchain", () => {
const root = process.cwd();
const pinned = readPinnedRustToolchain(root);
- assert.equal(pinned, "1.98.1");
- assert.equal(hasRustToolchain("1.98.1\n", pinned), true);
+ assert.equal(pinned, "1.99.1");
+ assert.equal(hasRustToolchain("1.99.1\n", pinned), true);
assert.equal(
- hasRustToolchain("1.98.1-aarch64-apple-darwin (default)\n", pinned),
+ hasRustToolchain("1.99.1-aarch64-apple-darwin (default)\n", pinned),
true,
);
assert.equal(hasRustToolchain("stable\n", pinned), false);
@@ -1602,7 +1602,7 @@ test("45a. npm updater requires exact repository-pinned Rust toolchain", () => {
false,
);
assert.equal(
- hasRustToolchain("1.98.10-aarch64-apple-darwin\n", pinned),
+ hasRustToolchain("1.99.10-aarch64-apple-darwin\n", pinned),
false,
);
From a362b9d78c663fba60c73bc21e60c98eba9e56f0 Mon Sep 17 00:00:00 2001
From: BurntToasters <61037367+BurntToasters@users.noreply.github.com>
Date: Thu, 5 Nov 2026 18:56:28 -0800
Subject: [PATCH 05/58] Toolchain: Build Flatpak with the pinned Rust
toolchain.
---
run.rosie.rosi.yml | 14 ++++++++------
scripts/validate-flatpak-dry-run.js | 12 +++++++++---
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/run.rosie.rosi.yml b/run.rosie.rosi.yml
index 3cd07b0f..cf12a3af 100644
--- a/run.rosie.rosi.yml
+++ b/run.rosie.rosi.yml
@@ -1,6 +1,6 @@
app-id: run.rosie.rosi
runtime: org.gnome.Platform
-runtime-version: "50"
+runtime-version: '50'
sdk: org.gnome.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.node24
@@ -27,7 +27,7 @@ finish-args:
# Flatpak builds update by reinstalling the bundle, not the in-app updater.
environment:
- GTK_USE_PORTAL: "1"
+ GTK_USE_PORTAL: '1'
modules:
- name: rosi
@@ -38,14 +38,16 @@ modules:
# commit export prepared by scripts/prepare-flatpak-source.js.
build-args:
- --share=network
- append-path: /run/build/rosi/npm-global/bin:/usr/lib/sdk/node24/bin:/usr/lib/sdk/rust-stable/bin
+ prepend-path: /run/build/rosi/cargo/bin:/run/build/rosi/npm-global/bin:/usr/lib/sdk/node24/bin:/usr/lib/sdk/rust-stable/bin
env:
CARGO_HOME: /run/build/rosi/cargo
+ RUSTUP_HOME: /run/build/rosi/rustup
npm_config_cache: /run/build/rosi/npm-cache
- HUSKY: "0"
+ HUSKY: '0'
build-commands:
- # The Flatpak rust-stable SDK extension installs rustc/cargo directly,
- # not through rustup. Fail closed if that extension drifts from our pin.
+ # The Flathub rust-stable SDK extension lags the pinned toolchain, so
+ # install rustup and the exact pinned compiler inside the sandbox.
+ - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.99.1 --profile minimal
- test "$(rustc --version | cut -d' ' -f2)" = 1.99.1
# The node24 SDK ships npm 11, older than the npm 12 that engines requires.
# npm@12 plus --before 3 days ago takes the newest 12.x that is old enough.
diff --git a/scripts/validate-flatpak-dry-run.js b/scripts/validate-flatpak-dry-run.js
index 80cb2d2f..586138bd 100644
--- a/scripts/validate-flatpak-dry-run.js
+++ b/scripts/validate-flatpak-dry-run.js
@@ -18,7 +18,7 @@ const required = [
"scripts/prepare-flatpak-source.js",
"scripts/prepare-sidecars.js",
];
-const expectedRuntime = 'runtime-version: "50"';
+const expectedRuntime = "runtime-version: '50'";
const rustToolchain = fs
.readFileSync(path.join(root, "rust-toolchain.toml"), "utf8")
.match(/^channel = "(\d+\.\d+\.\d+)"$/m)?.[1];
@@ -70,16 +70,22 @@ if (fs.existsSync(manifest)) {
if (!yaml.includes("tauri build --no-bundle -- --locked")) {
fail("Cargo build must enforce Cargo.lock");
}
+ const cargoBin = "/run/build/rosi/cargo/bin";
+ const prependPath = yaml.match(/^\s*prepend-path: (.+)$/m)?.[1]?.split(":");
if (
!rustToolchain ||
!yaml.includes(
`test "$(rustc --version | cut -d' ' -f2)" = ${rustToolchain}`,
) ||
- yaml.includes("rustup toolchain install") ||
+ !yaml.includes(
+ "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs",
+ ) ||
+ !yaml.includes("RUSTUP_HOME: /run/build/rosi/rustup") ||
+ !prependPath?.includes(cargoBin) ||
yaml.includes("RUSTUP_TOOLCHAIN:")
) {
fail(
- "Rust SDK extension must fail closed on the exact pinned compiler without invoking unavailable rustup",
+ "Flatpak must install the exact pinned compiler with rustup inside the sandbox and fail closed on the exact pin",
);
}
if (!yaml.includes("Unsupported FLATPAK_ARCH")) {
From f47b617d38a3540b04acbf88a6a493409d7e946f Mon Sep 17 00:00:00 2001
From: BurntToasters <61037367+BurntToasters@users.noreply.github.com>
Date: Thu, 5 Nov 2026 20:53:31 -0800
Subject: [PATCH 06/58] Toolchain: Derive Rust pin from rust-toolchain.toml
---
.github/workflows/ci.yml | 41 ++++-
docs/DEPENDENCY_UPDATES.md | 42 +++++
package.json | 12 +-
run.rosie.rosi.yml | 10 +-
scripts/cargo-safe-update.test.mjs | 15 +-
scripts/npm-safe-update.mjs | 26 +--
scripts/rust-toolchain.mjs | 254 ++++++++++++++++++++++++++++
scripts/validate-flatpak-dry-run.js | 30 +++-
8 files changed, 380 insertions(+), 50 deletions(-)
create mode 100644 docs/DEPENDENCY_UPDATES.md
create mode 100644 scripts/rust-toolchain.mjs
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c2087ed5..d494d89a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -31,7 +31,6 @@ permissions:
env:
NODE_VERSION: "26.13.0"
NPM_VERSION: "12.2.1"
- RUST_VERSION: "1.99.1"
CARGO_AUDIT_VERSION: "0.22.2"
jobs:
@@ -74,9 +73,17 @@ jobs:
cache: npm
- name: Install latest npm 12
run: npm install --global npm@${{ env.NPM_VERSION }} --ignore-scripts --min-release-age=3
+ - name: Read pinned Rust toolchain
+ id: rust-toolchain
+ shell: bash
+ run: |
+ set -euo pipefail
+ channel="$(node scripts/rust-toolchain.mjs)"
+ test -n "$channel"
+ echo "channel=$channel" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
with:
- toolchain: ${{ env.RUST_VERSION }}
+ toolchain: ${{ steps.rust-toolchain.outputs.channel }}
components: rustfmt, clippy
- name: Install Linux dependencies
run: |
@@ -127,9 +134,17 @@ jobs:
cache: npm
- name: Install latest npm 12
run: npm install --global npm@${{ env.NPM_VERSION }} --ignore-scripts --min-release-age=3
+ - name: Read pinned Rust toolchain
+ id: rust-toolchain
+ shell: bash
+ run: |
+ set -euo pipefail
+ channel="$(node scripts/rust-toolchain.mjs)"
+ test -n "$channel"
+ echo "channel=$channel" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
with:
- toolchain: ${{ env.RUST_VERSION }}
+ toolchain: ${{ steps.rust-toolchain.outputs.channel }}
components: clippy
- run: npm ci --ignore-scripts
# On windows-latest gpg ships only in Git for Windows (usr\bin), which is
@@ -222,9 +237,17 @@ jobs:
cache: npm
- name: Install latest npm 12
run: npm install --global npm@${{ env.NPM_VERSION }} --ignore-scripts --min-release-age=3
+ - name: Read pinned Rust toolchain
+ id: rust-toolchain
+ shell: bash
+ run: |
+ set -euo pipefail
+ channel="$(node scripts/rust-toolchain.mjs)"
+ test -n "$channel"
+ echo "channel=$channel" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
with:
- toolchain: ${{ env.RUST_VERSION }}
+ toolchain: ${{ steps.rust-toolchain.outputs.channel }}
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
@@ -269,9 +292,17 @@ jobs:
cache: npm
- name: Install latest npm 12
run: npm install --global npm@${{ env.NPM_VERSION }} --ignore-scripts --min-release-age=3
+ - name: Read pinned Rust toolchain
+ id: rust-toolchain
+ shell: bash
+ run: |
+ set -euo pipefail
+ channel="$(node scripts/rust-toolchain.mjs)"
+ test -n "$channel"
+ echo "channel=$channel" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # stable
with:
- toolchain: ${{ env.RUST_VERSION }}
+ toolchain: ${{ steps.rust-toolchain.outputs.channel }}
- run: npm ci --ignore-scripts
- run: node scripts/npm-audit-signatures.cjs
- name: npm audit - production
diff --git a/docs/DEPENDENCY_UPDATES.md b/docs/DEPENDENCY_UPDATES.md
new file mode 100644
index 00000000..4fe96596
--- /dev/null
+++ b/docs/DEPENDENCY_UPDATES.md
@@ -0,0 +1,42 @@
+# Dependency updates
+
+## Rust toolchain
+
+`rust-toolchain.toml` is the single source of the Rust version. The `channel`
+value in its `[toolchain]` table is the only place the version is written.
+`scripts/rust-toolchain.mjs` reads that file for the npm scripts, CI reads its
+output for the `dtolnay/rust-toolchain` steps, and the Flatpak manifest extracts
+the same value with `sed`.
+
+Do not copy the version into `package.json`, `.github/workflows/ci.yml`, or
+`run.rosie.rosi.yml`.
+
+To bump Rust:
+
+1. Change `channel` in `rust-toolchain.toml`. Keep `profile` and `components`
+ in that file as needed.
+2. Run `npm run rust:update` to install the pinned toolchain.
+3. Run `npm run rust:targets:win`, `npm run rust:targets:mac`, or
+ `npm run rust:targets:linux` as appropriate.
+4. Run `npm run validate:flatpak` and the normal test suite.
+
+The helper is also usable directly:
+
+```sh
+node scripts/rust-toolchain.mjs # print the pinned version
+node scripts/rust-toolchain.mjs --install # install profile and components
+node scripts/rust-toolchain.mjs --target aarch64-apple-darwin
+```
+
+## npm and Cargo
+
+Run the guarded updaters from a clean worktree:
+
+```sh
+node scripts/npm-safe-update.mjs
+node scripts/cargo-safe-update.mjs --manifest-path src-tauri/Cargo.toml
+```
+
+`npm run u` runs both updaters plus version synchronization. Neither updater
+changes the Rust pin; update `rust-toolchain.toml` separately when the toolchain
+itself should move.
diff --git a/package.json b/package.json
index d084937e..d0e08003 100644
--- a/package.json
+++ b/package.json
@@ -119,12 +119,12 @@
"flatpak:bundle": "node scripts/prepare-flatpak-source.js && flatpak-builder --repo=flatpak-repo --force-clean flatpak-build run.rosie.rosi.yml && flatpak build-bundle flatpak-repo dist/ROSI-Linux-x64.flatpak run.rosie.rosi",
"flatpak:clean": "node -e \"for (const d of ['flatpak-build','flatpak-repo']) require('fs').rmSync(d,{recursive:true,force:true})\"",
"flatpak:run": "flatpak run run.rosie.rosi",
- "rust:update": "rustup toolchain install 1.99.1 --profile minimal --component cargo,clippy,rustfmt",
- "rust:targets:win": "rustup target add --toolchain 1.99.1 x86_64-pc-windows-msvc aarch64-pc-windows-msvc",
- "rust:targets:mac": "rustup target add --toolchain 1.99.1 x86_64-apple-darwin aarch64-apple-darwin",
- "rust:targets:linux": "rustup target add --toolchain 1.99.1 x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu",
- "rust:target:linux:x64": "rustup target add --toolchain 1.99.1 x86_64-unknown-linux-gnu",
- "rust:target:linux:arm64": "rustup target add --toolchain 1.99.1 aarch64-unknown-linux-gnu",
+ "rust:update": "node scripts/rust-toolchain.mjs --install",
+ "rust:targets:win": "node scripts/rust-toolchain.mjs --target x86_64-pc-windows-msvc aarch64-pc-windows-msvc",
+ "rust:targets:mac": "node scripts/rust-toolchain.mjs --target x86_64-apple-darwin aarch64-apple-darwin",
+ "rust:targets:linux": "node scripts/rust-toolchain.mjs --target x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu",
+ "rust:target:linux:x64": "node scripts/rust-toolchain.mjs --target x86_64-unknown-linux-gnu",
+ "rust:target:linux:arm64": "node scripts/rust-toolchain.mjs --target aarch64-unknown-linux-gnu",
"workspace:bootstrap": "npm run rust:update && npm ci --ignore-scripts && npm run sync-version && npm run ytdlp:fetch && npm run ytdlp:check && npm run ffmpeg:ensure && npm run prepare:sidecars",
"workspace:prepare": "npm run workspace:bootstrap && npm run test:all -- --require-clean-proof",
"release:prepare": "npm run workspace:bootstrap && npm run test:all -- --require-clean-proof --skip-e2e && npm run dist:clean-release-artifacts",
diff --git a/run.rosie.rosi.yml b/run.rosie.rosi.yml
index cf12a3af..a5624903 100644
--- a/run.rosie.rosi.yml
+++ b/run.rosie.rosi.yml
@@ -46,9 +46,13 @@ modules:
HUSKY: '0'
build-commands:
# The Flathub rust-stable SDK extension lags the pinned toolchain, so
- # install rustup and the exact pinned compiler inside the sandbox.
- - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.99.1 --profile minimal
- - test "$(rustc --version | cut -d' ' -f2)" = 1.99.1
+ # install rustup and the exact compiler pinned in rust-toolchain.toml.
+ - |
+ set -eu
+ PINNED="$(sed -n 's/^[[:space:]]*channel[[:space:]]*=[[:space:]]*"\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)"[[:space:]]*$/\1/p' rust-toolchain.toml)"
+ test -n "$PINNED"
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain "$PINNED" --profile minimal
+ test "$(rustc --version | cut -d' ' -f2)" = "$PINNED"
# The node24 SDK ships npm 11, older than the npm 12 that engines requires.
# npm@12 plus --before 3 days ago takes the newest 12.x that is old enough.
- npm install --global npm@12 --ignore-scripts --engine-strict=false --before="$(date -u -d '3 days ago' +%Y-%m-%dT%H:%M:%SZ)" --prefix /run/build/rosi/npm-global
diff --git a/scripts/cargo-safe-update.test.mjs b/scripts/cargo-safe-update.test.mjs
index c7e710ad..4ac07335 100644
--- a/scripts/cargo-safe-update.test.mjs
+++ b/scripts/cargo-safe-update.test.mjs
@@ -1585,15 +1585,18 @@ test("45. update environment versions fail closed at exact boundaries", () => {
});
// Failure modes covered: a floating `stable` toolchain passes without the
-// repository pin; a prefix match accepts 1.99.10 for 1.99.1; rustup's
-// host-qualified exact version is rejected; or a malformed pin passes.
+// repository pin; a prefix match accepts a later patch release for the exact
+// pin; rustup's host-qualified exact version is rejected; or a malformed pin
+// passes.
test("45a. npm updater requires exact repository-pinned Rust toolchain", () => {
const root = process.cwd();
const pinned = readPinnedRustToolchain(root);
- assert.equal(pinned, "1.99.1");
- assert.equal(hasRustToolchain("1.99.1\n", pinned), true);
+ const [major, minor, patch] = pinned.split(".").map(Number);
+ const nextPatch = `${major}.${minor}.${patch + 1}`;
+ assert.match(pinned, /^\d+\.\d+\.\d+$/u);
+ assert.equal(hasRustToolchain(`${pinned}\n`, pinned), true);
assert.equal(
- hasRustToolchain("1.99.1-aarch64-apple-darwin (default)\n", pinned),
+ hasRustToolchain(`${pinned}-aarch64-apple-darwin (default)\n`, pinned),
true,
);
assert.equal(hasRustToolchain("stable\n", pinned), false);
@@ -1602,7 +1605,7 @@ test("45a. npm updater requires exact repository-pinned Rust toolchain", () => {
false,
);
assert.equal(
- hasRustToolchain("1.99.10-aarch64-apple-darwin\n", pinned),
+ hasRustToolchain(`${nextPatch}-aarch64-apple-darwin\n`, pinned),
false,
);
diff --git a/scripts/npm-safe-update.mjs b/scripts/npm-safe-update.mjs
index f51fd4ee..8d0abae7 100644
--- a/scripts/npm-safe-update.mjs
+++ b/scripts/npm-safe-update.mjs
@@ -19,38 +19,18 @@ import process from "node:process";
import { fileURLToPath, pathToFileURL } from "node:url";
import npmCli from "./npm-cli.cjs";
+import { readPinnedRustToolchain } from "./rust-toolchain.mjs";
const { npmInvocation } = npmCli;
const npmDevAuditScript = fileURLToPath(
new URL("./npm-dev-audit.cjs", import.meta.url),
);
+export { readPinnedRustToolchain };
+
export const MINIMUM_NPM_VERSION = "12.2.1";
export const SUPPORTED_NODE_VERSIONS = "^24.22.1 || >=26.13.0";
-export function readPinnedRustToolchain(root) {
- const filePath = path.join(root, "rust-toolchain.toml");
- let contents;
- try {
- contents = readFileSync(filePath, "utf8");
- } catch (error) {
- if (error?.code === "ENOENT") {
- throw new Error(`Rust toolchain pin is missing: ${filePath}`, {
- cause: error,
- });
- }
- throw error;
- }
-
- const channel = contents.match(/^\s*channel\s*=\s*"([^"]+)"\s*$/mu)?.[1];
- if (!channel || !/^\d+\.\d+\.\d+$/u.test(channel)) {
- throw new Error(
- `rust-toolchain.toml must pin an exact Rust version; found ${channel || "no channel"}`,
- );
- }
- return channel;
-}
-
export function parseVersion(value) {
const match = String(value)
.trim()
diff --git a/scripts/rust-toolchain.mjs b/scripts/rust-toolchain.mjs
new file mode 100644
index 00000000..ada807c3
--- /dev/null
+++ b/scripts/rust-toolchain.mjs
@@ -0,0 +1,254 @@
+#!/usr/bin/env node
+
+import { spawnSync } from "node:child_process";
+import console from "node:console";
+import { readFileSync } from "node:fs";
+import path from "node:path";
+import process from "node:process";
+import { fileURLToPath, pathToFileURL } from "node:url";
+
+const TOOLCHAIN_FILE = "rust-toolchain.toml";
+const EXACT_RUST_VERSION = /^\d+\.\d+\.\d+$/u;
+const COMPONENT_NAME = /^[A-Za-z0-9_-]+$/u;
+const TARGET_TRIPLE = /^[A-Za-z0-9][A-Za-z0-9_.-]*$/u;
+const USAGE = `Usage: node scripts/rust-toolchain.mjs [--print | --install | --target ]
+
+Without arguments, prints the exact Rust version pinned in rust-toolchain.toml.
+ --print Print the pinned version.
+ --install Install the pinned toolchain with its profile and components.
+ --target Add one or more targets to the pinned toolchain.`;
+
+function toolchainError(filePath, message, cause) {
+ return new Error(
+ `${TOOLCHAIN_FILE} ${message}: ${filePath}`,
+ cause === undefined ? undefined : { cause },
+ );
+}
+
+function parseQuotedValue(rawValue, filePath, key) {
+ const value = rawValue.match(/^"([^"]*)"\s*(?:#.*)?$/u)?.[1];
+ if (value === undefined) {
+ throw toolchainError(
+ filePath,
+ `has a malformed ${key}; expected a quoted string`,
+ );
+ }
+ return value;
+}
+
+function parseComponents(rawValue, lines, startIndex, filePath) {
+ const parts = [rawValue.replace(/\s+#.*$/u, "")];
+ let index = startIndex;
+ while (!parts.at(-1).includes("]")) {
+ index += 1;
+ if (index >= lines.length) {
+ throw toolchainError(filePath, "has an unterminated components array");
+ }
+ parts.push(lines[index].trim().replace(/\s+#.*$/u, ""));
+ }
+
+ const text = parts.join(" ");
+ const body = text.slice(0, text.indexOf("]"));
+ const components = [...body.matchAll(/"([^"]+)"|'([^']+)'/gu)].map(
+ (match) => match[1] ?? match[2],
+ );
+ if (components.length === 0) {
+ throw toolchainError(filePath, "has an empty components array");
+ }
+ for (const component of components) {
+ if (!COMPONENT_NAME.test(component)) {
+ throw toolchainError(
+ filePath,
+ `has a malformed component name: ${component}`,
+ );
+ }
+ }
+ return { components, index };
+}
+
+export function readRustToolchain(root) {
+ const filePath = path.join(root, TOOLCHAIN_FILE);
+ let contents;
+ try {
+ contents = readFileSync(filePath, "utf8");
+ } catch (error) {
+ if (error?.code === "ENOENT") {
+ throw toolchainError(filePath, "is missing", error);
+ }
+ throw error;
+ }
+
+ const lines = contents.replace(/^\uFEFF/u, "").split(/\r?\n/u);
+ let section = "";
+ let channel;
+ let profile;
+ let components = [];
+ let componentsSeen = false;
+
+ for (let index = 0; index < lines.length; index += 1) {
+ const line = lines[index].trim();
+ if (!line || line.startsWith("#")) continue;
+
+ const sectionMatch = line.match(/^\[([^\]]+)\]\s*(?:#.*)?$/u);
+ if (sectionMatch) {
+ section = sectionMatch[1].trim();
+ continue;
+ }
+ if (section !== "toolchain") continue;
+
+ const keyValue = line.match(/^([A-Za-z0-9_-]+)\s*=\s*(.*)$/u);
+ if (!keyValue) {
+ throw toolchainError(filePath, `has a malformed line: ${line}`);
+ }
+ const [, key, rawValue] = keyValue;
+
+ if (key === "channel") {
+ if (channel !== undefined) {
+ throw toolchainError(filePath, "defines channel more than once");
+ }
+ channel = parseQuotedValue(rawValue, filePath, "channel");
+ continue;
+ }
+ if (key === "profile") {
+ if (profile !== undefined) {
+ throw toolchainError(filePath, "defines profile more than once");
+ }
+ profile = parseQuotedValue(rawValue, filePath, "profile");
+ continue;
+ }
+ if (key === "components") {
+ if (componentsSeen) {
+ throw toolchainError(filePath, "defines components more than once");
+ }
+ const parsed = parseComponents(rawValue, lines, index, filePath);
+ components = parsed.components;
+ componentsSeen = true;
+ index = parsed.index;
+ }
+ }
+
+ if (!channel) {
+ throw toolchainError(
+ filePath,
+ "must pin an exact Rust version; found no channel",
+ );
+ }
+ if (!EXACT_RUST_VERSION.test(channel)) {
+ throw toolchainError(
+ filePath,
+ `must pin an exact Rust version; found ${channel}`,
+ );
+ }
+
+ return { channel, profile, components };
+}
+
+export function readPinnedRustToolchain(root) {
+ return readRustToolchain(root).channel;
+}
+
+function parseArguments(argv) {
+ const options = { action: "print", targets: [] };
+ for (let index = 0; index < argv.length; index += 1) {
+ const argument = argv[index];
+ if (argument === "--help" || argument === "-h") {
+ return { action: "help" };
+ }
+ if (argument === "--print") {
+ if (options.action !== "print") {
+ throw new Error("Choose only one of --print, --install, or --target");
+ }
+ continue;
+ }
+ if (argument === "--install") {
+ if (options.action !== "print") {
+ throw new Error("Choose only one of --print, --install, or --target");
+ }
+ options.action = "install";
+ continue;
+ }
+ if (argument === "--target") {
+ if (options.action !== "print") {
+ throw new Error("Choose only one of --print, --install, or --target");
+ }
+ const targets = argv.slice(index + 1);
+ if (targets.length === 0) {
+ throw new Error("--target requires at least one target triple");
+ }
+ for (const target of targets) {
+ if (!TARGET_TRIPLE.test(target)) {
+ throw new Error(`Invalid target triple: ${target}`);
+ }
+ }
+ options.action = "target";
+ options.targets = targets;
+ break;
+ }
+ throw new Error(`Unknown argument: ${argument}`);
+ }
+ return options;
+}
+
+function runRustup(args) {
+ const result = spawnSync("rustup", args, {
+ stdio: "inherit",
+ windowsHide: true,
+ shell: false,
+ });
+ if (result.error) throw result.error;
+ if (result.status !== 0) {
+ throw new Error(
+ `rustup ${args.join(" ")} failed with exit code ${result.status}`,
+ );
+ }
+}
+
+function main() {
+ const options = parseArguments(process.argv.slice(2));
+ if (options.action === "help") {
+ console.log(USAGE);
+ return;
+ }
+
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
+ const toolchain = readRustToolchain(root);
+
+ if (options.action === "print") {
+ console.log(toolchain.channel);
+ return;
+ }
+ if (options.action === "install") {
+ const args = [
+ "toolchain",
+ "install",
+ toolchain.channel,
+ "--profile",
+ toolchain.profile || "minimal",
+ ];
+ if (toolchain.components.length > 0) {
+ args.push("--component", toolchain.components.join(","));
+ }
+ runRustup(args);
+ return;
+ }
+
+ runRustup([
+ "target",
+ "add",
+ "--toolchain",
+ toolchain.channel,
+ ...options.targets,
+ ]);
+}
+
+const isMainModule =
+ process.argv[1] &&
+ pathToFileURL(path.resolve(process.argv[1])).href === import.meta.url;
+if (isMainModule) {
+ try {
+ main();
+ } catch (error) {
+ console.error(`rust-toolchain: ${error.message}`);
+ process.exitCode = 1;
+ }
+}
diff --git a/scripts/validate-flatpak-dry-run.js b/scripts/validate-flatpak-dry-run.js
index 586138bd..f78a2342 100644
--- a/scripts/validate-flatpak-dry-run.js
+++ b/scripts/validate-flatpak-dry-run.js
@@ -8,6 +8,7 @@ import path from "path";
import { fileURLToPath } from "url";
import { spawnSync } from "child_process";
import { hasExactReleaseVersion } from "./update-metainfo.js";
+import { readPinnedRustToolchain } from "./rust-toolchain.mjs";
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), "..");
const required = [
@@ -19,9 +20,6 @@ const required = [
"scripts/prepare-sidecars.js",
];
const expectedRuntime = "runtime-version: '50'";
-const rustToolchain = fs
- .readFileSync(path.join(root, "rust-toolchain.toml"), "utf8")
- .match(/^channel = "(\d+\.\d+\.\d+)"$/m)?.[1];
let failed = false;
function fail(message) {
@@ -29,6 +27,13 @@ function fail(message) {
failed = true;
}
+let rustToolchain;
+try {
+ rustToolchain = readPinnedRustToolchain(root);
+} catch (error) {
+ fail(error.message);
+}
+
for (const rel of required) {
if (!fs.existsSync(path.join(root, rel))) fail(`missing ${rel}`);
}
@@ -72,11 +77,22 @@ if (fs.existsSync(manifest)) {
}
const cargoBin = "/run/build/rosi/cargo/bin";
const prependPath = yaml.match(/^\s*prepend-path: (.+)$/m)?.[1]?.split(":");
+ const manifestLines = yaml.split(/\r?\n/u);
+ const extractsPin = manifestLines.some(
+ (line) =>
+ line.includes("PINNED=") &&
+ line.includes("sed") &&
+ line.includes("channel") &&
+ line.includes("rust-toolchain.toml"),
+ );
+ const assertsPin = manifestLines.some(
+ (line) => line.includes("rustc --version") && line.includes('= "$PINNED"'),
+ );
if (
!rustToolchain ||
- !yaml.includes(
- `test "$(rustc --version | cut -d' ' -f2)" = ${rustToolchain}`,
- ) ||
+ !extractsPin ||
+ !assertsPin ||
+ yaml.includes(rustToolchain) ||
!yaml.includes(
"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs",
) ||
@@ -85,7 +101,7 @@ if (fs.existsSync(manifest)) {
yaml.includes("RUSTUP_TOOLCHAIN:")
) {
fail(
- "Flatpak must install the exact pinned compiler with rustup inside the sandbox and fail closed on the exact pin",
+ "Flatpak must derive the compiler pin from rust-toolchain.toml with sed, install it via rustup, and fail closed on the exact pin",
);
}
if (!yaml.includes("Unsupported FLATPAK_ARCH")) {
From 0dd30e38548948608a704b545e6c17f2d8b90e8f Mon Sep 17 00:00:00 2001
From: BurntToasters <61037367+BurntToasters@users.noreply.github.com>
Date: Thu, 5 Nov 2026 21:18:10 -0800
Subject: [PATCH 07/58] Toolchain: Derive Rust pin from rust-toolchain.toml
---
build-setup.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build-setup.md b/build-setup.md
index e09da029..dc5e5de8 100644
--- a/build-setup.md
+++ b/build-setup.md
@@ -40,7 +40,7 @@
## Rust toolchain policy
-ROSI builds with Rust `1.99.1`, pinned in `rust-toolchain.toml` and used by CI,
+ROSI builds with the Rust version pinned in `rust-toolchain.toml`, used by CI,
Flatpak, and release builds. Install that exact toolchain before building:
```sh
From 010d9faf5fd0ff1284b5a26be20f8c05c14fc690 Mon Sep 17 00:00:00 2001
From: BurntToasters <61037367+BurntToasters@users.noreply.github.com>
Date: Thu, 5 Nov 2026 22:25:34 -0800
Subject: [PATCH 08/58] Toolchain: Reject --print combined with a rustup
action.
---
scripts/cargo-safe-update.test.mjs | 30 ++++++++++++++++++++++++++++++
scripts/rust-toolchain.mjs | 3 +++
2 files changed, 33 insertions(+)
diff --git a/scripts/cargo-safe-update.test.mjs b/scripts/cargo-safe-update.test.mjs
index 4ac07335..c4abc621 100644
--- a/scripts/cargo-safe-update.test.mjs
+++ b/scripts/cargo-safe-update.test.mjs
@@ -1929,3 +1929,33 @@ test("51. npm rollback refuses to overwrite a concurrent package-lock edit", ()
rmSync(tempRoot, { recursive: true, force: true });
}
});
+
+test("rust toolchain CLI --print matches the bare pin and never combines with an action", () => {
+ const script = fileURLToPath(
+ new URL("./rust-toolchain.mjs", import.meta.url),
+ );
+ const run = (args) =>
+ spawnSync(process.execPath, [script, ...args], { encoding: "utf8" });
+ const bare = run([]);
+ assert.equal(bare.status, 0, bare.stderr);
+ assert.match(bare.stdout, /^\d+\.\d+\.\d+\n$/u);
+ const printed = run(["--print"]);
+ assert.equal(printed.status, 0, printed.stderr);
+ assert.equal(printed.stdout, bare.stdout);
+ for (const args of [
+ ["--print", "--install"],
+ ["--install", "--print"],
+ ["--print", "--target", "x86_64-pc-windows-msvc"],
+ ["--target", "x86_64-pc-windows-msvc", "--print"],
+ ]) {
+ const result = run(args);
+ const label = args.join(" ");
+ assert.notEqual(result.status, 0, `${label} must fail`);
+ assert.match(
+ result.stderr,
+ /--print cannot be combined/u,
+ `${label} must name --print`,
+ );
+ assert.equal(result.stdout, "", `${label} must not print or act`);
+ }
+});
diff --git a/scripts/rust-toolchain.mjs b/scripts/rust-toolchain.mjs
index ada807c3..13538408 100644
--- a/scripts/rust-toolchain.mjs
+++ b/scripts/rust-toolchain.mjs
@@ -148,6 +148,9 @@ export function readPinnedRustToolchain(root) {
}
function parseArguments(argv) {
+ if (argv.includes("--print") && argv.length > 1) {
+ throw new Error("--print cannot be combined with an action");
+ }
const options = { action: "print", targets: [] };
for (let index = 0; index < argv.length; index += 1) {
const argument = argv[index];
From 6f244bd71fcdbf72747ad3e84a0d437547bb7d85 Mon Sep 17 00:00:00 2001
From: BurntToasters <61037367+BurntToasters@users.noreply.github.com>
Date: Fri, 6 Nov 2026 16:24:39 -0800
Subject: [PATCH 09/58] changes
---
CHANGELOG.md | 11 +-
.../Windows/PowerShell/ModuleAnalysisCache | Bin 0 -> 10696 bytes
README.md | 8 +-
build-setup.md | 22 +-
docs/IMPLEMENTATION-5.1.md | 96 ++
docs/ROADMAP-5.1.md | 67 +-
.../Windows/PowerShell/ModuleAnalysisCache | Bin 0 -> 10696 bytes
e2e/README.md | 53 +
e2e/macos-native-packages.failure-modes.md | 36 +
e2e/rosi-51-foundation.failure-modes.md | 43 +
.../format-fixtures.cjs | 14 +
e2e/round3-renderer-repairs/preview.cjs | 8 +-
e2e/round3-renderer-repairs/renderer.cjs | 20 +-
e2e/round3-renderer-repairs/updater.cjs | 8 +-
e2e/specs/main.spec.js | 50 +-
e2e/suites.json | 784 +++++++++
e2e/v5-fixes/async-proxy/async-proxy.spec.js | 155 ++
e2e/v5-fixes/async-proxy/failure-modes.md | 76 +
e2e/v5-fixes/async-proxy/run.mjs | 141 ++
.../download-options/download-options.spec.js | 267 +++
.../download-options/failure-modes.md | 35 +
.../queue-coordinator/failure-modes.md | 125 ++
.../queue-coordinator.spec.js | 342 ++++
e2e/v5-fixes/typed-formats/failure-modes.md | 50 +
.../typed-formats/typed-formats.spec.js | 239 +++
e2e/v5-fixes/ui-polish/failure-modes.md | 96 ++
e2e/v5-fixes/ui-polish/ui-polish.spec.js | 798 +++++++++
package.json | 16 +-
scripts/benchmark-51.mjs | 807 ++++++++++
scripts/e2e-macos-native-packages.mjs | 1077 +++++++++++++
scripts/gpg-sign.js | 154 +-
scripts/test-e2e.js | 737 +++++----
scripts/verify-release-draft.js | 4 +
scripts/zip-macos.js | 391 +++--
src-tauri/Cargo.lock | 1 +
src-tauri/Cargo.toml | 1 +
src-tauri/build.rs | 2 +
src-tauri/capabilities/default.json | 1 +
src-tauri/gen/schemas/acl-manifests.json | 2 +-
src-tauri/gen/schemas/capabilities.json | 2 +-
src-tauri/gen/schemas/desktop-schema.json | 12 +
src-tauri/gen/schemas/windows-schema.json | 12 +
.../resolve_download_options.toml | 11 +
src-tauri/src/coordinator.rs | 745 +++++++++
src-tauri/src/download_options.rs | 238 +++
src-tauri/src/downloader.rs | 382 +----
src-tauri/src/ipc.rs | 101 +-
src-tauri/src/main.rs | 13 +
src-tauri/src/media_info.rs | 154 +-
src-tauri/src/network_security.rs | 994 +-----------
src-tauri/src/network_security_async.rs | 1427 +++++++++++++++++
src-tauri/src/queue.rs | 835 ++++------
src-tauri/src/types.rs | 52 +
src-tauri/src/validation.rs | 10 +-
src/commands.ts | 10 +-
src/css/02-sidebar.css | 28 +
src/css/03-main.css | 14 +
src/css/08-wizard.css | 11 +
src/engine/bind/backend-events.ts | 46 +-
src/engine/bind/settings-controls.ts | 107 +-
src/engine/bind/settings-sections.ts | 55 +-
src/engine/deno.ts | 15 +-
src/engine/formats.ts | 126 +-
src/engine/manual-download.ts | 23 -
src/engine/messages.ts | 238 +++
src/engine/overlays.ts | 6 +
src/engine/settings-store.ts | 60 +-
src/engine/settings-view.ts | 26 +-
src/engine/wizard.ts | 96 +-
src/generated/ipc-types.ts | 10 +
src/index.html | 40 +-
src/modules/activity.ts | 45 +-
src/modules/downloads.ts | 60 +-
src/modules/queue.ts | 13 +-
src/renderer-globals.d.ts | 20 +-
src/tauri-bridge.ts | 1 +
src/tests/rendererModules.test.ts | 34 +-
src/tests/rosiEngine.dom.test.ts | 26 +-
78 files changed, 10306 insertions(+), 2529 deletions(-)
create mode 100644 Microsoft/Windows/PowerShell/ModuleAnalysisCache
create mode 100644 docs/IMPLEMENTATION-5.1.md
create mode 100644 e2e/Microsoft/Windows/PowerShell/ModuleAnalysisCache
create mode 100644 e2e/macos-native-packages.failure-modes.md
create mode 100644 e2e/rosi-51-foundation.failure-modes.md
create mode 100644 e2e/round3-renderer-repairs/format-fixtures.cjs
create mode 100644 e2e/suites.json
create mode 100644 e2e/v5-fixes/async-proxy/async-proxy.spec.js
create mode 100644 e2e/v5-fixes/async-proxy/failure-modes.md
create mode 100644 e2e/v5-fixes/async-proxy/run.mjs
create mode 100644 e2e/v5-fixes/download-options/download-options.spec.js
create mode 100644 e2e/v5-fixes/download-options/failure-modes.md
create mode 100644 e2e/v5-fixes/queue-coordinator/failure-modes.md
create mode 100644 e2e/v5-fixes/queue-coordinator/queue-coordinator.spec.js
create mode 100644 e2e/v5-fixes/typed-formats/failure-modes.md
create mode 100644 e2e/v5-fixes/typed-formats/typed-formats.spec.js
create mode 100644 e2e/v5-fixes/ui-polish/failure-modes.md
create mode 100644 e2e/v5-fixes/ui-polish/ui-polish.spec.js
create mode 100644 scripts/benchmark-51.mjs
create mode 100644 scripts/e2e-macos-native-packages.mjs
create mode 100644 src-tauri/permissions/autogenerated/resolve_download_options.toml
create mode 100644 src-tauri/src/coordinator.rs
create mode 100644 src-tauri/src/download_options.rs
create mode 100644 src-tauri/src/network_security_async.rs
create mode 100644 src/engine/messages.ts
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f0ba4e6d..4269e101 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,11 +1,13 @@
# ⬇️ Downloads
-|
Windows |
macOS |
Linux |
-| :-- | :-- | :-- |
-| **EXE: [x64](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-Windows-x64.exe) / [arm64](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-Windows-arm64.exe)** | **[Universal DMG](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-MacOS-universal.dmg)** | **AppImage:** [x64](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-Linux-x64.AppImage) |
-| | **[Universal ZIP](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-MacOS-universal.zip)** | **Flatpak:** [x64](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-Linux-x64.flatpak) |
+|
Windows |
macOS |
Linux |
+| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------- |
+| **EXE: [x64](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-Windows-x64.exe) / [arm64](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-Windows-arm64.exe)** | **DMG: [arm64](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-MacOS-arm64.dmg) / [x64](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-MacOS-x64.dmg) / [universal](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-MacOS-universal.dmg)** | **AppImage:** [x64](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-Linux-x64.AppImage) |
+| | **ZIP: [arm64](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-MacOS-arm64.zip) / [x64](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-MacOS-x64.zip) / [universal](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-MacOS-universal.zip)** | **Flatpak:** [x64](https://github.com/BurntToasters/ROSI/releases/download/v5.1.0-beta.1/ROSI-Linux-x64.flatpak) |
> macOS downloads require macOS 15 or later.
+> Native arm64 builds run on Apple silicon; native x64 builds run on Intel and
+> under Rosetta on Apple silicon. Universal builds run on both architectures.
> [!IMPORTANT]
> The `.sig` files in this repo are NOT normal GPG signatures. They are for Tauri V2's updater to verify the integrity of updates before downloading and installing.
@@ -23,6 +25,7 @@ ROSI! A cross platform yt-dlp GUI built on Tauri V2!
- **Updater:** Architecture verification ensures downloaded macOS updates match the host machine before installation.
- **Updater:** Rosetta-translated processes on Apple Silicon automatically request the native arm64 target to migrate away from emulation.
- **Packaging:** Per-architecture updater archives are verified for codesigning and notarization stapling prior to packaging.
+- **Packaging:** Native arm64 and x64 DMG/ZIP downloads are available alongside the universal macOS packages.
## Changes in `v5.0.2:`
diff --git a/Microsoft/Windows/PowerShell/ModuleAnalysisCache b/Microsoft/Windows/PowerShell/ModuleAnalysisCache
new file mode 100644
index 0000000000000000000000000000000000000000..6481bfe428e4f994f58a700fc7d81f9af1dc19fd
GIT binary patch
literal 10696
zcmeI2NpB=c6~{fSJuqy;zDa|`1*Edt-NS_g!Yf;3n?or>`I)Kk&}z<
znhPAba0DR`XHI+xZX7vsLyX{n#1|NZgaq&RA|o@Z>>jD5k+^iXQYuHhc=4A1TOu;Y
z(dcmdKJURPs#
zZOUk7vg~YRrwudx&?8fyZLHsy{~ODr>qRx)_`0zDv^*zynpbt4Wdq0I12Xm@dD47t
zUub`yr|$PBF`L%j^>
z-4ssOW!v;LpA{Oh?4Y%Snf6nG3cW26_sCqNRc*?_I65+gt%BA%pK
zTC2Jt9(s+1er@d!Fa7QVufB8dMt(j6*hgtn+RC2S>k9j0yQtQOHa|}w_@za3YziH*x?
zWXt-noSG63eM+9!%|a&xp2ADHd{l-dQpQ&Ikt*p!tmPs_OQ
zbgPJmFRc7d-MB8aqWbp!a_-th2N=$TYZRR!U
zEZ7;4nUBcxrnU3^n!jF@XY)F~G~#aK6?Nz?ML2Vnnrpv>@;fqlJXcBBb!anNj??7Q
znd3_`q*R+pV)A-3sne^tPHirxgZYQ$Ii8uh?(~J_^}|fqu)^k$g7=YaDswtBCKC*roTvL7#7&;e+~zRfvsJC0;1AWy3%{9N$BXJPKep-t*emh2$xLmw;^eX^LiRej
zlP7kX<`)Qrx`A%+CA?I|z4T(1$s-woaloSETTNZt{JI-m(Oa?tw9)
zIxg#`7?UVl|9(}51N8Jz=^?lbbTm
zBq`S7KNSSZM`b(_%8|WN2!Bn6)X|&MsY(`S2dStR3i_|#zx$7$eCwTiL!o_!L^hT*
zZpyQV>#s_xa(`%*rWz3F+oqE0I?-D88Tp$uP3qq+(<`%Io4Kzh6yn|VrWODIv9K
z$^HDwUQz>-ONQ{=e(o}Nlt^Y_5I=bW5>ynQ8`&)=z?uZkMckb@nX!Z%A(^Miv_9j9
zEpu*58e0oJivpzAVf{UAI@BALFXX`
zaYidJVh*K|GHM2*9cMVw!vZ9;fPcUG^&kKIH)-vDF2A1vBr7FM`@Z!CwX)(2EjN{y7L==;n1jHVSqrCP*uBr_@6c~K$F*1)Um7)v${
zck@aG0-%A$Q93tdY=mRmcX^5_*8mY+Q_>
zrBeaPWE-g|Rc{tKF)bSv7OjMx#GZxddPPR_ULj{_jT;=7abCsR#du;gI1bzZjEA;Z
zbZ86wa+juoVbN3%Wdb!^w}u
zmW=lyDAXQA5TD2ieiZ;7MS#nL5hhrxmBnKgw4cVrde7DwM`Z}Lg#(?U^N}-ci&gFO
zIx#VQ7{Z9NYC4G78>@vN&@5NKO_sw(-H}&}p=7M%!9$@AB8bf-$N1pD?5AZa*8r>B
zE61H0C8wG9$_>J^nae#wkNXa8y|F;}NoDSGftNA#FZxw3i~B^gn%UI8voxD}{ji@)
zcSk1Sd^bsRZ|rd+mm(ntPLqy!)ptIQ0~k_?+o*N^j7%ae-*6U75NGT`-gr$)L}ysI
zxGL3UUa*PKOMqqJh^+6mz@6PdXcD&Z@ZdMDa~g!M!w7(7RVz|auP^I)JSD%$D?|ZD
zu2nZ7`nH)g7a{)XKECs_k#-+%vG{%JK2B=A!nnKjXeYJrn9HU?e)hd&XPmYWM0F|0
z3`S8yia?@eZZ0=m4B{!y`-47~!07a#h?I>!WV+qo$aV;n_N{G_jB9O2sdEK93A7>38TT;B29!|G&z*kqhU7z}dL
zINB;r>>3!Re61Nrw9ir*lS|L0l|Zu6&0JxvQR}V=j~9iJEo0B3O_1R*L3=*CAt@o$
z{#^CxxuFb_2XZphTJBUj3z!oTUAkic=rYjz2ky=)r*SDas-1J)pqynUw(6LXUpBKe
z)`kLCo#c~DP7iW&bFR|F;lQ$6+WFwM${F9gI@FP|!=@fQD%0r`xqm@G%_YJ59&qj&
zMf(xu98ITUao|XU@7sfsnNJ)(P%M&5k0eARzQk+_!Kj(Iv#DYM|Fr#%@*h@L2t;ad
z;p%}F8n&|qX!PBJnH-t78fp6c`j+jn9qiQ(3<0?SrR+gU&G$9JZ`dIlcOreaE7oqI
zu>^Ij;Q{E>VC2}C!0{ft8pM&_HzO}*Yf&_8q;J*J1m|GCPj_(-f^j?MC(7Hd_mPP&CC
z-8-rEJY=mU_RI}hA`j6MW=F=_QFCZ$BwKJ|9Ea#=s98@cK#@?uEb+N4rs+W+Opke4%WW+C`&)*T*s&Qjdvc
ze)Av>H%$EY+Tid#xn=h8>0IflaAb=qnu$yAWy6;xde1MzQ*`8ps#Cgz0!7U;C2E%Lh1cW1lkF`N+i6&XZUR6^;${CoUI0
z-dWqq9YhP_97!wSk_IJgxEoQzASVU%&O~~L2kFZ$NPw6OO!(}#3VLK|HCR@e3CD`l
zFP%eM@Ry^y4FD`oG6><1aS(4T)ug=zp&|SJpT4K>F@Gr2&v4l_mM%czr@z?g-({}O
zXzPWT=zvu1+CCj~`U(7bYo3Le{ni8-!N2irCw*+{>%?FT^#dNBOkafsWE@{sIEwGO
zOAP9>uMtkqaMl;zmR~r+<=sRr?~8VA<6aLFx&+(my({==TZ{ho
zmOe>p2nSG3Q*Lj)YDOHObeA|XwYK)3SAO&VePKD>K#T|Sxb!E%BC0%pVJQZA{=)M4
z3rh+nnP&6(3(LBa2IXllEd6IjuZyjor98`*Eb)}rpJxyF#^{WXM%;jwW8Mh@LOIjh
zToSCIVf7ULtfS?!Tj$=9Q8y{qTF1LN$?$v95@qgC>Mt|a}+tGe{
zc{z3O7Z2-qe=6^B9}D@jn58?{iEe$z61kVGVww5Iw}m6X^i6=PFqni6V&x+x2ycHu
z1)&yg$CkB}y={A)XI2`|w!Sk?*=zf~o|uB6>)S&Pg!Cn0izKEGzf|&_M=N#s*%L(+
zPquGTovF2m(sj@qFSR3V1~U3)Wo0W=QR!B`;REVM#bh8xc|nA-~RKr&g{#(@8=R*dh+5fQaiajHt|!B<-Ir4$gMZHju}S+|JmFv
zTlb#Ba7$mwh3k9^)%hsEfwQ>3YS-4f-GD~Rj@
Ov)7^vp}@wndhLG*;s=5N
literal 0
HcmV?d00001
diff --git a/README.md b/README.md
index eccd4186..a8263cb5 100644
--- a/README.md
+++ b/README.md
@@ -40,8 +40,9 @@ webview, so installers and memory use are much smaller.
## System requirements
-- macOS 15 or later (universal build for Intel and Apple silicon). The bundled
- FFmpeg is built for macOS 15.
+- macOS 15 or later. Choose the arm64 package for Apple silicon, the x64
+ package for Intel or Rosetta, or the universal package for either processor.
+ The bundled FFmpeg is built for macOS 15.
- Windows 10 version 2004 (build 19041) or later, on x64 or ARM64, with the
Microsoft Edge WebView2 runtime (installed automatically when missing).
- Linux x64 with WebKitGTK 4.1 (Ubuntu 24.04+, Debian 13+, Fedora 43+, or a
@@ -83,7 +84,8 @@ See the Microsoft Store section of [build-setup.md](build-setup.md).
convert).
5. Packaged builds:
- Windows: `npm run build:win`
- - macOS: `npm run build:mac:universal`, then `npm run build:mac:zip`
+ - macOS: `npm run build:mac:universal`, then `npm run build:mac:zip` for
+ universal packages; `npm run build:mac:native` for arm64 and x64 packages
- Linux x64: `npm run build:linux` (or `npm run build:linux:x64`)
- Linux ARM64 (native ARM64 hardware only): `npm run build:linux:arm64`
- Flatpak: `npm run flatpak:bundle`
diff --git a/build-setup.md b/build-setup.md
index dc5e5de8..a4f2c3ed 100644
--- a/build-setup.md
+++ b/build-setup.md
@@ -19,13 +19,25 @@
## macOS
- macOS 15 or later. `minimumSystemVersion` in `tauri.conf.json` is
- 15.0 because the bundled FFmpeg is built for macOS 15; `build:mac:zip` rejects
- any bundled Mach-O whose minimum OS is above that floor.
+ 15.0 because the bundled FFmpeg is built for macOS 15; `build:mac:zip` checks
+ the minimum OS of each required architecture slice against that floor.
- Xcode Command Line Tools (`lipo`, `codesign`, `notarytool`)
- zstd CLI (`brew install zstd`) for the updater archives; checked by `npm run prerelease:prepare`
- Node.js `^24.22.1 || >=26.13.0`
- Rust (rustup)
+macOS builds can produce the universal package or native arm64 and x64
+packages. `npm run build:mac:universal` builds the universal DMG/app, then
+`npm run build:mac:zip` verifies the signed app and creates its ZIP.
+`npm run build:mac:native` builds each native app once with its DMG and
+updater archive, then creates architecture-matched ZIPs. Individual prepared
+targets are `build:mac:arm64:prepared` and `build:mac:x64:prepared`; run the
+matching `build:mac:zip:arm64` or `build:mac:zip:x64` after those builds.
+Native app and FFmpeg/ffprobe binaries must be thin for their target. The
+upstream universal2 yt-dlp binary may remain universal when it contains the
+requested slice. Every public installer is named
+`ROSI-MacOS-{arm64,x64,universal}.{dmg,zip}`.
+
## Linux
- Build the public AppImage on Ubuntu 24.04, the oldest supported glibc
@@ -222,9 +234,9 @@ The `b`, `r`, and `release:*` scripts intentionally reset and clean their Git
worktrees. Run them only on disposable, isolated build VMs. `b` and `r` run
directly without confirmation. `release:finalize` also runs without a guard, so
run it only from a checkout with nothing uncommitted. Before publishing,
-verify that the draft contains the Windows x64/ARM64 NSIS installers, the
-universal macOS DMG/ZIP, Linux x64 AppImage/Flatpak, updater
-manifests/signatures, SHA-256 lists, and GPG detached signatures
+verify that the draft contains the Windows x64/ARM64 NSIS installers, native
+arm64/x64 and universal macOS DMG/ZIP packages, Linux x64 AppImage/Flatpak,
+updater manifests/signatures, SHA-256 lists, and GPG detached signatures
(`npm run release:verify:draft`).
## Microsoft Store
diff --git a/docs/IMPLEMENTATION-5.1.md b/docs/IMPLEMENTATION-5.1.md
new file mode 100644
index 00000000..51486dd3
--- /dev/null
+++ b/docs/IMPLEMENTATION-5.1.md
@@ -0,0 +1,96 @@
+# ROSI 5.1 implementation and evidence ledger
+
+## Accepted delivery
+
+The following six milestones are accepted for ROSI 5.1. Acceptance is scope,
+not a completion claim. This ledger records evidence produced by the verification
+foundation at the current worktree snapshot; other workstreams must update their
+own status when they produce implementation and platform evidence.
+
+| # | Milestone | Evidence status |
+| --- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| 1 | Baseline evidence and E2E organization | The E2E manifest and feature-group selector are implemented. A current inventory capture is retained on Windows x64. It records discovered scenarios separately from execution. The initial full baseline report was overwritten while the shared artifact tree was changing; that report is unavailable and has not been reconstructed. Runtime measurements remain missing. |
+| 2 | Native macOS distribution and artifact verification | The native macOS artifact verifier is in progress in a separate workstream. No native macOS package build or size comparison is recorded here. |
+| 3 | Typed formats, shared option resolution, structured lifecycle consumption | Structured format data and renderer consumption have changes in the current worktree. Shared option resolution, lifecycle acceptance, integration, and cross-platform proof remain outstanding. |
+| 4 | Queue/session coordinator migration | Accepted; no coordinator migration or platform proof is claimed by this foundation. |
+| 5 | Async proxy migration | Accepted; no async relay migration or runtime proof is claimed by this foundation. |
+| 6 | Full-app polish and integrated release candidate | Accepted; the integrated candidate and full required-platform E2E proof remain outstanding. |
+
+Worker choice recorded for the accepted plan: **GPT-6 Luna max**.
+
+Milestone 6 keeps ROSI's visual identity and layout while improving downloads,
+queue management, settings, onboarding, and accessibility. It does not add the
+major features listed as deferred below.
+
+## Required support and proof matrix
+
+ROSI 5.1 must retain the current supported platforms: macOS 15 and newer, Linux
+x64, and Windows x64 and arm64. A Windows x64 inventory capture does not prove
+the app or release artifacts on any platform.
+
+| Platform | Evidence from this foundation |
+| ------------- | --------------------------------------------------------------------------------------------------------------------------------- |
+| macOS 15+ | Verifier changes are in progress; no build, app E2E, signing, notarization, or package comparison was performed for this capture. |
+| Linux x64 | No build or app E2E performed. |
+| Windows x64 | Benchmark inventory captured on this host; no app E2E or release artifact verification performed. |
+| Windows arm64 | No build or app E2E performed. |
+
+Existing archived reports are recorded as references only. This work does not
+claim that historical baseline runs passed or that their results correspond to
+the saved clean snapshot.
+
+## Baseline artifact
+
+The retained current-only inventory is
+`e2e/artifacts/benchmark-51-current-final-win32-x64.json`, with its adjacent
+`.sha256` file. It records the source revision and dirty-file hashes, the saved
+clean-snapshot identity, host and tool versions, evidence artifact and sidecar
+sizes, the static and dynamic suite inventory, and references to existing
+reports. Native release packages are `not-measured` when no packages are
+present; frontend `dist/` is recorded separately. The benchmark records that no
+scenarios were executed by that command.
+
+The older schema 1 file named `benchmark-51-baseline-win32-x64.json` is a
+current-only capture made after the initial report was overwritten. It is not
+the retained baseline and is not a valid comparison input for the current
+schema.
+
+The current inventory has 103 static scenarios and 8 dynamic `v5-fixes` areas.
+These are discovered counts, not passed scenario counts. The first full
+baseline report produced during this work was overwritten while the shared
+E2E artifact tree was changing. It is unavailable as a verifiable report; no
+historical count or report content is reconstructed. The saved clean snapshot
+still identifies `010d9faf5fd0ff1284b5a26be20f8c05c14fc690` and contains 522
+tracked-file hashes with empty staged and unstaged patches. It does not contain
+runtime observations.
+
+Runtime data for startup, idle CPU, peak memory, queue latency, and proxy
+throughput is **missing, not measured**. The initial runtime baseline cannot be
+reconstructed from the saved source snapshot.
+
+To provide real measurements later, pass a versioned runtime metrics JSON file
+to `scripts/benchmark-51.mjs --runtime-metrics `. The tool records the
+input hash, method, host, units, and sample counts, and compares a metric only
+when both reports contain compatible measured values. Missing inputs remain
+explicit; the tool does not derive runtime values from artifact sizes or old
+report references.
+
+## Performance and artifact acceptance
+
+There is no numeric performance target. Before and after evidence must show
+smaller native macOS package artifacts. Startup, CPU and memory use, queue
+latency, proxy throughput, and other agreed runtime measures must show no
+regression. The retained current capture has no runtime values and no native
+package measurements, so this acceptance is still open. An absent package
+inventory is not a zero-byte package or evidence of a saving.
+
+Each comparison must identify its source revision, platform, architecture, tool
+versions, measurement method, and report hash. Do not compare measurements from
+different hosts as if they were like-for-like.
+
+## Deferred beyond 5.1
+
+These items remain outside the accepted delivery: an independent yt-dlp update
+channel, updater key rotation, macOS entitlement redesign, new Flatpak hosting,
+Linux arm64 support, and major product features. Existing Flatpak packaging and
+current supported platforms remain in the required release-verification scope.
diff --git a/docs/ROADMAP-5.1.md b/docs/ROADMAP-5.1.md
index 76dc1843..b319f2cb 100644
--- a/docs/ROADMAP-5.1.md
+++ b/docs/ROADMAP-5.1.md
@@ -1,20 +1,26 @@
# ROSI 5.1 roadmap
-These are deferred, long-term items. None of them blocks 5.0.0 stable. Each
-entry gives the problem with file and line evidence, a concrete plan, and
+This status ledger separates work already present in the repository, scope
+accepted for ROSI 5.1, and work deferred beyond 5.1. “Accepted” is a planning
+status, not evidence that implementation or platform verification is complete.
+The accepted delivery plan and proof gaps are in
+[IMPLEMENTATION-5.1.md](IMPLEMENTATION-5.1.md). The required stable matrix is
+macOS 15 and newer, Linux x64, and Windows x64 and arm64. Linux arm64 remains
+deferred. Each entry gives the problem with file evidence, a concrete plan, and
acceptance criteria. Line numbers were read on 2026-10-19 and will drift; search
for the named symbol when they do.
-Items already covered by the current stable-readiness fixes are not listed
-here. Keep each item's acceptance criteria as the definition of done, and check
-them against the E2E evidence the change produces. Where a plan adds a
-dependency, the change must be approved on its own; this roadmap does not add
-one.
+Check acceptance criteria against evidence from the change that produces it.
+Where a plan adds a dependency, the change must be approved on its own; this
+roadmap does not add one.
## 1. Split the renderer engine into feature modules
-**Status (2026-10-20): done in 5.0.0-beta.4.** Feature logic lives in `src/engine/`, and per-feature event binding in `src/engine/bind/`. `src/rosiEngine.ts` (about 570 lines) loads settings, looks up the DOM, and calls the bind functions in their original order.
-
+**Status (2026-11-06): partial implementation present.** Feature logic lives in
+`src/engine/`, and per-feature event binding in `src/engine/bind/`.
+`src/rosiEngine.ts` is about 440 lines and still defines `initializeRenderer`;
+`window.rosiModules` remains in use. The extraction is useful existing work, but
+the acceptance criteria below are not all met. No completion is claimed here.
**Problem.** `src/rosiEngine.ts` is 5,943 lines. `initializeRenderer` starts at
`src/rosiEngine.ts:2370` and runs to about line 5927. It holds 66 nested
@@ -47,8 +53,12 @@ taking explicit inputs.
## 2. Typed command layer and generated IPC types
-**Status (2026-10-20): done in 5.0.0-beta.4.** `src/generated/ipc-types.ts` is generated from the Rust types (test-only `ts-rs`), `src/commands.ts` types every command call, and a contract test checks the command names against `build.rs` and the capability. `window.api` stays as the seam for vitest and E2E; removing it would mean rewriting those harnesses, which is not planned.
-
+**Status (2026-11-06): partial implementation present.**
+`src/generated/ipc-types.ts`, `src/commands.ts`, and the command contract check
+exist. Runtime callers still use `window.api`, and the ambient renderer globals
+remain. The former acceptance criterion that `window.api` disappear is not
+met; removing the compatibility seam is deferred until its callers and harness
+are migrated together.
**Problem.** `src/tauri-bridge.ts:132` assigns `window.api`, a shim that copies
the v4 Electron contract onto Tauri. The renderer also depends on IIFE modules
@@ -81,6 +91,10 @@ can drift without a compile error. Neither `tauri-specta` nor `ts-rs` is in
**Status (2026-10-20): settings enums done in 5.0.0-beta.4** (`Theme`, `DockTab`, `DownloadProfile`, `GpuType`, `UpdateChannel`). Remaining: typed IPC structs in place of `serde_json::Value` plus hand validation.
+**Status (2026-11-06): partially implemented; typed IPC structs remain open.**
+The settings enums are present in `src-tauri/src/types.rs`. `serde_json::Value`
+still appears in backend helpers and command/probe code; no claim is made that
+the old acceptance criteria are complete.
**Problem.** Several settings are free-form strings: `theme`
(`src-tauri/src/types.rs:61`), `dock_tab` (`:63`), `download_mode` (`:65`),
@@ -117,6 +131,10 @@ back to defaults rather than failing the import.
## 4. Replace the downloader and queue locks with a state thread
+**Status (2026-11-06): accepted for ROSI 5.1; implementation not started in
+this workstream.** The existing global mutex and condition-variable design
+remains in `downloader.rs` and `queue.rs`.
+
**Problem.** The download and queue state uses global locks and condition
variables. `src-tauri/src/downloader.rs:78` holds `ACTIVE: Mutex