A local-first multi-agent app development platform, built on PenguinHarness
Updating runs through one dialog: confirm, watch the download, restart
- Date: 2026-08-28
- Type: feature
- Scope:
web,server,desktop,cli,docs - PR: #540
- Breaking: yes —
POST /api/version/updateanswers with the job status instead of blocking until the run is over
The two update entries — the "New version available" superscript on the new-chat page's version line, and the row under System settings in the sidebar user menu — now open the same update dialog, and the dialog walks the update the way an app updater does: a check, the release offered with its notes and a Download and update button (nothing is fetched before it is pressed), a progress bar with Continue in background, and Restart and update once the release is ready. Before this, the superscript opened the GitHub page, the server dialog ran the whole install inside one long request with no progress and ended in "restart the service by hand", and in the desktop app "Check for updates" started the download on its own.
Details
- Web:
lib/update-flow.tsis the one state machine (unknown/checking/disabled/up-to-date/available/downloading/ready/restarting/error/unsupported) over two backends — the server release and the desktop shell's updater — andlib/use-update-flow.tsowns the actions, the polling and the outcome toasts. The modal (components/account/update-modal.tsx) and the row (update-row.tsx) replace the update dialog, the server row, the desktop row and the install confirmation. Closing the dialog never cancels: the row keeps the percentage, the avatar dot appears once the release is ready, and the outcome toasts. The version line's superscript follows the flow ("New version available" / "Downloading update" / "Restart to update") and opens the dialog. - Server: the self-update became a background job (
services/update-job.ts) —POST /api/version/updatestarts it (or joins a running one) andGETreportsphaseand, while the installer'scurl --progress-barruns, a realpercent; the finished result stays readable until the next start, which is also the retry. NewPOST /api/version/restartexits with core'sSERVER_RESTART_EXIT_CODE(75) after the graceful shutdown when a supervisor is there (PENGUIN_SUPERVISED=1, published to the platform as thelifecycleruntime capability), and answersno_supervisorotherwise. The desktop relay gainedPOST /api/desktop/update/downloadand theavailablesnapshot state. - CLI:
penguin serverandpenguin webrun the service as a child process and supervise it — forwarding the terminal's signals, exiting with its code, and relaunching it on the restart code so the relaunch runs the newly installed release (printed as "Restarting the service to apply the update…"). Atsxdev run cannot be relaunched by plain node and keeps running in-process. - Desktop: the shell no longer downloads on its own. A check ends in the new
availablestate; the download starts on the page'sdownloadcommand or from the native dialog a menu-driven check now ends in ("Download" / "Later"), and the native "restart now" prompt follows only a download the native dialog started. The fallback-feed retry of a failed package download is unchanged. - Docs: the Web App, CLI and Server API pages describe the dialog, the supervisor and the job/restart endpoints.
Compatibility
POST /api/version/updateused to hold the request open for the whole run and answer{status, output, needsRestart}; it now answers at once with the job status ({state, targetVersion, phase?, percent?, output, result?, …}), the old shape living on asresult.GET /api/version/updateis where a client waits. The Web App and the server ship together, so no user action is needed; a script calling the old endpoint should poll GET.DesktopUpdaterCommandMessage.actionandDesktopUpdateStatus.stateare wider (download,available). The shell and the server ship in one package.SessionConfig-style SDK surfaces are untouched; nothing on disk changed.