import { type CacheRefreshResult } from "@pulsemcp/air-core"; export interface UpdateProviderCachesOptions { /** Path to air.json. Uses AIR_CONFIG env or ~/.air/air.json if not set. */ config?: string; /** * When true (default), automatically upgrade provider extensions that * are installed at a version too old to expose `refreshCache()` before * loading them. Disable in tests or when running offline. */ autoHeal?: boolean; /** * Override for the npm install command used by auto-heal. Tests pass a * stub here to simulate upgrade outcomes without touching the network. */ runNpmInstallLatest?: NpmInstallLatest; /** * Git protocol override for git-based catalog providers. Takes precedence * over the `gitProtocol` field in air.json. */ gitProtocol?: "ssh" | "https"; } export interface UpdateProviderCachesResult { /** Results from each provider, keyed by provider scheme. */ results: Record; } /** * Hook used by tests to stub out the real `npm install` invocation. * The default implementation shells out to `npm install @latest`. */ export type NpmInstallLatest = (packageName: string, prefix: string) => Promise<{ ok: boolean; stderr: string; }>; /** * Refresh all provider caches. * * Discovers providers in two ways: * 1. From air.json extensions (if air.json exists) * 2. By scanning ~/.air/cache/ for known provider cache directories * * Before loading any provider modules, runs a pre-flight check that * compares the installed version of each known provider package against * the minimum required for `refreshCache()` support. Outdated packages * are upgraded with `npm install @latest` so the freshly loaded * module exposes cache refresh — making `air update` self-healing * across CLI upgrades that outpace the extension packages installed * under `~/.air/`. */ export declare function updateProviderCaches(options?: UpdateProviderCachesOptions): Promise; //# sourceMappingURL=update.d.ts.map