/**
 * Lightweight update notifier (audit G1).
 *
 * Fires a non-blocking background fetch for the latest published version of
 * the CLI from the npm registry and prints a one-line notice to stderr when
 * a newer version is available. Cached on disk to avoid hammering the
 * registry on every run.
 *
 * Silent failure — we never block the wizard or break if the network is
 * unreachable. Opts out automatically when:
 *   - stderr is not a TTY (piped / ci modes)
 *   - AMPLITUDE_WIZARD_AGENT=1 (agent mode)
 *   - NO_UPDATE_NOTIFIER is set (any non-empty value), CI=1, or DO_NOT_TRACK=1
 *   - AMPLITUDE_WIZARD_NO_UPDATE_CHECK=1
 */
/**
 * Build the npm registry URL for a package name. Scoped packages require the
 * literal `@` in the URL path; only the `/` must be escaped.
 * `encodeURIComponent('@amplitude/wizard')` would produce
 * `%40amplitude%2Fwizard`, which the registry 404s.
 * See: https://github.com/npm/registry/blob/main/docs/REGISTRY-API.md
 *
 * Exported for unit tests — don't call directly from non-test code.
 */
export declare function buildRegistryUrl(pkgName: string): string;
export declare function shouldCheckForUpdates(): boolean;
export interface UpdateCheckResult {
    current: string;
    latest: string;
    available: boolean;
}
/**
 * Fire-and-forget update check. Writes a notice to stderr if an update is
 * available. Safe to call multiple times — short-circuits on the 24h cache.
 *
 * @returns The detected result (for tests), or null if skipped.
 */
export declare function checkForUpdate(pkgName: string, currentVersion: string, options?: {
    timeoutMs?: number;
    force?: boolean;
}): Promise<UpdateCheckResult | null>;
/**
 * Kicks off the background version check and buffers an upgrade notice for
 * display on process exit (after Ink's alt-screen has been released).
 *
 * Why defer to exit? Writing directly to stderr during a TUI session fights
 * Ink's full-screen renderer — the notice either gets overwritten by the
 * next frame or corrupts the layout. Deferring is the simplest reliable way
 * to surface it without routing through the UI abstraction.
 *
 * Non-blocking: awaits the background fetch but catches all errors so the
 * caller can fire this off without try/catch.
 *
 * Exported for tests.
 */
export declare function scheduleUpdateCheck(pkgName: string, currentVersion: string): Promise<void>;
/** Test helper — drains the buffered notice without waiting for exit. */
export declare function _drainPendingNoticeForTest(): string | null;
