Status: Implementation IMPLEMENTED × Exposure PUBLIC (macOS builds). Windows and Linux targets exist in the electron-builder config but macOS is the shipped target. For Linux (.deb) install, pairing and troubleshooting, see the Desktop on Linux guide.

Overview

allternit-desktop (@allternit/desktop, in surfaces/allternit-desktop) is the Electron shell that bundles the whole stack so it runs locally out of the box: the workspace web UI, the Rust allternit-api server, gizzi-code, and supporting services (mux, voice, connector sidecar, office engine, computer-use driver). You can also point it at your own Allternit instance. See BYOC overview. The workspace UI is a Vite + React app built from the separate allternit-ai repository. scripts/prepare-platform-static.cjs packages its static export into the app; set ALLTERNIT_AI_PATH to build against a specific checkout.

Local ports

Defaults from src/main/config.ts:

Global hotkeys

The Quick Chat window loads the workspace UI with /?mini=1. If another app already owns one of these chords, Allternit can’t register it and the shortcut does nothing. The tray menu then lists the chord as “in use by another app”, and the HUD shows a notice naming the chord that failed, so you can free it in the other app or use the fallback. Developers: shell.hud.getPrefs() returns hotkeys: [{ accelerator, registered }] for the HUD and Quick Chat chords. The A mark (the A from the app icon, drawn as square blocks on whole pixels in a 19 pt square) sits in the macOS menu bar, beside the other status icons. Click it to open the HUD, the same as Cmd/Ctrl+Shift+H. Right-click or Control-click it for the status menu: backend status and mode, Connection Settings (opens Settings › Computers in the app; see Pairing this computer), permissions, Show Window, the desktop pet, Allternit Office, Quick Chat, Toggle HUD and Quit. With menu bar mode on, a click shows or hides the main window instead. On Windows and Linux the tray shows the colour app icon instead, since a black mark would vanish on a dark taskbar. A click opens the HUD and right-click opens the same menu. The icon is a template image (surfaces/allternit-desktop/build/trayTemplate.png and @2x), so macOS draws it white on a dark menu bar. Code: createTray in src/main/unified-main.ts.

Messages on your Mac

A bot can read your recent iMessage and SMS chats on this Mac and ask to send a message for you. It is off by default. Turn it on in Settings → Notifications → Messages (Mac). The setting shows only when the active computer is a Mac.
  • Two macOS permissions. Reading needs Full Disk Access for Allternit (System Settings → Privacy & Security → Full Disk Access). Sending needs Automation permission for Messages, which macOS asks for the first time. The setting shows whether each one is granted.
  • Every send waits for you. A bot never sends on its own. Each message it wants to send appears in Needs you and on your phone with the full recipient and text. It sends only after you approve, and only once.
  • One person at a time. Search and send cover 1:1 chats only. Group chats are not read and cannot be messaged.
  • Search is limited. Up to the last 30 days and 50 messages per search. The bot treats message text as outside content and does not follow instructions in it.
  • Drafts on any computer. Without this setting, a bot can still write a draft you send yourself from your phone.
Allternit opens the Messages database read-only and never changes it. The database layout and the AppleScript send are not official Apple interfaces and can break after a macOS update. Routes and tools: Messages on the Mac.

HUD

The HUD is a chat that floats over other apps. It is one card on the desktop, with no frosted window around it. The message box sits at the top and the Agent mode, Plugins and Artifacts row sits at the bottom, on the same surface with no line between them. Replies appear in a second card below it. The row above the card has three buttons:
  • Sun or moon: switches the HUD between light and dark. The HUD keeps its own setting, apart from the main window.
  • Pen: opens a drawing layer over the whole screen. Pick a color and a line width, draw, then press Save to keep a PNG, Clear to start again, or Done or Escape to close the layer. The HUD stays open.
  • X: closes the HUD. Escape in the HUD also closes it. When a menu is open, Escape closes only the menu. Cmd+W (and Alt+F4 on Windows) hides the HUD the same way, so your draft is still there next time.
Open in app (the button in the HUD, or Cmd/Ctrl+O while the HUD is focused) hides the HUD and opens the same chat in the main window. Closing the HUD any other way also hands its chat to the main window.

Opening and focus

The HUD opens on the display under your pointer. The first time on a display it is 620 × 220, centred, 72 px above the bottom of the usable screen (above the Dock or taskbar). Move or resize it and it reopens there on that display, even after a restart; each display keeps its own spot. If a display is unplugged or changes resolution, the HUD moves back fully onto a screen. It can’t be dragged or resized off the screen. Every time the HUD opens, the cursor is in the message box, ready to type. The HUD window is created in the background shortly after the app starts, so the first open is as fast as later ones. By default the HUD stays up when you click another app (pinned). Turn on Hide when I click away in the HUD’s settings to have it hide when you click away. It stays up while one of its own menus, pickers or dialogs is open.

Replies, keyboard and accessibility

When a reply arrives, the window grows upward so the reply has room, with a minimum height for the reply area, up to 520 px tall. Past that the replies scroll inside the HUD. The window shrinks back when the chat is cleared, and each time the HUD starts it opens at its normal 220 px height. You can still drag it taller by hand. A long draft scrolls inside the message box instead of pushing the reply out of view.
  • Move with the keyboard: Alt+arrow keys (⌥+arrow keys on a Mac) move the HUD by 20 px.
  • Resize with the keyboard: Alt+Shift+arrow keys (⌥⇧+arrow keys) resize it.
  • Screen readers: the HUD is a named dialog, and new replies are announced as they arrive.
  • Reduce transparency: with the system’s reduce-transparency setting on, the HUD uses solid surfaces.
  • Signed out: when you are signed out, the HUD says so and offers Sign in instead of an error about the AI provider.
