/**
 * Cached version-availability check against the public npm registry.
 *
 * Rationale: `indusk update` used to shell out to `npm view` and trigger an
 * in-process self-install on every invocation, which (a) loops infinitely
 * when the install lands somewhere other than the on-PATH binary, and
 * (b) couples project-state work to machine-state work. The new model is
 * notify-only: a quiet TTL-cached fetch surfaces a one-line "upgrade
 * available" notice, and the user explicitly runs `indusk upgrade` to
 * install. See `bin/commands/upgrade.ts` for the install side.
 *
 * Network failure is silent (returns the cached value if present, else
 * null). Cache lives at `${INDUSK_HOME}/version-check.json` with a 6h TTL,
 * tunable per call. Set `INDUSK_SKIP_UPDATE_CHECK=1` to suppress.
 */
export interface VersionCheckResult {
    /** Latest version per npm, or null when unknown (no cache and network failed). */
    latestVersion: string | null;
    /** Whether the value came from the on-disk cache (true) or a fresh fetch (false). */
    fromCache: boolean;
    /** When the value was originally fetched. ISO-8601. */
    checkedAt: string | null;
}
export interface VersionCheckOptions {
    /** Override the cache path (testing). Default: `${INDUSK_HOME}/version-check.json`. */
    cachePath?: string;
    /** TTL in ms. Default: 6h. */
    ttlMs?: number;
    /** Fetch timeout in ms. Default: 5s. */
    timeoutMs?: number;
    /** Inject a fetch implementation for tests. Default: global fetch. */
    fetchImpl?: typeof fetch;
    /** Bypass the cache and force a fresh network call. */
    bypassCache?: boolean;
}
/**
 * Resolve the latest version. Read-through cache: if the on-disk cache is
 * fresh, return it without touching the network; otherwise fetch, persist,
 * and return. On network failure with no cache, returns `latestVersion:
 * null`. Honors `INDUSK_SKIP_UPDATE_CHECK=1` (returns null without any
 * disk or network access).
 */
export declare function checkLatestVersion(options?: VersionCheckOptions): Promise<VersionCheckResult>;
/**
 * Pure comparator: returns true when `latest` is a different, presumably
 * newer version than `current`. Intentionally string-equality — pre-1.0
 * semver gymnastics aren't worth it for the notify path; if npm publishes
 * a different string than what's installed, we surface it. The user's
 * `upgrade` command does the actual decision.
 */
export declare function hasNewerVersion(current: string, latest: string | null): boolean;
