/**
 * T-npm-auto-update UPD.1 (wg-7091e922881b) — the check layer for the npm
 * rollout: a cached, fail-quiet version probe surfaced as a once-per-day
 * CLI notice and an `opensquid doctor` section.
 *
 * Design locks (per the track pre-research):
 *   - The CLI hot path does ZERO network — it reads the cache file only;
 *     a stale cache spawns a DETACHED refresher (`opensquid update
 *     --check-only`) that writes the cache for the NEXT invocation.
 *   - Hook bins / MCP server / chat-daemon worker NEVER import this module
 *     (a hook must never pay a network call; grep-pinned in the suite).
 *   - `refreshCache` is the refresher's ONLY write path and is
 *     READ-MERGE-WRITE: the cache carries two fields with two writers (the
 *     notice closure stamps `notified_at`; the refresher updates
 *     `latest`/`checked_at`) — a blind refresher write would drop a
 *     concurrent notice stamp and break the 24h throttle.
 *   - Probe failures are SILENT (offline / firewalled / custom registry →
 *     no notice, no harm). Auto-apply is deliberately NOT here — the
 *     update only ever runs as a foreground user-invoked command.
 *
 * Imports from: node:fs/promises, node:path, semver, ./atomic_write.js,
 *   ./paths.js.
 * Imported by: src/cli.ts (notice + doctor), src/setup/cli/update.ts
 *   (--check-only), src/setup/cli/doctor.ts (update section).
 */
export interface UpdateCache {
    /** Latest version seen on the registry. */
    latest: string;
    /** ISO timestamp of the successful probe that wrote this. */
    checked_at: string;
    /** ISO timestamp of the last time the NOTICE was printed (24h throttle). */
    notified_at?: string;
}
export declare const updateCachePath: () => string;
export declare const CHANGELOG_URL = "https://github.com/smlee/opensquid/blob/main/CHANGELOG.md";
export declare function readUpdateCache(): Promise<UpdateCache | null>;
export declare function writeUpdateCache(cache: UpdateCache): Promise<void>;
export declare function isStale(cache: UpdateCache | null, nowMs: number): boolean;
/** The notice line, or null (not newer / bad semver / throttled <24h). */
export declare function noticeLine(cache: UpdateCache | null, current: string, nowMs: number): string | null;
/**
 * The refresher's ONLY write path — READ-MERGE-WRITE so a concurrent
 * notice's `notified_at` stamp survives the refresh (the 24h-throttle race
 * the spec-audit caught).
 */
export declare function refreshCache(latest: string, nowIso: string): Promise<void>;
/** The running package's version — this file lives at <root>/{dist,src}/runtime/,
 *  so package.json is two levels up (same idiom as mcp/server.ts). */
export declare function readCurrentVersion(): Promise<string>;
/** Fail-quiet registry probe: the latest published version, or null. */
export declare function probeLatest(timeoutMs?: number): Promise<string | null>;
//# sourceMappingURL=update_check.d.ts.map