Menus open in full. When you open the model picker, the context meter or a menu in the Agent mode, Plugins and Artifacts row, the HUD window grows on the side with screen space (above the card first) and the card stays where it is. The added space is transparent and clicks go through it. When the menu closes, the window goes back to its size. Long drafts show in full. When a draft makes the message box taller than the HUD, the window grows upward with its bottom edge fixed, up to the 520 px limit; the message box takes at most 40% of that, and a longer draft scrolls inside it. As the draft gets shorter it shrinks back, never below the size it had before. If you resize the HUD by hand, that size becomes the new base. For developers: useHudComposerFit (src/shell/hud/composer-fit.ts) watches the composer ([data-hud-composer] on ChatBottomBar) and sets the window with shell.hud.setBounds. It pauses while a menu has grown the window or a resize handle is dragged. Drag the dotted handle to move the HUD, or drag its edges to resize it. On Linux with native Wayland the compositor places windows, so the HUD opens where the compositor puts it and you move it by dragging its top strip (the compositor does the move). Launch with --ozone-platform=x11 to get app-placed positions back. More Linux help is in the Desktop on Linux guide. The HUD floats above other windows on every desktop and over full-screen apps. On Windows and Linux it sits below system menus and notifications. Developer notes (main process, surfaces/allternit-desktop): all size and clamping math is in src/main/hud-geometry.ts. Positions are saved per display id in the electron-store key hudBounds, and the hide-on-blur choice in hudHideOnBlur. IPC: shell:open-hud takes { sessionId? } and sends shell:hud:goto to the HUD; shell:hud:handoff hides the HUD and focuses the main window; every show sends shell:hud:shown; shell:hud:suppress-blur (true/false) counts open menus; shell:hud:get-prefs and shell:hud:set-prefs read and write { hideOnBlur, hotkeys }. On Linux, main sends the pointer position on shell:hud:cursor while the HUD is open, because click-through can’t forward mouse moves there. shell.hud.windowing.nativeDrag is true on Wayland. The screenshot button’s screen capture is answered by setDisplayMediaRequestHandler (the HUD’s own display); if it fails the button shows the error. Hotkey→shown timing is logged at debug level as [HUD] hotkey→shown. Code: the HUD is src/shell/hud/HudShell.tsx and hud-shell.css in allternit-ai. The drawing layer is a separate full-screen window (createAnnotationWindow in src/main/unified-main.ts) that loads /hud/annotate. ShellApp renders only AnnotationView at that path. The window growth for open menus is useHudOverlayRoom in src/shell/hud/overlay-room.ts, which calls shell.hud.setBounds.

Idle and hidden windows

Desktop keeps working while you are not looking at it, but it does not keep drawing. The main window keeps backgroundThrottling off on purpose, so agents and timers in a hidden window run at full speed. That setting also keeps the page’s document.visibilityState at visible, so the UI cannot rely on it.
  • Hidden signal. The main window sends window:event:minimize, restore, hide and show to its page. The UI’s src/lib/app-visibility.ts (allternit-ai) combines them with document.visibilityState and sets html[data-app-hidden] while the app is hidden.
  • Paused while hidden: every CSS animation (one rule on html[data-app-hidden]), the stage and ASCII backdrops, the block pulse, the group ring, avatar frame and blink clocks, and bot status polling. Every bot refreshes once when the window comes back.
  • Slowed while hidden: the approval poll runs every 30 s instead of 5 s, so an agent that waits on an approval is still noticed.
  • Paused while off screen (window visible): avatar breathing, the pet portrait and the Gizzi mascot, through an IntersectionObserver.
  • Bot status. One shared poller per window. A bot that is working, waiting for input or waiting for approval refreshes every 5 s. Other bots refresh every 20 s, and a failed request doubles that bot’s wait up to 60 s.
  • HUD and companion windows use Electron’s default throttling while hidden. The HUD is created hidden 1.5 s after the main window loads, so the hotkey opens it at once. It mounts a small root (src/shell/hud/HudApp.tsx), not the whole shell.
  • Voice list. The UI reads the bundled voice service’s GET /v1/voices and GET /v1/stt/models once each time the service becomes available, and backs off (30 s, doubling to 5 min) when a request fails. Until 2026-11 it called /v1/voice/voices, got 404, and asked again about every millisecond.
Measure idle cost. Start Desktop with --remote-debugging-port=9333, leave it idle, then run node scripts/cdp-idle.mjs in surfaces/allternit-desktop. It prints, per window, main-thread busy %, layouts, running animations and requests per 10 s, and never clicks or focuses a window. --profile /hud lists the busiest functions. On build b8242 (2026-11-17) it measured the HUD at 95% busy and the main window at 55%, with about 1,000 voice requests a second.

App menu

The top-left menu bar has the usual Mac menus: New Session does what the sidebar’s New does in the current mode. Find, Bot Activity, Quick Chat and Toggle HUD show their shortcuts, but the key presses stay with the workspace, so a shortcut you changed in Settings keeps working. Developer notes: the menu is built in src/main/app-menu.ts. Workspace commands go to the main window as the window:event:menu-command event with { command }. The renderer handles them in allternit-ai/src/shell/desktop-menu.ts, ShellApp.tsx (Settings, modes, sidebar, Find, Bot Activity) and ShellRail.tsx (New Session). The web and the PWA have no app menu.

New Window

File › New Window (Cmd/Ctrl+Shift+N) opens another workspace window. It uses the same account, the same sessions and the same local servers as the first one, so a bot reply or a status change shows in every window. Use one window per task: a Code session in one, Bots in another. The Window menu lists every open window with a colour dot and its page title (for example “Window 2 · Code”). Click a name to bring that window forward. The window you last used is the one menu commands act on (New Session, the modes, Find, the title-bar buttons). Only the first window’s size is remembered for the next launch, and a new window opens a little down and to the right of the others. Closing one window leaves the rest open; Show Window from the Dock or the tray opens one again when none are left. Developers: the windows are tracked in src/main/main-windows.ts. getFocusedMainWindow() is the window to act on; broadcastToMainWindows() sends status that every window shows (engine status, tunnel, permissions, connection, extension and menu bar mode). The single-instance lock is unchanged: launching the app a second time focuses the existing app instead of starting another process.

Workspace shortcuts

