You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: squad update-check --json — expose cached update status for tooling #1170
Add a squad update-check --json CLI command that reads the existing update-check.json cache (already maintained by self-update.ts) and emits structured JSON. This gives editor extensions, coordinator instructions (Squad's own and downstream forks), CI scripts, and IDE tooling a clean interface to query update status without OS-specific cache path resolution.
Motivation
self-update.ts already maintains an OS-specific cache at:
Filed during architecture review for downstream issue tamirdresher_microsoft/squad-squad#1 ("Coordinator-level in-chat upgrade UX"). The downstream coordinator currently has to resolve OS-specific cache paths via a node one-liner inside coordinator instructions — a CLI command would eliminate that fragility.
Plan: add a new squad update-check [--json] [--refresh] command in packages/squad-cli/src/cli/commands/update-check.ts that reads the existing update-check.json cache maintained by self-update.ts (exporting getCachePath/fetchLatestVersion/writeCache from there for reuse) rather than duplicating the OS-specific cache path logic. It reports current/channel/latest/updateAvailable/cacheAge/checkedAt matching the schema in the issue description — release channel is derived from the current version's prerelease tag (stable/preview/insider), and cacheAge is formatted as an ISO 8601 duration (e.g. PT2H15M).
Without --refresh it only reads the cache (no network call, per the acceptance criteria) and reports "no cache yet" if none exists. With --refresh it bypasses the cache and re-fetches from npm. Exit codes: 0 (up to date / no cache), 1 (update available), 2 (transport failure during --refresh). Honors SQUAD_NO_UPDATE_CHECK=1 for a silent no-op.
Activity
omercangumus commentedon Jul 3, 2026
I'll take this one.
Plan: add a new
squad update-check [--json] [--refresh]command inpackages/squad-cli/src/cli/commands/update-check.tsthat reads the existingupdate-check.jsoncache maintained byself-update.ts(exportinggetCachePath/fetchLatestVersion/writeCachefrom there for reuse) rather than duplicating the OS-specific cache path logic. It reportscurrent/channel/latest/updateAvailable/cacheAge/checkedAtmatching the schema in the issue description — release channel is derived from the current version's prerelease tag (stable/preview/insider), andcacheAgeis formatted as an ISO 8601 duration (e.g.PT2H15M).Without
--refreshit only reads the cache (no network call, per the acceptance criteria) and reports "no cache yet" if none exists. With--refreshit bypasses the cache and re-fetches from npm. Exit codes: 0 (up to date / no cache), 1 (update available), 2 (transport failure during--refresh). HonorsSQUAD_NO_UPDATE_CHECK=1for a silent no-op.feat(cli): add squad update-check --json for tooling/CI
feat(cli): add squad update-check --json for tooling/CI
feat(cli): add squad update-check --json for tooling/CI (github#1440)