/** * `squad update-check` — expose cached CLI update status for tooling. * * Reads the update-check cache maintained by self-update.ts and reports it * as human-readable text or structured JSON (--json). This gives editor * extensions, coordinator instructions, and CI scripts a stable interface * to query update status without replicating OS-specific cache path * resolution or TTL freshness checks themselves. * * @module cli/commands/update-check */ import { type ReleaseChannel } from '../upgrade.js'; export interface UpdateCheckResult { current: string; channel: ReleaseChannel; latest: string | null; updateAvailable: boolean; cacheAge: string | null; checkedAt: string | null; error?: string; } /** Detect release channel from a version's prerelease tag (e.g. "insider.2" → "insider"). */ export declare function detectChannel(version: string): ReleaseChannel; /** Format a millisecond duration as an ISO 8601 duration string (e.g. "PT2H15M"). */ export declare function formatCacheAge(ms: number): string; /** * Build the update-check result for the given current version. * * Without `refresh`, only reads the existing cache — never makes a network * call. With `refresh`, always re-fetches from the npm registry and updates * the cache. */ export declare function runUpdateCheck(currentVersion: string, options?: { refresh?: boolean; }): Promise; /** * CLI entry point for `squad update-check`. * @returns the process exit code: 0 (up to date / no cache yet), * 1 (update available), 2 (transport failure during --refresh). */ export declare function runUpdateCheckCommand(args: string[]): Promise; //# sourceMappingURL=update-check.d.ts.map