These shortcuts work inside the workspace window. You can change them in Settings → About → Keyboard shortcuts. To change a shortcut, click it, then press the new keys. Shortcuts need a modifier key such as Cmd, Ctrl or Alt. If the keys already belong to another action, that action loses them. The clear button turns a shortcut off, and the reset button puts the default back. Your changes are saved on this device only. On Desktop, Cmd/Ctrl+Shift+A is the global Quick Chat hotkey, which takes the keys before the workspace sees them, so the Agent Runner default never fires there. To use Agent Runner from the keyboard on Desktop, give it another shortcut here. Code: allternit-ai/src/lib/shortcuts/shell-shortcuts.ts.

Local development

Build and package

build:electron runs prepare:* steps first (platform static, computer-use driver, ACU gateway, Lima, Lume, mux, mesh node, office engine, API binary, connector catalog and sidecar, and on macOS the Files File Provider) and verify:packaged-resources.

Linux .deb install

apt install ./Allternit-Desktop-<version>-amd64.deb installs the app in /opt/Allternit Desktop and links /usr/bin/allternit. The package depends on bubblewrap and lsof (the app uses both), on libgbm1 and libasound2 (Electron’s graphics buffer and audio libraries), and on python3 (the phone remote’s input helper; it also uses xdotool when present), so apt installs them with it. Without python3 the phone remote still shows the screen but takes no input, and logs [input] helper could not start once in phone-remote.log; it no longer crashes and restarts in a loop. Without libgbm1 the app does not start (libgbm.so.1: cannot open shared object file); minimal installs and containers often lack it.

Linux .rpm and AppImage

sudo dnf install ./Allternit-Desktop-<version>-x86_64.rpm (Fedora, RHEL/Alma/Rocky; sudo zypper install on openSUSE) installs the same app in the same place with the same post-install script: build/linux/after-install.sh serves as both the deb postinst and the rpm %post (it tells them apart by its first argument), so the chrome-sandbox test, the /usr/bin/allternit link (through alternatives/update-alternatives, else ln -sf) and the desktop database update are the same. The AppArmor block is skipped where AppArmor is off (Fedora uses SELinux). The rpm uses rich dependencies so one package fits Fedora and openSUSE names, for example (mesa-libgbm or libgbm1), (nss or mozilla-nss) and (alsa-lib or libasound2), plus python3 like the .deb (needs rpm 4.13+: Fedora, RHEL 8+, openSUSE Leap 15+). build/linux/after-remove.sh does nothing during an upgrade, because rpm runs the old package’s %postun after the new %post. The AppImage (Allternit-Desktop-<version>-x86_64.AppImage) is for every other distro: chmod +x it and run it. It needs FUSE 2 to mount itself (libfuse2, fuse2 or fuse-libs); without it, run it with --appimage-extract-and-run. An AppImage cannot carry a setuid chrome-sandbox, so where normal users cannot create user namespaces, its launcher starts the app with --no-sandbox instead of crashing. Desktop then checks why before it opens a window (src/main/appimage-sandbox.ts, decisions in appimage-sandbox-logic.ts):
  • AppArmor is the cause (Ubuntu 23.10 and later) and pkexec exists: one dialog offers to add an AppArmor rule for this AppImage (/etc/apparmor.d/allternit-appimage, the same userns, profile the .deb installs, attached to the AppImage’s path). It asks for your password, then restarts Desktop with the sandbox on. Move the AppImage and it asks again.
  • You decline, or the cause is something else (Debian or a hardened kernel with unprivileged_userns_clone=0, max_user_namespaces=0, no unshare): Desktop runs without the sandbox, logs it as [appimageSandbox] in main.log, and shows one notification recommending the .deb or .rpm.
ALLTERNIT_APPIMAGE_SANDBOX_PROMPT=0 turns the dialog off (labs and CI).

Linux on arm64

Every Linux package also ships for arm64: Allternit-Desktop-<version>-arm64.deb, Allternit-Desktop-<version>-aarch64.rpm and Allternit-Desktop-<version>-arm64.AppImage. They are for Raspberry Pi 4 and 5 with a 64-bit OS (Raspberry Pi OS 64-bit, Ubuntu for Raspberry Pi), ARM laptops, and Linux VMs on Apple Silicon Macs (UTM, Parallels, VMware Fusion, Lima). A 32-bit Raspberry Pi OS cannot run them; uname -m must print aarch64. The glibc floor is the same 2.27, and the Meeting bot needs 2.28 on arm64 too. For developers: release-desktop.yml builds Linux as an x64/arm64 matrix. The arm64 leg runs on GitHub’s ubuntu-24.04-arm runner (free for this public repo), so every prepare script stages its own arch: python-build-standalone aarch64-unknown-linux-gnu, ACU manylinux_2_17_aarch64 wheels, @livekit/rtc-ffi-bindings-linux-arm64-gnu, system-one and mesh-node. gizzi-code is bun --target=linux-arm64, ripgrep comes from vendor/ripgrep/arm64-linux, and scripts/build-linux-sidecars.sh --arch arm64 builds allternit-api and files-mount (cargo-zigbuild aarch64-unknown-linux-gnu.2.17), cua-driver (.2.27) and voice (an arm64 ubuntu:18.04 container with the toolchain PPA’s g++ and static libstdc++, using sherpa-onnx’s linux-aarch64-static-lib). check-elf-floor.mjs --arch arm64 fails any ELF that is not aarch64 (e_machine 183), so an x64 sidecar cannot slip into the arm64 package. The arm64 smoke legs run the same install, engine-health and startup-window checks on ubuntu-24.04-arm with the arm64 distro images. The install script (build/linux/after-install.sh) sets up Chromium’s sandbox for the machine. It tests whether a normal, unprivileged user can create a user namespace, as the user nobody through setpriv (or su when setpriv is missing). If it can, chrome-sandbox stays mode 0755 and the app uses user namespaces. If it can’t (Debian with kernel.unprivileged_userns_clone=0, hardened kernels, or a tool that is missing so the test can’t run), the script makes chrome-sandbox root:root mode 4755 so the app uses the setuid sandbox. Without this, the app stops at launch with FATAL credentials.cc:131. On Ubuntu 24.04 and later the package also installs the AppArmor profile /etc/apparmor.d/allternit, which allows user namespaces for the app. The test runs once, at install time, so after you change the user-namespace setting, reinstall the package. The desktop entry sets StartupWMClass=allternit-desktop, which is the window class the app reports, so the dock groups the window under the right icon.

