Skip to main content

Module check

Module check 

Source
Expand description

Whether a newer AgentMux release exists (docs/specs/SPEC_UPGRADE_FOR_USERS_AND_AGENTS_2026_10_15.md §3).

srv asks GitHub Releases for the latest release when asked: the user’s Check for update in the version panel, or an agent’s App version or upgrade (check_now), at most every 30 seconds between them; and by itself, a minute after start and every few hours, unless the user turned update:auto off (update::auto, which also downloads and stages the release; the operator reversed the 2026-10-18 “no request the user didn’t ask for” rule for this check on 2026-11-03). Offline, a rate limit or any error keeps what the last check found.

Which release is latest comes from the releases/latest web page’s redirect, which GitHub’s 60-an-hour anonymous API limit (shared by everything on the computer) doesn’t touch. The API is asked only for the release’s files and notes, when the page names a release this srv hasn’t got yet (and, once held, with its ETag, which saves the download; an unauthenticated 304 still counts against the limit, as measured). When GitHub still refuses, the check says so and when it lifts, and a newer release is still reported. Its files and checksums then come from the release’s signed manifest at its download address (update::signed_source), which the API’s limit doesn’t touch; where that gives no answer either, there is no download until the API answers.

The answer is kept here, sent to every window as the app:updatestatus event when it changes, and read on demand with app.update-status. It names the release file for this install (update::install) with the SHA-256 GitHub lists for it, and that check’s answer is what the rest installs: update::download fetches exactly that file, and update::restart verifies it against that checksum. A new check replaces the release on offer, except while a download or a restart into it is under way, which finishes first.

Any portable or installed build upgrades to a newer release, a local task package build (local-… channel) included: it compares versions like a release. Only a task dev build (dev-… channel), which runs from source, never upgrades; it reports which release is latest.

Structs§

AppUpdateStatus
What srv knows about releases, as every window shows it.
DownloadStatus
Where a download of a release stands.
ReleaseAsset
A release file, as GitHub lists it.
WaitingOn
One agent a restart waits for (update::restart).

Constants§

EVENT_APP_UPDATE_STATUS
The event every window gets when the status changes.

Functions§

check_now
Ask GitHub now, for the user’s Check for update or an agent’s App version or upgrade, and return what srv knows after. Asked again within [CHECK_NOW_EVERY], it answers what the last check found, its failure included; concurrent callers share one request.
current_status
What srv knows now (app.update-status).
init
Get ready to check (bootstrap::background). Asks nothing itself: update::auto and the user ask.