/** * update-state — sticky persistence for the "update available" notice. * * `update-notifier` is a good *fetcher* (throttled — hourly here — detached * background network check) but a poor *display* source: its `check()` * deletes the cached result the instant it's read, so the notice would show * at most once per fetch cycle. A user who blinks past one `fit` run would * never see it again until the next hourly check repopulated the cache. * * This module owns the display state instead. The update notifier mirrors the * newest known published version here; {@link readKnownLatest} is consulted on * EVERY run so the notice persists, and {@link clearKnownLatest} wipes it the * moment the running version catches up — so it stops on its own after an * upgrade, with no stale "update available" lingering. * * The store is a tiny JSON file at `~/.opensip-cli/update-state.json` * (see {@link resolveUserPaths}), kept separate from the user-authored * `config.yml`. Writes require entered user-state ownership (Task 4.6) so a * detached callback cannot mutate user-root state after global uninstall * starts. Reads remain best-effort. */ /** Default store path: `~/.opensip-cli/update-state.json`. */ export declare function defaultUpdateStateFile(): string; /** * Read the last-known newer published version, or `undefined` when nothing is * cached / the file is absent or unreadable. Never throws. Reads do not * require ownership (display-only). */ export declare function readKnownLatest(file?: string): string | undefined; /** * Persist the newest known published version so the notice survives across * runs. Requires entered user-state ownership. No-ops on I/O failure after * authorization succeeds. Skips the write when the value is unchanged. */ export declare function writeKnownLatest(latest: string, file?: string): void; /** * Clear the cached version — called once the running version catches up. * Requires entered user-state ownership. No-ops when already absent or on I/O failure. */ export declare function clearKnownLatest(file?: string): void; //# sourceMappingURL=update-state.d.ts.map