import path from 'node:path';
/**
 * Compare two version strings. Returns true if `latest` is newer than `current`.
 */
export declare function isNewerVersion(latest: string, current: string): boolean;
/**
 * Scan /Applications for installed apps and read their versions from Info.plist.
 */
export declare function scanInstalledApps(applicationsDir?: string): InstalledApp[];
/**
 * Fetch pantry's published desktop-app catalogue (domain → label + version).
 * This is the registry's own list — the same one the publish pipeline feeds.
 */
export declare function fetchDesktopCatalogue(): Promise<DesktopCatalogueEntry[]>;
/**
 * Check installed desktop apps for updates against pantry's registry.
 * Scans /Applications, matches each app to a published pantry domain, and
 * compares the installed version with the registry's latest. No Homebrew.
 */
export declare function checkAppUpdates(apps?: InstalledApp[]): Promise<AppUpdateInfo[]>;
/**
 * Update a desktop app by re-installing it from pantry's registry — NO
 * Homebrew. Mirrors the Zig native-app installer: resolve the latest tarball
 * for this arch, download + extract it, then `ditto` the .app into
 * /Applications and clear the quarantine flag.
 */
// eslint-disable-next-line pickier/no-unused-vars -- false positive: appName is used below
export declare function updateApp(appName: string): Promise<{
  success: boolean
  version?: string
  error?: string
}>;
// Known system/Apple apps that pantry doesn't manage.
export declare const SYSTEM_APPS: Set<string>;
// Known Mac App Store apps (updated through the App Store, not pantry).
export declare const MAS_APPS: Set<string>;
// ── Types ────────────────────────────────────────────────────────
export declare interface InstalledApp {
  name: string
  version: string
  path: string
  bundleId?: string
}
export declare interface AppUpdateInfo {
  name: string
  currentVersion: string
  latestVersion: string | null
  updateAvailable: boolean
  source: 'pantry' | 'mas' | 'system' | 'unknown'
  domain: string | null
}
/** One entry of pantry's published desktop-app catalogue. */
export declare interface DesktopCatalogueEntry {
  domain: string
  label: string
  version: string | null
  platforms?: string[]
}