macOS signing

A Mac without a signing certificate (and CI without one) builds ad-hoc signed (mac.identity: "-" in package.json), not notarized. scripts/build-local.cjs signs with a Developer ID Application identity when the keychain has one, else with an Apple Development identity. Only build-desktop.sh --release or ALLTERNIT_NOTARIZE=1 notarizes. Don’t set the identity back to null. A null identity skips signing, so only the main binary keeps the linker’s signature and the bundle has no sealed resources. macOS then reports a downloaded copy as damaged and offers only Move to Trash, which is what 1.1.8 and earlier did. An ad-hoc build gets the normal “Apple could not verify” prompt with Open Anyway instead (see Installing on a Mac). Two rules keep the seal valid:
  • No dangling symlinks in the bundle. Signing fails on them. The ACU gateway therefore does not ship a venv, because a venv links to the build machine’s Python. prepare:acu-gateway installs its packages per target into resources/computer-use/acu-site/<os>-<arch>, which is packaged as computer-use/acu/site-packages. The gateway runs on the bundled driver Python with that folder on PYTHONPATH (bundledAcuPython in src/main/acu-gateway-manager.ts).
  • Only code gets its own signature. electron-builder signs every file that looks binary, one codesign call at a time. mac.signIgnore skips images, fonts, PDFs, .pak and .pyc files: the app’s signature already seals them in CodeResources. Before this, a build made 2,344 calls instead of 90. At 0.3 s each with a secure timestamp, that was about 12 of the 15 minutes of “Building Electron app bundle” (build b8242, 2026-11-17). A build that is not notarized also signs with --timestamp=none. A new code file type with one of the skipped extensions would ship unsigned, and notarization would reject it. Give code files a code extension.
  • Nothing writes inside the installed app. The packaged app sets PYTHONPYCACHEPREFIX to <userData>/pycache at startup, so the bundled Pythons don’t write __pycache__ into Contents/Resources.
Keychain prompt after each update. macOS ties a Keychain item’s Always Allow to the app’s exact code, and every ad-hoc build has new code. So after an app update, the first launch can ask for the Mac password to use the Keychain item @allternit/desktop Safe Storage (account @allternit/desktop Key). On Mac, Desktop now reads that key off the main thread with a small native addon (native/keychain), so the app keeps working while the prompt is open. The startup window says “macOS is asking for permission. Click Always Allow.” The prompt can open behind other windows. Allow works for that launch. Always Allow stops the prompt on later launches of the same build. Deny shows Try again and Quit (“Allternit needs access to the macOS Keychain”) when there is a saved sign-in or key to protect, and leaves them untouched. On a first launch with nothing saved yet, Desktop starts without OS encryption instead. Desktop no longer discards them when the Keychain is slow or denied. Windows and Linux are unchanged. A stable signing identity would end the prompt after each update. App updates and signing. Squirrel.Mac (Electron’s built-in Mac updater) only installs a new app whose signature meets the old one’s requirement, and an ad-hoc signature’s requirement is its exact code hash, so it refuses every new ad-hoc build. Desktop’s updater therefore does not use it: it downloads the new zip, checks its signature and bundle id itself and swaps the app (see App updates). Homebrew (brew upgrade --cask allternit) and a fresh download still work too. Runtime packages (below) update the parts inside the app separately. Check a build with codesign --verify --deep --strict "Allternit Desktop.app". Proper notarization needs a Developer ID certificate and the APPLE_ID, APPLE_ID_PASSWORD and APPLE_TEAM_ID secrets (scripts/notarize.cjs).

Linux release smoke test

