import { type UpdateChannel } from './update-channels.js'; export type InstallKind = 'git' | 'package' | 'unknown'; export type NpmTagResult = { tag: string; version: string | null; error?: string; }; export type UpdateCheckResult = { installKind: InstallKind; root: string | null; }; export type UpdateAvailable = { currentVersion: string; latestVersion: string; channel: string; }; /** * Fetch the version published under a specific npm dist-tag. * Uses the abbreviated packument endpoint: `GET //`. */ export declare function fetchNpmTagVersion(params: { tag: string; timeoutMs?: number; }): Promise; /** * Resolve the best version for the given update channel. * For beta channel: if the beta tag version is older than latest, return latest instead. */ export declare function resolveNpmChannelTag(params: { channel: UpdateChannel; timeoutMs?: number; }): Promise<{ tag: string; version: string | null; }>; /** * Compare two semver strings. Returns: * -1 if a < b, 0 if equal, 1 if a > b, null if either is unparseable. * Prerelease versions are considered older than the same version without prerelease. */ export declare function compareSemver(a: string | null, b: string | null): number | null; /** * Detect whether the current process is running from a git checkout or npm-installed package. * Checks for `.git` directory in the package root. */ export declare function detectInstallKind(packageRoot: string): Promise; /** * Resolve the xopc package root directory. * Walks up from this file to find package.json with name @xopcai/xopc. */ export declare function resolvePackageRoot(): Promise; /** Get the current running version from package.json. */ export declare function getCurrentVersion(): string;