import { type DiscoveryResult, type DiscoveredCatalog, type DiscoveredLooseIndex, type DiscoveredAirJson } from "./discover-indexes.js"; import { type EditAirJsonResult } from "./edit-air-json.js"; export interface FindOfferableOptions { /** Working directory to anchor discovery. Defaults to process.cwd(). */ cwd?: string; /** Path to air.json. Defaults to AIR_CONFIG env or ~/.air/air.json. */ configPath?: string; /** Override preferences path (for testing). */ preferencesPath?: string; } export interface OfferableDiscoveryResult { /** The raw result from `discoverIndexes`. */ raw: DiscoveryResult; /** Catalogs not yet in air.json and not dismissed. */ catalogs: DiscoveredCatalog[]; /** Loose indexes not yet in air.json and not dismissed. */ looseIndexes: DiscoveredLooseIndex[]; /** Nested air.json files not yet in air.json and not dismissed. */ airJsons: DiscoveredAirJson[]; /** True if there is anything to offer the user. */ hasOffers: boolean; /** * Resolved absolute path to the air.json we'll target on accept. Honors * `options.configPath`, then `AIR_CONFIG`, then `~/.air/air.json`. Unlike * `getAirJsonPath()`, this is populated even when the file does not yet * exist so accept-flow scaffolding writes to the right location. */ resolvedConfigPath: string; } /** * Run discovery, drop anything already in `~/.air/air.json`, drop anything * the user has asked AIR not to offer again. The caller decides what to do * with the survivors (prompt, auto-accept, etc.). */ export declare function findOfferableIndexes(options?: FindOfferableOptions): OfferableDiscoveryResult; export interface AcceptDiscoveryOptions { /** Override the air.json path. */ configPath?: string; } /** * Accept all offers by writing them into air.json. */ export declare function acceptOffers(offers: OfferableDiscoveryResult, options?: AcceptDiscoveryOptions): EditAirJsonResult; export interface DismissDiscoveryOptions { /** Override the preferences path (for testing). */ preferencesPath?: string; } /** * Mark every current offer as dismissed so it is never surfaced again. * Uses (repoRoot=anchor, indexPath=relative) granularity — new files added * later still get offered. */ export declare function dismissOffers(offers: OfferableDiscoveryResult, options?: DismissDiscoveryOptions): void; //# sourceMappingURL=auto-discovery.d.ts.map