Every Linux Desktop release is gated by .github/workflows/linux-desktop-smoke.yml. release-desktop.yml calls it on the built .deb, and the release job waits for it. For each of Ubuntu 18.04, Debian 10, Debian 12, Debian 13, Ubuntu 22.04 and Ubuntu 24.04 it (Debian 10 uses archive.debian.org, since it is end of life):
  1. runs apt-get install ./deb, which must work with the package’s own Depends;
  2. runs scripts/check-elf-floor.mjs on the whole extracted app, the Electron shell included, when that script exists on the ref (every ELF must need glibc 2.27 or older; only the LiveKit Meeting bot binding is allowlisted);
  3. starts the bundled allternit-api and waits up to 30 seconds for /health/live, which fails on a GLIBC ... not found error;
  4. starts the app as a normal user under Xvfb with --no-sandbox (a container cannot run Chromium’s sandbox), connects over CDP, and checks that the startup window (#btn-get-started) rendered and that main.log has no “Initialization Error”.
The same workflow also installs the .rpm in Fedora 41 with dnf install (checking that the post-install wrote package-type=rpm and that /usr/bin/allternit survives a reinstall) and runs the AppImage on Ubuntu 24.04 with --appimage-extract-and-run (docker has no FUSE); both legs run the same engine-health and startup-window checks. The workflow has no secrets and does not sign in. To test an existing release, run it with workflow_dispatch and a deb_url. The scripts, and the manual steps for sign-in and pairing with a one-time ticket, are in scripts/linux-desktop-lab/README.md.

Files drive in Finder (File Provider)

Each of the account’s other computers shows as its own location in the Finder sidebar, under Locations, behind the account flag files_drive. Not in a release yet. Turning it on. macOS keeps a new File Provider off until you switch it on: open System Settings, then General, Login Items & Extensions, File Providers, and turn on Allternit. Desktop notices the switch within a few seconds and fills each location. A location added before the switch stays empty until it is added again (seen on macOS 26), so Desktop re-adds each location once after it first sees the switch on. The first-run checklist (design 3A) shows this step with an Open System Settings button. What you see. One location per computer, named as in the Computers list. Inside it are that computer’s roots (Allternit with Inbox, Shared and Agent Output, then Code, Models and so on). Files stay online until you open them. Finder shows its own download and upload states. Allternit adds colour badges for Conflict, Protected, Made by an agent and Kept on this device (only the first one that applies shows), and Shared as the text next to a file in the Shared root. Files kept offline stay downloaded. A file deleted in Finder goes to that computer’s trash. Asleep computers. Browsing a sleeping computer lists its saved snapshot and never wakes it. Opening a file wakes it only when the computer’s wake setting is Auto; otherwise Finder says it is asleep. Not shown: this Mac itself (its files are already here) and phones. For developers:
  • Bundle. Contents/PlugIns/AllternitFileProvider.appex is the extension, built from the same Swift as the iOS one: surfaces/allternit-mobile/ios/AllternitFileProvider/*.swift plus the package Packages/AllternitFilesKit. native/file-provider/ holds only what is macOS-specific: Extension/Info.plist and entitlements (templates), the helper Helper/main.swift and the badge drawing Badges/make-badges.swift. npm run prepare:file-provider runs native/file-provider/build.sh (universal arm64 and x86_64). The electron-builder afterPack hook scripts/embed-file-provider.cjs places the extension and the helper Contents/MacOS/allternit-files-domains and signs them, inside out, before electron-builder signs the app. electron-builder never signs Contents/PlugIns, and mac.signIgnore keeps it from re-signing the helper with the app’s entitlements.
  • Signing. The extension is sandboxed with network access. The extension and the helper share the App Group TEAMID.com.allternit.desktop.files, team-prefixed, so no provisioning profile is needed. A Developer ID or Apple Development identity works. An ad-hoc build (identity -, CI without certificates) has no team, so it ships without the File Provider and the log says so. ALLTERNIT_SKIP_FILE_PROVIDER=1 skips both steps.
  • Secrets. macOS gives a Developer ID app no shared keychain group, so the Files token and wake tickets go in a 0600 file in the App Group container (FilesSecretFile in AllternitFilesKit). iOS still uses the shared keychain group.
  • Main process. src/main/files-drive-manager.ts runs at start, every 10 minutes and on wake from sleep. It reads files_drive from GET /api/v1/me/flags (ALLTERNIT_FILES_DRIVE=1 forces it on for development). It mints a compute API key “Files on (this Mac)”, lists runtime devices and the account’s own mesh-only paired machines (GET /api/v1/computers/paired), and passes them to the helper, which writes the App Group and makes the File Provider domains match (computer. plus the computer id). Mesh-only machines are reached through this app’s mesh proxy (meshManager.loopbackFor, port 8013). Every other computer goes through the cloud-api relay. Sign-out revokes the key and removes every location, with the files macOS kept for them.
  • IPC (window.allternit.filesDrive, for the checklist in allternit-ai):
Typecheck the Swift for macOS in seconds with native/file-provider/typecheck.sh. The protocol is the Files drive API.

Layout

IPC channels (Quick Chat)

The main process registers many other channels (for example miniApps:*); see src/main/unified-main.ts.

Linux notes

  • Start at login. The toggle writes autostart/allternit.desktop in $XDG_CONFIG_HOME (default ~/.config), with Exec set to the installed binary (for the .deb, /opt/Allternit Desktop/allternit). Turning it off deletes the file. The toggle shows whether the file exists, so deleting it by hand turns the setting off.
  • Keyring. Allternit stores your sign-in with the system keyring. Without one (the Electron backend is basic_text), tokens get only weak encryption, so Desktop logs a warning and shows one notice: install gnome-keyring or KWallet. The app keeps working.
  • Global shortcuts. If a shortcut cannot be registered, Desktop logs it and shows one notice per session naming it. On Wayland, apps often cannot grab global keys; set the shortcut in your desktop’s own keyboard settings instead. On X11 it usually means another app holds the key.
  • Mini-app zip releases. Zip archives are unpacked by Desktop itself (GNU tar cannot read zip). Paths that leave the install folder, symbolic links and oversize archives are refused.
Developer notes: src/main/linux-autostart.ts, shortcut-notice.ts, keyring-notice.ts, zip-extract.ts.

Pairing this computer

The first time Desktop opens, or after you sign out, it shows the pairing window. It has the same “Allternit ⇄ computer” header as the in-app Connect a computer sheet, this computer’s name and system, and three steps: Sign in to your Allternit account, Approve this computer and Start Allternit. Press Sign in to pair. A sign-in window opens. Signing in pairs the computer, so there is no code to type. The window shows each step as it happens: Signing in while the sign-in window is open, Approving while Allternit checks the computer with your account, then Connected with the account email, and the workspace opens. Cancel, or closing the sign-in window, goes back to the start. If pairing fails, a card says what happened in plain words and what to do next: Try again, Sign in again when the sign-in was not accepted, Manage your computers when the plan’s computer limit is reached, or Check Allternit status when the problem is on Allternit’s side. The raw error code goes to the app log (~/Library/Logs/@allternit/desktop/main.log on Mac, ~/.config/@allternit/desktop/logs/main.log on Linux), not on screen. The window is app white and follows the system’s dark mode (graphite). Connection Settings (tray). Once the workspace is open, the tray’s Connection Settings opens Settings › Computers in the main window, the same connect kit every Allternit surface uses. The separate Where Allternit runs page shows only when the app can’t load the workspace (Desktop opens it by itself when the workspace fails to load). It offers On this computer (the engine built into Desktop) or On my Allternit server or cloud computer (an address you enter). Check tests the choice without saving it and says Works with the response time or Can’t reach. Save and restart saves it and restarts the app. For developers:
  • The pairing window is src/main/startup-window.ts; its page is built by src/main/startup-page.ts (buildStartupHtml, renderPairingCard). The primary button keeps the id btn-get-started, which the Linux lab driver clicks.
  • src/main/auth-manager.ts sends the re-rendered card on pairing:render at each change. Phases, steps and the error cards are in src/main/pairing-state.ts (pairingStepAt, pairingErrorView; failures are PairingFailure with a kind and status). The startup preload adds cancelLogin (auth:cancel-login), openApp (startup:open-app) and onPairing.
  • The tray decision is connectionSettingsTarget in src/main/window-chrome.ts. It opens Settings › Computers by dispatching the workspace’s allternit:open-settings event with { section: 'computers' }.
  • static/connect.html uses window.allternit.connection: test({ remoteUrl }) checks a typed address before saving (trusted senders only), and setBackend({ ..., restart: true }) saves and relaunches.

Cloud sign-in

Desktop holds two sign-ins. The device pairing (a runtime token) keeps the computer linked to your account. The cloud sign-in (a Clerk session) is what cloud features such as artifacts use. Desktop renews the cloud sign-in in the background with one request to Clerk (the 60-second session token is renewed about every 50 seconds), using the sign-in cookie it already holds; no window opens. Only if that request fails does it load the sign-in page in a hidden window, and that window is destroyed as soon as it has the token. The sign-in window from pairing is destroyed (not just hidden) once you are signed in. When the Clerk session itself has ended, the background renewal can’t work, and cloud views show Sign in to see your artifacts. Press Sign in there. A sign-in window opens; sign in with the account this device is paired to and the list loads. The device stays paired, so nothing has to be set up again. Signing in with a different account is refused and names the right one. For developers: the background renewal is refreshClerkTokenDirect in src/main/auth-manager.ts (POST https://<frontend-api>/v1/client/sessions/<sid>/tokens with the persist:allternit-auth cookies, the same call clerk-js makes; request and response checks in src/main/clerk-session-refresh.ts). [Auth] Clerk token refresh without a window failed in main.log means it fell back to the hidden window. The renderer calls window.allternit.auth.reconnectCloud() (IPC auth:reconnect-cloud, AuthManager.reconnectCloud in src/main/auth-manager.ts). It returns { ok: true } or { ok: false, error }. The account check is cloudAccountMismatch in src/main/cloud-account.ts. On the web and in older Desktop builds, signInToCloud() (allternit-ai/src/lib/cloud-sign-in.ts) falls back to /sign-in or the full device sign-in. Cloud calls carry only the Clerk bearer (and X-Allternit-Tenant-Id). buildAuthHeaders(targetUrl) adds the Desktop identity headers (X-Allternit-User-Id, X-Allternit-User-Email) only for the app’s own origin and the loopback runtime: api.allternit.com reads identity from the JWT, and its CORS preflight refuses those headers, which made every direct cloud call fail as if offline. Pass the request URL when calling it for a cloud route. When the cloud can’t be reached. The local API checks the device token with api.allternit.com (verify_runtime_device_token in cmd/allternit-api/src/connector_routes.rs). If the cloud can’t be reached (no network, DNS failure, a 5xx or 429), it uses this device’s last successful check instead, for up to 7 days, so Desktop keeps working on your own files. The last check is kept in device-identity-cache.json in the data folder, keyed by a SHA-256 of the token (never the token itself). A token the cloud rejects is refused straight away; the saved check never covers a rejection.

Code mode panes

The Panes menu at the top right of a Code session lists Terminal, Changes, Browser, Computer, Files, Artifacts, Transcript, Tasks and Code map. A new session opens with Terminal.
  • Pick a pane to show it in place of the one you’re using. Picking a pane that’s already open (checked) closes it.
  • Open beside opens a pane as its own card next to the others. Each card docks left, right or bottom, resizes, and can open in a new window from its own menu.
  • Opening a file from the console’s Problems tab switches to Files.
  • Changes shows the session folder’s uncommitted work: changed files and new (untracked) files, with line counts. It reads POST /api/v1/git/diff on the local API (cmd/allternit-api/src/git_routes.rs).
    • Edit (pencil) turns that file’s diff into an editor in place. Save with ⌘S or Save and the diff comes back updated. Open beside opens it in the Files pane instead.
    • Undo on a block of changes puts just that block back. Undo all changes on a file puts the whole file back to its last saved-in-git version; for a new file it deletes the file, after you confirm.
    • Both use POST /api/v1/git/discard ({ path, file, patch?, untracked? }): with patch it reverses one hunk after git apply -R --check; without it runs git checkout -- file, or deletes an untracked file only when untracked: true.
  • Code map opens on the file the agent is working on, with what it uses, what uses it and what a change could break, like the dependency map; Whole repo draws every file by import graph. Files the agent reads show blue and edits show coral; click a file to centre on it or open it in Files. A line under the chat shows how much of the repo map the last prompt carried. See Live code map.
  • Panels lists the project’s own panels, the files in .allternit/panels/: ops sheets and MCP Apps the project keeps with its code. See Project panels.
On a phone, each pane opens full screen from the header’s pane menu. Code: allternit-ai/src/views/code/pane-manager/ (switchPane, openPane). The rail’s Code session list, its row menu and shortcuts are in Code session list. Pull requests a session opens show on its row; see Linked pull requests in Code.

Replies that stop streaming

A session shows Working while its reply streams in. If the stream goes quiet for 30 seconds, or you open a session that still says Working, the app checks the saved conversation. When the agent’s reply is already finished there, the session stops showing Working and shows the saved reply. A turn that is still running is left alone. This covers a reply stream lost across a Desktop restart; the turn itself still runs and saves normally. Code: allternit-ai/src/lib/agents/mode-session-store.ts (reconcileStream, serverTurnFinished).

Quitting with work in progress

When Desktop quits, it hands work that has started (a background job that is leased or running) to the cloud continuation so it can finish. Idle sessions and queued jobs stay on this computer and are picked up again on the next launch; they are not sent to the cloud. Code: handoffInFlightToCloud in surfaces/allternit-desktop/src/main/unified-main.ts calls POST /api/v1/fabric/transport/continuation/handoff-all, which runs handoff_all_in_flight in allternit-cowork-runtime/src/sqlite_store.rs.

Allternit Factory views

Shipping with the Allternit Factory build. These views are the approved design and are not live yet.
Desktop is the graphical product for the Allternit Factory. There’s no new mode: the Factory’s four parts show up in places Desktop already has, and every view reads the same engine as Gizzi. The views draw the same picture for the same input (no random layout), show ”—” when empty, and take counts from the judge, never from narrative. Desktop ships allternit-factory and gizzi in resources/bin and puts gizzi on your PATH at first run: on macOS/Linux as a ~/.local/bin/gizzi link (to the active runtime package’s gizzi once a runtime update is installed, so the terminal runs the same version as Desktop; a link you pointed elsewhere, such as a Homebrew install, is kept), on Windows as a %LOCALAPPDATA%\Allternit\bin\gizzi.cmd shim with that folder appended to your user PATH (open a new terminal to pick it up; the uninstaller removes the shim).

How this relates to the Agency Kernel

Messages on your Mac: permissions

The “Messages on your Mac” tool lets a bot search your Messages history and prepare a text that is sent only after you approve it. macOS needs two permissions for Allternit Desktop, because the Allternit runtime runs as a child of the app.
  1. Full Disk Access (to read the Messages database). In Settings, open Messages (Mac) and choose the Full Disk Access row. System Settings opens; turn on Allternit Desktop, adding it with the plus button if it is not listed, then restart the app.
  2. Automation (to send through Messages). Choose the Automation row, turn on Messages under Allternit Desktop, or approve the prompt the first time a text is sent.
Both rows show a check mark once macOS has granted access. This is macOS only.

App updates

Desktop updates itself on macOS, Windows and Linux, starting with the first version after 1.1.15. It checks when it starts and every hour (also from Check for Updates… in the app menu and in Settings), downloads the new version in the background, and then shows a restart prompt. Nothing installs until you click Restart, except on Windows, where a downloaded update also installs when you quit.
  • macOS: on Restart, Desktop puts the new app in place of the old one (same folder, same name) and reopens. The old copy is deleted on the next start. The app must be able to replace itself: if it runs straight from a disk image or from Downloads (macOS then runs a hidden copy), or macOS blocks the change (System Settings > Privacy & Security > App Management), Desktop keeps running and shows a notification that opens the download page. After an update, macOS can ask once for the Keychain (see macOS signing).
  • Windows: on Restart, the downloaded installer runs silently in the folder Desktop is already installed in and reopens Desktop.
  • Linux: see Updates on Linux.
  • On 1.1.15 or older? Those versions used an updater that never worked for these builds. Install the next version by hand once (download it from the releases page, or brew upgrade --cask allternit). Every version after that updates itself.
For developers: src/main/app-updater.ts is the only app updater. It runs electron-updater against the latest Allternit/desktop release on every OS and sends app:update-status events (checking, available, up-to-date, downloaded, error) to every window; Settings and the restart prompt call app:check-for-updates and app:install-update. Per OS: The pure decisions (mode, elevation, feed, fallback text, bundle checks) are in app-updater-logic.ts. release-desktop.yml checks that each feed and every file it names is attached before the release is created. ALLTERNIT_UPDATE_FEED=http://host:port/ points a build at a generic feed that serves the latest*.yml files and the packages (lab). Logs are tagged [appUpdater] ([appUpdater:mac] for the swap) in main.log. Old clients cannot be bridged: 1.1.15 and older ask update.electronjs.org, which serves only zips named -mac- or -darwin- to Squirrel.Mac. Attaching copies with those names would make every old Mac download about 900 MB each hour and then refuse it (ad-hoc signature), so the release does not attach them.

Updates on Linux

Every Linux install updates itself, starting with the first version after 1.1.15: the .deb (Ubuntu, Debian, Mint), the .rpm (Fedora, RHEL/Alma/Rocky, openSUSE) and the AppImage. Desktop checks when it starts and every hour, downloads the new version in the background, and shows the same restart prompt as on Mac and Windows. When you click Restart:
  • .deb or .rpm: your desktop asks for your password (the polkit prompt GNOME and KDE show), installs the package and reopens Desktop.
  • AppImage: Desktop replaces the AppImage file with the new one and reopens. No password is needed, but the AppImage’s folder must be writable by you (for example ~/Applications).
  • On 1.1.15 or older? Those versions have no Linux updater. Install the next version by hand once: download Allternit-Desktop-<version>-amd64.deb from the releases page and run sudo apt install ./Allternit-Desktop-<version>-amd64.deb. Every version after that updates itself.
  • No password prompt on this computer (no pkexec, for example a minimal or headless install), or you cancel it: Desktop keeps running and shows a notification. Click it to open the release page, then install by hand: sudo apt install ./<file>.deb, sudo dnf install ./<file>.rpm, or sudo zypper install ./<file>.rpm.
  • An unpacked build does not update itself.
For developers: src/main/app-updater.ts runs electron-updater on Linux (see App updates for macOS and Windows) with the class that matches the install: AppImageUpdater when APPIMAGE is set, else DebUpdater or RpmUpdater from resources/package-type (the post-install script writes the right value). All three read latest-linux.yml from the latest Allternit/desktop release; it lists the .deb, the .rpm and the AppImage, and each class takes the file with its own extension. On arm64 they read latest-linux-arm64.yml instead (electron-updater adds -<arch> for every Linux arch except x64), which lists only the arm64 packages. release-desktop.yml builds and attaches both next to latest.yml and latest-mac.yml. The deb install runs pkexec /bin/bash -c 'dpkg -i <deb>' (then apt-get install -f -y if dependencies are missing); the rpm install runs zypper, dnf, yum or rpm through pkexec. The pure decisions (mode, elevation, feed, fallback text) are in app-updater-logic.ts. For a lab test, ALLTERNIT_UPDATE_FEED (or the older ALLTERNIT_LINUX_UPDATE_FEED) =http://host:port/ points a build at a generic feed that serves latest-linux.yml and the packages. Logs are tagged [appUpdater] in main.log.

Runtime updates

The app itself updates as a whole new version (see App updates). The parts inside it (the local API, Gizzi, the factory and the screens) update separately and more often, as a signed runtime package from runtime.allternit.com. Desktop checks a minute after it starts, then every 6 hours. Check for updates in the app menu also checks the runtime. A downloaded update is installed the next time Desktop starts.
  • Only files that changed are downloaded, and the rest are copied from what is already installed.
  • If a download stops partway (a slow connection, quitting the app), the next check carries on from where it stopped instead of starting over.
  • A failed check tries again after 1, 5, 15 and then 60 minutes.
  • Linux glibc stamp. The publisher reads the highest GLIBC that the package’s ELF files need (scripts/check-elf-floor.mjs) and writes it as minGlibc into the manifest and the feed entry. It refuses to publish above GLIBC_FLOOR (2.27, Ubuntu 18.04) unless ALLTERNIT_RUNTIME_ALLOW_GLIBC_ABOVE_FLOOR=1. ELFs on scripts/elf-floor-allowlist.json (the LiveKit Meeting bot binding, glibc 2.28) do not raise the stamp, so Ubuntu 18.04 still gets engine updates and only the Meeting bot stays unavailable there, as in the bundled app. Desktop skips a package whose minGlibc is above the machine’s glibc, and drops an installed one, so the bundled binaries run instead. A package with no stamp counts as GLIBC 2.39 (every package published before the stamp was built on Ubuntu 24.04). A host that reports no glibc (musl) takes no runtime package. macOS and Windows are not affected.
  • It also checks when the local API fails to start, because an update may be the fix.
For developers (surfaces/allternit-desktop/src/main/runtime-package.ts, scheduling in unified-main.ts):
  • fetchToFile aborts an object after STALL_MS (60 s) with no bytes, or when it runs below MIN_BYTES_PER_SEC (16 KB/s) after 20 s, and retries 3 times. Each retry is logged as [Runtime] retrying.
  • stageDelta downloads through a pool of 8, logs [Runtime] downloading n/total every 10 s, and writes each object to *.download before renaming it into place.
  • A <version>.partial folder survives a failure or quit, and prune keeps it. The next check for the same version counts complete files as done. The final deep verify still hashes every file.
  • latest.json and its .sig are published one after the other. A mismatched pair is read again once after feedRetryMs (5 s).
  • checkRuntimeNow backs both the schedule (RUNTIME_RETRY_MS backoff) and the manual check. main.log keeps 10 MB, so [Runtime] lines survive.
Quitting. Quick Chat hides instead of closing, except while the app quits. Crash reports use a non-blocking dialog. Once quit cleanup has run, a second quit exits at once, so nothing can hold the app open. Desktop hosts the Allternit API and Gizzi runtime locally. It is not part of the Agency Kernel; the kernel’s Agency API is a Cloud API surface. See Architecture.

Run line

Under the latest reply, the run line shows what the run took: the model, time, tokens in and out, tool calls, failed tool calls (in red, when any failed), cost, context used and the cache state. Click it for the full breakdown. In Code it stays in view, because it is part of reading the run. In Chat and bot chats it appears when you hover or focus the reply’s footer. On touch screens (the phone layout and the m.allternit.com app) it is always shown, since there is no hover. For developers: RunTelemetry (src/components/chat/RunTelemetry.tsx) renders the line from the message’s metadata.telemetry (toolCalls, toolFailures, usage). StreamingChatComposer takes runLine: 'hover' | 'always'; CodeCanvas and CodeCanvasTileSession pass 'always'. The hover wrappers (also in RunFooter) add [@media(hover:none)]:opacity-100. In bot chats, RunFooter wraps the run line and RunStrip as one line that grows in height (min-h-5, not a fixed h-5, which clipped wrapped lines into the composer on phones); beside the run line RunStrip takes besideSummary and shows only tok/s and kernel fields, since time, tokens and cost are already in the run line. Items never break inside themselves (6 in / 556 out stays together); the line wraps between them.

Prompt-cache countdown

After a cache-bearing response, Gizzi Code shows a separate cache row under its model/context footer. Desktop and the web/phone/PWA workspace show the same indicator inside the latest reply’s post-run orb telemetry, alongside time, tokens, and cost. Clicking the telemetry also includes a Cache row in the details. Existing custom status-line commands are preserved. The row updates every 30 seconds without sending a model request. Green means warm, amber means less than 20% of the TTL remains, and red means the estimated TTL has elapsed. The block bar shows time remaining. last hit is the share of the latest request’s input read from cache, not a session-wide hit rate. When cold, may re-cache shows the latest reported input footprint. Expiry is an estimate from the request TTL, not a guarantee that the provider still holds the cache. Changes to model, tools, or context may invalidate it earlier. Unknown provider TTLs have no countdown. Native requests with a known TTL currently use five-minute ephemeral markers; Gizzi’s interactive cache path uses its configured five-minute or one-hour TTL. No keepalive requests are sent. Miss counts and causes are omitted when not reported.

Mode controls and rail selection

The title bar’s top-left corner holds Back, Forward, the sidebar button and four plain mode buttons: Home, Bots, Code and ACI. Click one to switch. Scroll over the buttons to cycle through modes. When bots have unread activity, a red count sits on the Bots button; click it to open bot activity (⌘⇧M). On a narrow sidebar the buttons show icons only. For the sections inside each mode, hold the mode orb on the composer to open the Shelves hub (see Composer). The New orb sits at the composer’s top right; ⌘N runs the same new item in the Desktop app. With the sidebar collapsed, the controls fade until you point at them. Hovering a mode button switches to it and previews its sidebar, and your bots show in a strip below. In full screen the window’s traffic lights hide, so the controls move flush into the top-left corner; they move back when you leave full screen. The top of the sidebar shows the mode’s wordmark, the same as the phone menu: A://TERNIT for Home, the word BOTS in Bots and ACI in ACI (no Allternit in front), and the gizzi code wordmark in Code. The selected mode, rail tab and New row have a translucent glass highlight with a fine Allternit double-slash detail, and no coloured strip on the left edge. Icons respond to hover and press; keyboard focus stays visible. Motion and transparency follow your system accessibility preferences. Developer notes: the controls are RailControls in src/shell/FloatingWidgets.tsx; the mode list is src/shell/mode-buttons.ts. src/shell/titlebar-clearance.ts owns the traffic-light offset (72px in Electron, 4px on the web and in full screen). It listens for the Desktop preload’s enter-full-screen / leave-full-screen window events, and it updates --titlebar-traffic-w / --titlebar-controls-w for any top bar that pads past the controls. The sidebar wordmark is src/shell/rail/RailWordmark.tsx.

Approvals

Requests that need your say-so appear in the inbox with the exact action. On a Mac the app asks for Touch ID before an approval is sent, and on Windows it asks for Windows Hello. Desktop on Linux, or a computer with no biometric, cannot approve: approve from the web or your phone. Rolling out with the next release, not live yet. See Approvals in your inbox.