Repository navigation
Conversation
A menu-bar / tray app for hosted dashboards. The gateway stays on our server (same telemetry as every hosted pilot); the app only connects this computer's agents to it. The start page's install commands keep working as before. - squidbrake.com: POST /v1/app/code (Supabase emails a 6-digit code), POST /v1/app/connect, GET /v1/app/link/ID (waking / waiting / starting / connecting, then the agent key once), POST /v1/app/heartbeat (wakes a sleeping dashboard; an app that checked in within a day keeps it awake), POST /v1/app/signout. The app gets the start page's untaken agent key, or a new one per computer from provision.py. Only ever an agent key. - provision.py: app_keys() adds one agent key named after the computer. - desktop.py (`squidbrake app`, `squidbrake login`): icon with status, sign-in page on 127.0.0.1 at a random address, wires agents like install.sh, starts at login, Open dashboard / Reconnect agents / Quit. - Installers: native build includes it (pystray + Pillow, extra "app"); Windows gets a console-less squidbrake-app.exe, a Start menu shortcut and the login item; Mac .pkg opens the app after a normal install. MDM / silent installs are unchanged. - Start page: an "App (no terminal)" tab, only when INSIGHTS_APP_DOWNLOADS is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #232 (sleep instead of delete). Merge that one first, then GitHub retargets this PR to
main.What it is
A small menu-bar (Mac) or tray (Windows) app. The gateway stays hosted, so we get the same telemetry as every hosted pilot. The app only connects the agents on this computer to that hosted dashboard. The start page's install commands keep working exactly as before, as the backup.
For the person: install → the app opens a sign-in page → email → 6-digit code → "You're protected". There are no keys to copy, and it starts at every login. If they closed the start-page tab, nothing is lost: the app signs in with their email.
How it works
squidbrake.com (
insights/app.py):POST /v1/app/codePOST /v1/app/connectGET /v1/app/link/IDwaking/waiting(with the number ahead) /starting/connecting. Then, once: dashboard, agent key, device token.POST /v1/app/heartbeatPOST /v1/app/signoutWhere the agent key comes from:
provision.pyapp_keys()makes it, named e.g.app-karishmas-macbook-airso it shows on the Team page. It checks the key opens the gateway before handing it over; it never rotates or removes other keys.The app (
desktop.py,squidbrake app,squidbrake login):~/.squidbrake/app.json, readable only by the owner (0600).install.sh(connect claude-code --hook-only,connect agents,connect guard, dashboard shortcut).com.squidbrake.app, Windows Run key, Linux XDG autostart.squidbrake login(the same sign-in in a terminal),squidbrake app --status,squidbrake app --signout.Installers (
packaging/native,native.yml):.[app](pystray, Pillow).squidbrake-app.exe, a Start menu shortcut and the login item. It launches after an interactive install..pkgpostinstall opens the app for the logged-in user./qn,URL+KEY,installerCLI): unchanged, no app pop-up.Start page: a new "App (no terminal)" tab with download buttons. It's the default on Mac/Windows, shown only when
INSIGHTS_APP_DOWNLOADSis set, so nothing changes until a release contains the app.Rollout (after merge)
{{ .Token }}to the Magic Link and Confirm signup email templates (e.g. "or enter this code: {{ .Token }}").native.ymlattaches installers that include the app.provision.pyto the VM, thensystemctl restart squidbrake-provision;INSIGHTS_APP_DOWNLOADS=https://github.com/batrapulkit/squidbrake/releases/latest/downloadand rebuildinsights.Not in this PR
Tests
tests/test_pilot.py:tests/test_provision.py: the real key snippet on a real keys.json (other keys keep working; the new one is an agent); a key that doesn't open the gateway is removed and never handed out.tests/test_desktop.py:squidbrake app --statusreported "Protecting".native.yml).🤖 Generated with Claude Code